This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]