happening and print a message.
/* skip comments; NUL is allowed; no continuation */
while ((c = getc(yyfp)) != '\n')
if (c == EOF)
/* skip comments; NUL is allowed; no continuation */
while ((c = getc(yyfp)) != '\n')
if (c == EOF)
yylval.colno = 0;
yylval.lineno++;
return c;
case EOF:
yylval.colno = 0;
yylval.lineno++;
return c;
case EOF:
}
/* parsing next word */
}
/* parsing next word */
* the main loop.
*/
if (c == EOF)
* the main loop.
*/
if (c == EOF)
else if (qpos == -1) /* accept, e.g., empty args: cmd foo args "" */
goto repeat;
}
else if (qpos == -1) /* accept, e.g., empty args: cmd foo args "" */
goto repeat;
}
err(1, "%s", __func__);
yylval.str = str;
return TSTRING;
err(1, "%s", __func__);
yylval.str = str;
return TSTRING;
+
+eof:
+ if (ferror(yyfp))
+ yyerror("input error reading config");
+ return 0;