* instead of fread(), to make sure we stop fetching input after
* each newline.
*/
- int is_interactive;
+ int yy_is_interactive;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
/* Whether we've seen an EOF on this buffer. */
int yy_eof_status;
YY_FATAL_ERROR(
"fatal flex scanner internal error--end of buffer missed" );
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a singled characater, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
/* Try to read more data. */
/* First move last chars to start of buffer. */
b->yy_buf_pos = &b->yy_ch_buf[1];
%-
- b->is_interactive = file ? isatty( fileno(file) ) : 0;
+ b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
%+
- b->is_interactive = 0;
+ b->yy_is_interactive = 0;
%*
+ b->yy_fill_buffer = 1;
+
b->yy_eof_status = EOF_NOT_SEEN;
}