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


Geert Bosch wrote:-

> 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.

Yeah, I'd misread your mail.  That is in fact what cpplib does
(with \n as sentinel).

Neil.


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