Re: [Flex-help] EOF handling in flex canners is mysterious to me
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Eric S. R. <es...@th...> - 2014-10-14 21:45:52
|
John P. Hartmann <jph...@gm...>: > You should test for EOF only if fread returns 0; If res is positive, > you should go with that. Next time you read, you'll see EOF. As I noted privately before I subscribed successfully: You are correct, but this glitch is irrelevant to the actual problem, which is that the lexer doesn't seem to be detecting EOF properly no matter when O return it. Accordingly, the misbehavior did not change when I fixed this glitch. -- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a> |