4 extern long string_start;
5 extern long string_end;
6 extern char *string_val;
9 #define YY_INPUT(buf, result, max_size) \
10 if (pos >= string_start && pos <= string_end) { \
11 buf[0] = string_val[pos - string_start]; \
14 } else if ( yy_current_buffer->yy_is_interactive ) \
17 for ( n = 0; n < 1 && \
18 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
21 buf[n++] = (char) c; \
22 if ( c == EOF && ferror( yyin ) ) \
23 YY_FATAL_ERROR( "input in flex scanner failed" ); \
27 else if ( ((result = fread( buf, 1, 1, yyin )) == 0) \
29 YY_FATAL_ERROR( "input in flex scanner failed" );
33 # define input() (((pos >= string_start) && (pos < string_end)) ? \
34 yysptr = yysbuf, string_val[pos++ - string_start] : \
35 ((yytchar = yysptr > yysbuf ? U(*--yysptr) : \
36 getc(yyin)) == 10 ? (pos++, yylineno++, yytchar) : \
37 yytchar) == EOF ? (pos++, 0) : (pos++, yytchar))
42 # define lex_input() (((pos >= string_start) && (pos < string_end)) ? \
43 yysptr = yysbuf, string_val[pos++ - string_start] : \
44 ((yytchar = yysptr > yysbuf ? U(*--yysptr) : \
45 getc(yyin)) == 10 ? (pos++, yylineno++, yytchar) : \
46 yytchar) == EOF ? (pos++, 0) : (pos++, yytchar))
51 # define unput(c) { if (pos > 0) pos--; \
52 yytchar = (c); if (yytchar == '\n') yylineno--; \
53 *yysptr++ = yytchar; }