Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit290bef4

Browse files
committed
Allow for EOF or \0 as input() return from lex.
1 parent5b5c83f commit290bef4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/lextest/scan.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/*
22
This should work, but non-patched flex 2.5.3 fails because input()
3-
doesn'treturn EOF
3+
doesn't return EOF or '\0'
44
Bruce Momjian <root@candle.pha.pa.us>
55
*/
66
%%
77
.{
8-
while (input() != EOF)
8+
int ch;
9+
while ((ch =input()) != EOF && ch !='\0')
910
;
1011
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp