This is lex.yy.c in view mode; [Download] [Up]
/* A lexical scanner generated by flex */ /* scanner skeleton version: * $Header: /home/horse/u0/vern/flex/RCS/flex.skel,v 2.16 90/08/03 14:09:36 vern Exp Locker: vern $ */ #define FLEX_SCANNER #include <stdio.h> /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include <stdlib.h> #include <osfcn.h> /* use prototypes in function declarations */ #define YY_USE_PROTOS /* the "const" storage-class-modifier is valid */ #define YY_USE_CONST #else /* ! __cplusplus */ #ifdef __STDC__ #ifdef __GNUC__ #include <stddef.h> void *malloc( size_t ); void free( void* ); #else #include <stdlib.h> #endif /* __GNUC__ */ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #define YY_USE_CONST #endif #ifndef YY_USE_CONST #define const #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () /* we can't get here if it's an ANSI C compiler, or a C++ compiler, * so it's got to be a K&R compiler, and therefore there's no standard * place from which to include these definitions */ char *malloc(); int free(); int read(); #endif /* amount of stuff to slurp up with each read */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* returned upon end-of-file */ #define YY_END_TOK 0 /* copy whatever the last rule matched to the standard output */ /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ /* this used to be an fputs(), but since the string might contain NUL's, * we now use fwrite() */ #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) /* gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #define YY_INPUT(buf,result,max_size) \ if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \ YY_FATAL_ERROR( "read() in flex scanner failed" ); #define YY_NULL 0 /* no semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #define yyterminate() return ( YY_NULL ) /* report a fatal error */ /* The funky do-while is used to turn this macro definition into * a single C statement (which needs a semi-colon terminator). * This avoids problems with code like: * * if ( something_happens ) * YY_FATAL_ERROR( "oops, the something happened" ); * else * everything_okay(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the YY_FATAL_ERROR() call. */ #define YY_FATAL_ERROR(msg) \ do \ { \ (void) fputs( msg, stderr ); \ (void) putc( '\n', stderr ); \ exit( 1 ); \ } \ while ( 0 ) /* default yywrap function - always treat EOF as an EOF */ #define yywrap() 1 /* enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN */ #define BEGIN yy_start = 1 + 2 * /* action number for EOF rule of a given start state */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* special action meaning "start processing a new file" */ #define YY_NEW_FILE \ do \ { \ yy_init_buffer( yy_current_buffer, yyin ); \ yy_load_buffer_state(); \ } \ while ( 0 ) /* default declaration of generated scanner - a define so the user can * easily add parameters */ #define YY_DECL int yylex YY_PROTO(( void )) /* code executed at the end of each rule */ #define YY_BREAK break; #define YY_END_OF_BUFFER_CHAR 0 #ifndef YY_BUF_SIZE #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */ #endif typedef struct yy_buffer_state *YY_BUFFER_STATE; #define YY_CHAR char # line 1 "test.l" #define INITIAL 0 # line 2 "test.l" /* The purpose of this is to test flex for RTF compatibility. Note that it would take a bit more work to rewrite rtf-ascii.l for flex, since flex (re: POSIX) does not permit the redefinition of the input() function. -- MJH */ /* A Lex grammar for Microsoft RTF (Rich Text Format). Rewritten (from my original rtfa program) with numerous modifications to accommodate NeXTSTEP 3.0 .rtfd, .attach, links, markers, and for the rtf-tolerant C preprocessor. (Dec 1992). M. J. Hawley MIT Media Laboratory 20 Ames Street Cambridge, MA 02139 mike@media-lab.mit.edu */ /* * Now, pay attention! Nothing up my sleeve... */ #define Case break; case #define Default break; default char *_arg, *_argp, *av0; /* use by 'for_each_argument */ #define argument (_arg=(*_argp?_argp:av[++i==ac?--i: i]),_argp+=strlen(_argp),_arg) #define for_each_argument av0=av[0]; for (i=1;i<ac && *av[i]=='-';i++)\ for (_argp = &av[i][1]; *_argp;)\ switch(*_argp++) int p; /* used only for attachments */ int PrintNonAscii = 1; /* cvt non-ascii to something printable */ int PrintAttachments = 1; /* print a note about an attached item */ char *LeftBracket = "/*", /* for output of attachment names */ *RightBracket = "*/"; Getc(f) FILE *f; { /* front end to convert non-ascii characters */ char c; int x; static char s[8], *sp = (char *)0; static char *S[] = {0,"A`","A'","A^","A~","A:","A*","C,", "E`","E'","E^","E:","I`","I'","I^","I:", "-D","N~","O`","O'","O^","O~","O:","U`", "U'","U^","U:","Y'","b","u","x","/", "(c)","!","c","L","/","Y","f","S", "*","'","``","<<","<",">","fi","fl", "(R)","-","+","++",".","|","P","*", ",",",,","''",">>","...","%.","-","?", "1","`","'","^","~","-","u",".", ":","2",".",",","3","\"",",","v", "--","+-","1/4","1/2","3/4","a`","a'","a^", "a~","a:","a*","c,","e`","e'","e^","e:", "i`","AE","i'","a","i^","i:","d","n~", "L/","O/","OE","o","o`","o'","o^","o~", "o:","ae","u`","u'","u^","i","u:","y'", "|","o","oe","B","b","y:"}; if (sp){ c = *sp++; if (!*sp) sp = (char *)0; return c; } x = getc(f); if (!PrintNonAscii || x <= 0177) return (char)x; if (x > 0200 && x < 0376 && x != 0254) strcpy(sp=s,S[x-0200]); if (!s) return (char)x; return Getc(f); } # line 86 "test.l" /* done after the current pattern has been matched and before the * corresponding action - sets up yytext */ #define YY_DO_BEFORE_ACTION \ yytext = yy_bp; \ yyleng = yy_cp - yy_bp; \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* return all but the first 'n' matched characters back to the input stream */ #define yyless(n) \ do \ { \ /* undo effects of setting up yytext */ \ *yy_cp = yy_hold_char; \ yy_c_buf_p = yy_cp = yy_bp + n; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext ) struct yy_buffer_state { FILE *yy_input_file; YY_CHAR *yy_ch_buf; /* input buffer */ YY_CHAR *yy_buf_pos; /* current position in input buffer */ /* size of input buffer in bytes, not including room for EOB characters */ int yy_buf_size; /* number of characters read into yy_ch_buf, not including EOB characters */ int yy_n_chars; int yy_eof_status; /* whether we've seen an EOF on this buffer */ #define EOF_NOT_SEEN 0 /* "pending" happens when the EOF has been seen but there's still * some text process */ #define EOF_PENDING 1 #define EOF_DONE 2 }; static YY_BUFFER_STATE yy_current_buffer; /* we provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state" */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed */ static YY_CHAR yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif #ifndef YY_USER_INIT #define YY_USER_INIT #endif extern YY_CHAR *yytext; extern int yyleng; extern FILE *yyin, *yyout; YY_CHAR *yytext; int yyleng; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; #define YY_END_OF_BUFFER 14 typedef int yy_state_type; static const short int yy_accept[737] = { 0, 0, 0, 14, 13, 2, 13, 1, 0, 3, 0, 0, 7, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 3, 3, 0, 3, 0, 3, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 3, 3, 0, 6, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 11, 0, 0, 0, 9, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0 } ; static const YY_CHAR yy_ec[128] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 4, 1, 1, 5, 1, 1, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 9, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 11, 12, 13, 14, 14, 14, 15, 16, 17, 14, 14, 14, 14, 14, 18, 14, 14, 14, 19, 14, 14, 1, 20, 1, 1, 21, 1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 2, 5, 2, 5, 1 } ; static const YY_CHAR yy_meta[48] = { 0, 1, 1, 2, 1, 1, 2, 2, 3, 4, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 1, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 } ; static const short int yy_base[746] = { 0, 0, 1, 1026, 1027, 1027, 20, 1027, 0, 1027, 999, 42, 82, 106, 46, 44, 140, 28, 47, 72, 998, 1, 65, 2, 34, 160, 72, 68, 198, 219, 2, 1, 76, 984, 0, 1003, 981, 85, 33, 979, 1027, 1011, 2, 983, 983, 974, 970, 11, 977, 987, 975, 0, 978, 116, 85, 0, 984, 982, 984, 980, 972, 980, 967, 995, 8, 978, 975, 975, 963, 968, 87, 80, 128, 105, 104, 956, 974, 958, 953, 121, 958, 143, 153, 957, 946, 117, 964, 948, 132, 132, 953, 121, 963, 964, 945, 954, 158, 939, 955, 955, 204, 958, 955, 956, 951, 937, 952, 951, 164, 939, 931, 173, 170, 180, 6, 226, 932, 129, 945, 943, 950, 923, 930, 935, 934, 941, 933, 929, 934, 920, 921, 916, 916, 922, 913, 931, 911, 923, 920, 910, 172, 220, 914, 925, 196, 922, 906, 914, 131, 908, 1027, 912, 917, 241, 915, 906, 897, 896, 912, 901, 895, 903, 908, 245, 885, 904, 888, 903, 898, 903, 888, 880, 898, 212, 885, 895, 227, 879, 239, 889, 879, 884, 890, 889, 889, 880, 263, 873, 883, 253, 880, 141, 874, 7, 269, 905, 867, 287, 866, 864, 879, 858, 872, 870, 863, 866, 862, 851, 867, 862, 1027, 868, 871, 866, 847, 265, 861, 866, 852, 222, 213, 846, 277, 850, 844, 5, 843, 858, 858, 845, 239, 302, 850, 309, 834, 843, 836, 841, 840, 840, 848, 845, 843, 831, 310, 835, 842, 826, 199, 844, 829, 823, 828, 826, 290, 836, 825, 823, 828, 832, 821, 819, 815, 813, 826, 0, 810, 246, 806, 827, 818, 807, 817, 814, 809, 817, 249, 811, 806, 814, 813, 809, 804, 801, 799, 794, 313, 317, 803, 809, 315, 805, 803, 800, 806, 791, 791, 803, 801, 784, 1027, 786, 795, 796, 793, 777, 324, 789, 777, 338, 791, 351, 779, 354, 359, 805, 331, 790, 771, 771, 0, 783, 772, 764, 770, 780, 782, 778, 761, 769, 774, 766, 772, 756, 759, 1027, 771, 757, 766, 767, 1027, 1027, 756, 760, 767, 754, 757, 753, 755, 740, 761, 743, 755, 758, 750, 739, 742, 735, 279, 328, 753, 1027, 745, 744, 738, 1027, 745, 730, 1027, 743, 729, 1027, 726, 355, 731, 730, 734, 724, 739, 727, 734, 719, 734, 731, 715, 727, 715, 714, 722, 711, 726, 719, 715, 708, 737, 722, 705, 707, 712, 706, 703, 699, 1027, 698, 700, 714, 696, 695, 697, 1027, 693, 707, 704, 693, 692, 690, 700, 684, 362, 694, 701, 698, 699, 690, 680, 688, 695, 688, 676, 688, 672, 689, 340, 676, 686, 338, 669, 686, 671, 670, 683, 668, 695, 372, 1027, 694, 373, 1027, 668, 691, 1027, 660, 265, 662, 0, 672, 663, 669, 659, 668, 664, 665, 666, 667, 651, 658, 657, 644, 658, 647, 361, 660, 640, 658, 654, 654, 650, 654, 642, 633, 639, 647, 649, 631, 625, 627, 637, 640, 363, 642, 623, 629, 628, 366, 627, 615, 1027, 620, 632, 620, 615, 614, 613, 621, 609, 610, 615, 1027, 616, 364, 607, 622, 605, 604, 620, 604, 601, 616, 618, 598, 603, 612, 614, 595, 612, 600, 593, 590, 606, 590, 593, 594, 587, 599, 599, 587, 581, 1027, 580, 586, 578, 579, 580, 594, 582, 592, 1027, 393, 588, 576, 574, 574, 1027, 574, 582, 581, 565, 564, 576, 399, 568, 1027, 561, 564, 560, 564, 557, 556, 566, 558, 557, 563, 566, 1027, 552, 551, 552, 555, 565, 545, 559, 544, 537, 1027, 556, 540, 558, 538, 531, 537, 539, 551, 533, 545, 531, 532, 544, 537, 536, 528, 544, 539, 524, 523, 522, 522, 521, 1027, 537, 517, 375, 524, 530, 522, 519, 518, 526, 543, 403, 513, 523, 519, 508, 513, 516, 14, 508, 508, 501, 500, 511, 500, 512, 501, 1027, 510, 513, 492, 494, 499, 479, 480, 479, 407, 463, 411, 412, 384, 60, 1027, 107, 121, 194, 213, 221, 243, 277, 307, 310, 332, 1027, 347, 362, 373, 415, 400, 385, 388, 387, 401, 387, 386, 426, 387, 411, 401, 398, 432, 398, 407, 407, 0, 417, 403, 439, 414, 416, 441, 449, 424, 431, 445, 423, 432, 451, 457, 455, 436, 0, 461, 432, 1027, 427, 0, 460, 466, 431, 0, 0, 445, 469, 470, 466, 473, 1027, 1027, 433, 448, 454, 439, 452, 476, 475, 482, 483, 467, 459, 463, 461, 464, 465, 454, 490, 489, 496, 1027, 1027, 504, 497, 498, 509, 512, 517, 521, 525, 529 } ; static const short int yy_def[746] = { 0, 737, 737, 736, 736, 736, 736, 736, 738, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 739, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 740, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 741, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 740, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 741, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 742, 736, 736, 736, 736, 736, 736, 736, 736, 736, 742, 736, 736, 736, 736, 736, 736, 743, 736, 736, 736, 736, 744, 736, 736, 736, 743, 745, 736, 744, 736, 745, 744, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 0, 736, 736, 736, 736, 736, 736, 736, 736, 736 } ; static const short int yy_nxt[1075] = { 0, 736, 5, 5, 40, 40, 63, 41, 64, 42, 42, 150, 63, 315, 64, 316, 64, 351, 352, 736, 6, 6, 7, 80, 8, 9, 9, 116, 84, 656, 657, 81, 195, 141, 142, 115, 129, 10, 85, 51, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 130, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 36, 33, 74, 124, 60, 75, 86, 57, 76, 125, 40, 87, 37, 41, 61, 42, 51, 58, 38, 39, 40, 51, 82, 41, 62, 42, 59, 51, 77, 96, 83, 9, 51, 51, 117, 9, 51, 158, 9, 97, 9, 118, 78, 139, 98, 119, 9, 43, 99, 44, 45, 159, 49, 46, 140, 122, 47, 156, 157, 48, 123, 164, 49, 50, 51, 165, 162, 52, 51, 63, 53, 64, 671, 134, 54, 163, 135, 55, 136, 178, 56, 63, 170, 64, 63, 179, 64, 160, 137, 9, 187, 253, 138, 188, 221, 182, 672, 65, 222, 51, 66, 254, 171, 185, 183, 51, 184, 161, 67, 68, 69, 70, 174, 173, 71, 72, 73, 88, 193, 89, 175, 313, 314, 90, 91, 92, 51, 176, 93, 210, 211, 94, 51, 206, 95, 241, 194, 207, 91, 63, 63, 64, 64, 212, 210, 63, 242, 64, 213, 208, 209, 214, 673, 215, 216, 51, 100, 101, 248, 102, 40, 196, 103, 41, 40, 42, 51, 41, 104, 42, 377, 197, 249, 286, 105, 106, 107, 9, 108, 287, 109, 9, 51, 51, 110, 198, 217, 111, 343, 344, 290, 243, 112, 113, 291, 244, 218, 245, 293, 114, 356, 258, 259, 273, 274, 219, 260, 396, 674, 261, 404, 294, 308, 262, 357, 263, 397, 309, 295, 275, 276, 277, 301, 302, 340, 405, 548, 317, 310, 9, 549, 303, 311, 340, 318, 346, 483, 304, 305, 340, 303, 319, 675, 306, 306, 232, 322, 40, 323, 347, 41, 63, 42, 64, 383, 484, 348, 324, 325, 326, 358, 384, 359, 419, 676, 63, 360, 64, 420, 449, 361, 412, 413, 51, 316, 450, 361, 362, 363, 63, 9, 64, 414, 51, 423, 415, 361, 416, 417, 51, 373, 51, 63, 418, 64, 442, 63, 443, 64, 485, 445, 439, 446, 63, 51, 64, 538, 63, 677, 64, 444, 546, 539, 444, 441, 443, 446, 447, 447, 51, 561, 9, 444, 402, 448, 444, 9, 561, 444, 562, 634, 9, 9, 646, 63, 447, 64, 9, 9, 9, 617, 649, 618, 646, 9, 51, 618, 678, 63, 646, 64, 646, 63, 63, 64, 64, 63, 679, 64, 680, 9, 9, 681, 537, 646, 646, 682, 63, 683, 64, 684, 685, 686, 687, 634, 688, 689, 690, 692, 693, 694, 696, 695, 697, 688, 699, 306, 698, 700, 701, 418, 672, 688, 702, 695, 703, 704, 706, 705, 708, 695, 709, 672, 705, 711, 681, 681, 713, 714, 705, 715, 713, 717, 718, 719, 720, 721, 722, 723, 723, 724, 725, 726, 727, 728, 723, 729, 730, 716, 731, 732, 733, 734, 734, 735, 34, 9, 670, 726, 734, 4, 4, 4, 4, 4, 394, 394, 394, 669, 394, 454, 668, 454, 691, 691, 691, 667, 691, 707, 707, 666, 707, 710, 710, 665, 710, 712, 712, 664, 712, 663, 634, 662, 9, 661, 9, 660, 573, 659, 658, 655, 654, 653, 652, 651, 650, 618, 9, 51, 648, 646, 647, 646, 645, 644, 607, 9, 643, 643, 643, 9, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 9, 9, 51, 631, 630, 9, 583, 496, 9, 51, 629, 449, 368, 361, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 51, 561, 51, 9, 616, 9, 552, 552, 552, 615, 547, 614, 9, 613, 612, 611, 610, 609, 608, 607, 606, 537, 605, 604, 603, 602, 601, 600, 599, 598, 9, 597, 596, 595, 594, 593, 418, 592, 591, 590, 589, 588, 587, 402, 586, 265, 585, 584, 9, 265, 583, 583, 583, 583, 583, 582, 9, 581, 580, 579, 9, 578, 9, 9, 577, 576, 575, 361, 361, 361, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 560, 9, 559, 341, 335, 558, 557, 556, 233, 555, 552, 554, 553, 552, 551, 550, 547, 450, 447, 446, 443, 545, 544, 543, 542, 541, 540, 537, 536, 9, 535, 9, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 509, 51, 515, 514, 513, 265, 512, 265, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 265, 499, 498, 497, 496, 51, 495, 494, 493, 492, 491, 490, 9, 489, 488, 368, 487, 368, 9, 361, 361, 486, 482, 481, 9, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 340, 467, 466, 210, 465, 335, 464, 463, 462, 461, 51, 9, 460, 459, 458, 457, 456, 455, 453, 452, 451, 316, 9, 440, 438, 300, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 422, 421, 411, 410, 409, 9, 408, 407, 406, 193, 402, 403, 402, 402, 265, 401, 400, 399, 398, 395, 393, 392, 391, 390, 389, 388, 387, 386, 385, 51, 382, 381, 380, 379, 378, 376, 375, 374, 372, 371, 371, 370, 369, 368, 367, 366, 365, 51, 364, 355, 354, 9, 353, 350, 349, 345, 342, 219, 341, 339, 338, 337, 336, 335, 335, 334, 333, 332, 331, 330, 329, 328, 233, 327, 9, 321, 320, 131, 312, 300, 307, 300, 9, 299, 298, 233, 297, 296, 292, 289, 288, 285, 284, 283, 282, 281, 280, 279, 278, 51, 272, 271, 270, 269, 268, 267, 266, 265, 264, 257, 256, 255, 252, 251, 250, 247, 246, 240, 239, 238, 237, 236, 235, 234, 233, 232, 51, 231, 193, 230, 229, 228, 227, 9, 226, 51, 225, 224, 223, 220, 205, 204, 9, 203, 202, 201, 200, 199, 50, 195, 51, 9, 192, 191, 190, 189, 186, 181, 180, 177, 51, 172, 169, 168, 167, 166, 155, 154, 153, 152, 151, 64, 149, 148, 147, 146, 145, 144, 143, 133, 132, 9, 131, 9, 128, 127, 51, 42, 126, 121, 120, 51, 79, 35, 736, 3, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736 } ; static const short int yy_chk[1075] = { 0, 0, 1, 2, 31, 42, 51, 31, 51, 31, 42, 64, 114, 193, 114, 193, 64, 225, 225, 0, 1, 2, 6, 21, 6, 6, 6, 31, 23, 625, 625, 21, 114, 55, 55, 30, 47, 6, 23, 30, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 47, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 11, 6, 17, 38, 15, 17, 24, 14, 18, 38, 19, 24, 11, 19, 15, 19, 14, 14, 11, 11, 12, 18, 22, 12, 15, 12, 14, 14, 18, 27, 22, 26, 19, 27, 32, 648, 22, 71, 26, 27, 26, 32, 19, 54, 27, 32, 26, 12, 27, 12, 12, 71, 19, 12, 54, 37, 12, 70, 70, 12, 37, 74, 12, 13, 13, 74, 73, 13, 13, 72, 13, 72, 650, 53, 13, 73, 53, 13, 53, 85, 13, 16, 79, 16, 81, 85, 81, 72, 53, 89, 91, 148, 53, 91, 117, 88, 651, 16, 117, 16, 16, 148, 79, 89, 88, 16, 88, 72, 16, 16, 16, 16, 82, 81, 16, 16, 16, 25, 96, 25, 82, 191, 191, 25, 25, 25, 108, 82, 25, 112, 112, 25, 108, 111, 25, 140, 96, 111, 25, 28, 248, 28, 248, 113, 112, 100, 140, 100, 113, 111, 111, 113, 652, 113, 113, 28, 28, 28, 144, 28, 219, 100, 28, 219, 115, 219, 28, 115, 28, 115, 248, 100, 144, 173, 28, 28, 29, 29, 29, 173, 29, 653, 654, 220, 29, 100, 115, 29, 220, 220, 176, 141, 29, 29, 176, 141, 115, 141, 178, 29, 230, 153, 153, 163, 163, 115, 153, 267, 655, 153, 276, 178, 189, 153, 230, 153, 267, 189, 178, 163, 163, 163, 186, 186, 215, 276, 452, 194, 189, 189, 452, 186, 189, 215, 194, 222, 358, 186, 186, 215, 186, 194, 656, 186, 186, 194, 197, 233, 197, 222, 233, 244, 233, 244, 254, 358, 222, 197, 197, 197, 231, 254, 231, 287, 657, 306, 231, 306, 287, 316, 231, 286, 286, 290, 316, 316, 231, 231, 231, 309, 658, 309, 286, 290, 290, 286, 359, 286, 286, 290, 244, 290, 311, 286, 311, 313, 373, 313, 373, 359, 314, 309, 314, 418, 432, 418, 435, 493, 659, 493, 443, 446, 435, 313, 311, 443, 446, 314, 314, 432, 470, 488, 313, 661, 314, 313, 509, 470, 313, 470, 662, 488, 509, 610, 547, 314, 547, 488, 509, 488, 559, 618, 559, 610, 647, 509, 618, 663, 643, 610, 643, 610, 645, 646, 645, 646, 664, 665, 664, 666, 667, 668, 669, 670, 647, 647, 671, 672, 673, 672, 674, 675, 676, 677, 678, 677, 679, 680, 682, 683, 684, 685, 684, 686, 687, 689, 645, 688, 690, 691, 664, 692, 688, 693, 694, 695, 696, 697, 696, 699, 695, 700, 702, 704, 705, 706, 709, 710, 711, 705, 712, 713, 716, 717, 718, 719, 720, 721, 722, 721, 723, 724, 725, 726, 727, 723, 728, 729, 713, 730, 731, 732, 733, 732, 734, 738, 739, 644, 724, 734, 737, 737, 737, 737, 737, 740, 740, 740, 642, 740, 741, 641, 741, 742, 742, 742, 640, 742, 743, 743, 639, 743, 744, 744, 638, 744, 745, 745, 637, 745, 636, 635, 633, 632, 631, 630, 629, 628, 627, 626, 624, 623, 622, 621, 620, 619, 617, 616, 615, 614, 613, 612, 611, 609, 608, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 582, 581, 580, 579, 578, 577, 576, 575, 574, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 560, 558, 557, 556, 555, 554, 553, 551, 550, 549, 548, 545, 544, 543, 542, 541, 540, 539, 538, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 508, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 495, 494, 492, 491, 490, 489, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 453, 451, 449, 448, 445, 442, 441, 440, 439, 438, 437, 436, 434, 433, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 417, 416, 415, 414, 413, 412, 411, 410, 408, 407, 406, 405, 404, 403, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 372, 370, 369, 367, 366, 364, 363, 362, 360, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 339, 338, 337, 336, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 319, 318, 317, 315, 312, 310, 308, 307, 305, 304, 303, 302, 301, 299, 298, 297, 296, 295, 294, 293, 292, 291, 289, 288, 285, 284, 283, 282, 281, 280, 279, 278, 277, 275, 274, 273, 272, 271, 270, 269, 268, 266, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 253, 252, 251, 250, 249, 247, 246, 245, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 232, 229, 228, 227, 226, 224, 223, 221, 218, 217, 216, 214, 213, 212, 211, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 196, 195, 192, 190, 188, 187, 185, 184, 183, 182, 181, 180, 179, 177, 175, 174, 172, 171, 170, 169, 168, 167, 166, 165, 164, 162, 161, 160, 159, 158, 157, 156, 155, 154, 152, 151, 149, 147, 146, 145, 143, 142, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 116, 110, 109, 107, 106, 105, 104, 103, 102, 101, 99, 98, 97, 95, 94, 93, 92, 90, 87, 86, 84, 83, 80, 78, 77, 76, 75, 69, 68, 67, 66, 65, 63, 62, 61, 60, 59, 58, 57, 56, 52, 50, 49, 48, 46, 45, 44, 43, 41, 39, 36, 35, 33, 20, 10, 3, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736 } ; static yy_state_type yy_last_accepting_state; static YY_CHAR *yy_last_accepting_cpos; /* the intent behind this definition is that it'll catch * any uses of REJECT which flex missed */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 /* these variables are all declared out here so that section 3 code can * manipulate them */ /* points to current character in buffer */ static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr )); void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); #define yy_new_buffer yy_create_buffer #ifdef __cplusplus static int yyinput YY_PROTO(( void )); #else static int input YY_PROTO(( void )); #endif YY_DECL { register yy_state_type yy_current_state; register YY_CHAR *yy_cp, *yy_bp; register int yy_act; if ( yy_init ) { YY_USER_INIT; if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( yy_current_buffer ) yy_init_buffer( yy_current_buffer, yyin ); else yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); yy_init = 0; } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* support of yytext */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of the * current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_match: do { register YY_CHAR yy_c = yy_ec[*yy_cp]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 737 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 736 ); yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; YY_USER_ACTION; do_action: /* this label is used only to access EOF actions */ switch ( yy_act ) { case 0: /* must backtrack */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: # line 87 "test.l" putchar(yytext[1]); YY_BREAK case 2: # line 89 "test.l" ; YY_BREAK case 3: # line 91 "test.l" ; YY_BREAK case 4: # line 93 "test.l" ; YY_BREAK case 5: # line 95 "test.l" ; YY_BREAK case 6: # line 96 "test.l" ; YY_BREAK case 7: # line 97 "test.l" ; YY_BREAK case 8: # line 99 "test.l" ; YY_BREAK case 9: # line 100 "test.l" ; YY_BREAK case 10: # line 101 "test.l" include("link",index(yytext,' ')); YY_BREAK case 11: # line 102 "test.l" include("attach",index(yytext, ' ')); YY_BREAK case 12: # line 104 "test.l" { if (p=index(yytext, ' ')){ char *x = (char *)index(p,'\\'); if (x) *x = '\0'; include("image",p); } } YY_BREAK case 13: # line 111 "test.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* amount of text matched not including the EOB char */ int yy_amount_of_matched_text = yy_cp - yytext - 1; /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; /* note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the end- * of-buffer state). Contrast this with the test in yyinput(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* this was really a NUL */ { yy_state_type yy_next_state; yy_c_buf_p = yytext + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* okay, we're now positioned to make the * NUL transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we * don't want to build jamming into it because * then it will run more slowly) */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext + YY_MORE_ADJ; if ( yy_next_state ) { /* consume the NUL */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* note: because we've taken care in * yy_get_next_buffer() to have set up yytext, * we can now set up yy_c_buf_p so that if some * total hoser (like flex itself) wants * to call the scanner after we return the * YY_NULL, it'll still work - another YY_NULL * will get returned. */ yy_c_buf_p = yytext + YY_MORE_ADJ; yy_act = YY_STATE_EOF((yy_start - 1) / 2); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } } break; case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext + YY_MORE_ADJ; goto yy_find_action; } break; } default: #ifdef FLEX_DEBUG printf( "action # %d\n", yy_act ); #endif YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } } } /* yy_get_next_buffer - try to read in a new buffer * * synopsis * int yy_get_next_buffer(); * * returns a code representing an action * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register YY_CHAR *dest = yy_current_buffer->yy_ch_buf; register YY_CHAR *source = yytext - 1; /* copy prev. char, too */ register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); /* try to read more data */ /* first move last chars to start of buffer */ number_to_move = yy_c_buf_p - yytext; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; else if ( num_to_read <= 0 ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); /* read in more data */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); } if ( yy_n_chars == 0 ) { if ( number_to_move - YY_MORE_ADJ == 1 ) { ret_val = EOB_ACT_END_OF_FILE; yy_current_buffer->yy_eof_status = EOF_DONE; } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_eof_status = EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; /* yytext begins at the second character in yy_ch_buf; the first * character is the one which preceded it before reading in the latest * buffer; it needs to be kept around in case it's a newline, so * yy_get_previous_state() will have with '^' rules active */ yytext = &yy_current_buffer->yy_ch_buf[1]; return ( ret_val ); } /* yy_get_previous_state - get the state just before the EOB char was reached * * synopsis * yy_state_type yy_get_previous_state(); */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register YY_CHAR *yy_cp; yy_current_state = yy_start; for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 737 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return ( yy_current_state ); } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) register yy_state_type yy_current_state; #endif { register int yy_is_jam; register YY_CHAR *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = yy_def[yy_current_state]; if ( yy_current_state >= 737 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 736); return ( yy_is_jam ? 0 : yy_current_state ); } #ifdef YY_USE_PROTOS static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp ) #else static void yyunput( c, yy_bp ) YY_CHAR c; register YY_CHAR *yy_bp; #endif { register YY_CHAR *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */ register YY_CHAR *dest = &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2]; register YY_CHAR *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += dest - source; yy_bp += dest - source; yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } if ( yy_cp > yy_bp && yy_cp[-1] == '\n' ) yy_cp[-2] = '\n'; *--yy_cp = c; /* note: the formal parameter *must* be called "yy_bp" for this * macro to now work correctly */ YY_DO_BEFORE_ACTION; /* set up yytext again */ } #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; YY_CHAR *yy_cp = yy_c_buf_p; *yy_cp = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* this was really a NUL */ *yy_c_buf_p = '\0'; else { /* need more input */ yytext = yy_c_buf_p; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { if ( yywrap() ) { yy_c_buf_p = yytext + YY_MORE_ADJ; return ( EOF ); } YY_NEW_FILE; #ifdef __cplusplus return ( yyinput() ); #else return ( input() ); #endif } break; case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext + YY_MORE_ADJ; break; case EOB_ACT_LAST_MATCH: #ifdef __cplusplus YY_FATAL_ERROR( "unexpected last match in yyinput()" ); #else YY_FATAL_ERROR( "unexpected last match in input()" ); #endif } } } c = *yy_c_buf_p; yy_hold_char = *++yy_c_buf_p; return ( c ); } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* flush out information for old buffer */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* we don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); yy_init_buffer( b, file ); return ( b ); } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; free( (char *) b->yy_ch_buf ); free( (char *) b ); } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { b->yy_input_file = file; /* we put in the '\n' and start reading from [1] so that an * initial match-at-newline will be true. */ b->yy_ch_buf[0] = '\n'; b->yy_n_chars = 1; /* we always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[1]; b->yy_eof_status = EOF_NOT_SEEN; } # line 111 "test.l" #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> int isDirectory(char *f){ /* true if file 'f' is a directory */ struct stat b; stat(f, &b); return b.st_mode & S_IFDIR; } FILE * rtfopen(s) char *s; { char t[1024]=""; if (isDirectory(s)){ sprintf(t,"%s/%s",s,"TXT.rtf"); if (access(t,0)) sprintf(t,"%s/%s",s,"index.rtf"); } else strcpy(t,s); return fopen(t,"r"); } char * striptail(s) char *s; { /* strip trailing ' '|';' */ char *t = s+strlen(s)-1; while (t>s && (*t == ' ' || *t == ';')) *t-- = '\0'; while (*s == ' ' || *s == '\t') ++s; return s; } include(label,file) char *label, *file; { if (file && PrintAttachments) printf("%s%s:%s%s",LeftBracket,label,striptail(file),RightBracket); } e(a,b,c,d,f) char *a; int b, c, d, f; { fprintf(stderr,a,b,c,d,f); fprintf(stderr,"\n"); } use(){ e("use: %s [-a] [-C] [-c] [-l ...] [-r ...] [files...]",av0); e("convert RTF files to ascii; options:"); e(" -a -- don't print notes for attachments"); e(" -C -- do the right thing for the C language"); e(" -c -- don't convert non-ascii characters"); e(" -l ...-- left bracket symbol to use (%s)",LeftBracket); e(" -r ...-- right bracket symbol to use (%s)",RightBracket); exit(); } main(ac,av) char *av[]; { int i; for_each_argument { case 'l': LeftBracket = argument; Case 'r': RightBracket = argument; Case 'a': PrintAttachments = 0; Case 'c': PrintNonAscii = 0; Case 'C': PrintAttachments = PrintNonAscii = 0; Default : use(); } if (i<ac){ while (i<ac) if (yyin = rtfopen(av[i++])) yylex(), fclose(yyin); } else yylex(); printf("\n"); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.