Commit 290bef4e authored by Bruce Momjian's avatar Bruce Momjian

Allow for EOF or \0 as input() return from lex.

parent 5b5c83f9
/* /*
This should work, but non-patched flex 2.5.3 fails because input() This should work, but non-patched flex 2.5.3 fails because input()
doesn't return EOF doesn't return EOF or '\0'
Bruce Momjian <root@candle.pha.pa.us> Bruce Momjian <root@candle.pha.pa.us>
*/ */
%% %%
. { . {
while (input() != EOF) int ch;
while ((ch = input()) != EOF && ch != '\0')
; ;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment