From 09e0d668a6e8c66c3d38ab0baec7a91681632545 Mon Sep 17 00:00:00 2001 From: steve Date: Sat, 18 Mar 2000 06:12:26 +0000 Subject: [PATCH] Handle EOF in defines. --- ivlpp/lexor.lex | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index 034cba0e2..e7ade1f9d 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: lexor.lex,v 1.15 2000/03/05 06:13:29 steve Exp $" +#ident "$Id: lexor.lex,v 1.16 2000/03/18 06:12:26 steve Exp $" #endif # include @@ -122,6 +122,7 @@ W [ \t\b\f]+ [ \t\b\f] { ; } \n { istack->lineno += 1; BEGIN(0); do_include(); } +<> { istack->lineno += 1; BEGIN(0); do_include(); } /* Detect the define directive, and match the name. Match any @@ -131,8 +132,15 @@ W [ \t\b\f]+ `define{W}[a-zA-Z][a-zA-Z0-9_]*{W}? { BEGIN(PPDEFINE); def_start(); } -.*\n { - do_define(); +.* { do_define(); } + +\n { + istack->lineno += 1; + fputc('\n', yyout); + BEGIN(0); + } + +<> { istack->lineno += 1; fputc('\n', yyout); BEGIN(0);