From ee09a8a3eb4b3c0649caac9a739fc265f9b8a215 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Mon, 27 Apr 1998 21:17:16 +0200
Subject: [PATCH] yylex() now returns F_LEX_EOF at end of file, to make
 improved EOF handling in Bison possible. NOTE: yylex() MUST support being
 called after EOF if this option is enabled.

Rev: src/lex.c:1.52
---
 src/lex.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lex.c b/src/lex.c
index 16b2784ba0..bdbab93d94 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -4,7 +4,7 @@
 ||| See the files COPYING and DISCLAIMER for more information.
 \*/
 #include "global.h"
-RCSID("$Id: lex.c,v 1.51 1998/04/10 23:29:21 grubba Exp $");
+RCSID("$Id: lex.c,v 1.52 1998/04/27 19:17:16 grubba Exp $");
 #include "language.h"
 #include "array.h"
 #include "lex.h"
@@ -482,7 +482,11 @@ static int yylex2(YYSTYPE *yylval)
     {
     case 0:
       lex.pos--;
+#ifdef F_LEX_EOF
+      return F_LEX_EOF;
+#else /* !F_LEX_EOF */
       return 0;
+#endif /* F_LEX_EOF */
 
     case '\n':
       lex.current_line++;
-- 
GitLab