mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Allow for EOF or \0 as input() return from lex.
This commit is contained in:
parent
5b5c83f9e7
commit
290bef4e05
@ -1,10 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
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')
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user