On 2013-02-28 12:29, Jonathan M Davis wrote:

And you were just claiming that the lexer checked the sentinel type in only
one place. If that's indeed the case (and I think that it's quite close to
being true if it isn't true), then you _wouldn't_ need to use static ifs like
this in many places. So, which is it? If you need to check the sentinel often
enough that using static ifs is a problem, then it's probably not buying you
much of anything over checking empty anyway.

You pick a sentinel that you need to check for anyway, i.e. null or eof. But if you don't manually add the sentinel there's nothing that says that the sentinel will be there, and therefore you weed to check for empty as well.

--
/Jacob Carlborg

Reply via email to