-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
{
ch = lr_getc (lr);
+ if (ch == EOF)
+ {
+ lr->token.tok = tok_eof;
+ return &lr->token;
+ };
+
if (ch == '\n')
{
lr->token.tok = tok_eol;
esc_error:
lr->token.val.str.start = &lr->buf[start_idx];
- while (ch != EOF || !isspace (ch))
+ while (ch != EOF && !isspace (ch))
ch = lr_getc (lr);
lr->token.val.str.len = lr->idx - start_idx;