{ /* 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
+ /* We matched a single character, the EOB, so
* treat this as a final EOF.
*/
return EOB_ACT_END_OF_FILE;
else
{ /* need more input */
- yytext_ptr = yy_c_buf_p;
+ int offset = yy_c_buf_p - yytext_ptr;
++yy_c_buf_p;
switch ( yy_get_next_buffer() )
{
if ( yywrap() )
{
- yy_c_buf_p =
- yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
return EOF;
}
}
case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+ yy_c_buf_p = yytext_ptr + offset;
break;
case EOB_ACT_LAST_MATCH:
}
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+
+ /* If we're doing %array, then we don't need to bother preserving
+ * yytext. Ironically, not doing so is a win in later preserving
+ * yytext if we're doing yymore(), because we won't have this
+ * errant '\0' sitting in the middle of it.
+ */
+#ifdef yytext_ptr
*yy_c_buf_p = '\0'; /* preserve yytext */
+#endif
+
yy_hold_char = *++yy_c_buf_p;
%% update BOL and yylineno