This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EOF character in parser
On Jan 6, 2004, at 17:16, neil@daikokuya.co.uk wrote:
There is no EOF character in cpplib; all bytes are "OK", so this
doesn't work.
You can still take advantage of knowing there's an EOF at the
end of the file. Most tokens cannot contain the EOF symbol and
you can optimize scanning of those tokens. Or more general, you
could scan as if EOF's are not allowed in the source. Then you
fix up when you actually find an EOF.
-Geert