Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh use flex options instead of #defines



details:   https://anonhg.NetBSD.org/src/rev/0344c966433b
branches:  trunk
changeset: 748627:0344c966433b
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 29 14:21:40 2009 +0000

description:
use flex options instead of #defines

diffstat:

 bin/sh/Makefile    |  4 ++--
 bin/sh/arith_lex.l |  7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diffs (49 lines):

diff -r f317370a72e6 -r 0344c966433b bin/sh/Makefile
--- a/bin/sh/Makefile   Thu Oct 29 13:07:12 2009 +0000
+++ b/bin/sh/Makefile   Thu Oct 29 14:21:40 2009 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.85 2009/04/20 16:05:29 drochner Exp $
+#      $NetBSD: Makefile,v 1.86 2009/10/29 14:21:40 christos Exp $
 #      @(#)Makefile    8.4 (Berkeley) 5/5/95
 
 .include <bsd.own.mk>
@@ -34,7 +34,7 @@
 YFLAGS+=-l
 .endif
 
-CPPFLAGS+=-DSHELL -I. -I${.CURDIR} -DYY_NO_INPUT
+CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
 #XXX: For testing only.
 #CPPFLAGS+=-DDEBUG=1
 #CFLAGS+=-funsigned-char
diff -r f317370a72e6 -r 0344c966433b bin/sh/arith_lex.l
--- a/bin/sh/arith_lex.l        Thu Oct 29 13:07:12 2009 +0000
+++ b/bin/sh/arith_lex.l        Thu Oct 29 14:21:40 2009 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: arith_lex.l,v 1.14 2007/03/25 06:29:26 apb Exp $       */
+/*     $NetBSD: arith_lex.l,v 1.15 2009/10/29 14:21:40 christos Exp $  */
 
 /*-
  * Copyright (c) 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)arith_lex.l        8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: arith_lex.l,v 1.14 2007/03/25 06:29:26 apb Exp $");
+__RCSID("$NetBSD: arith_lex.l,v 1.15 2009/10/29 14:21:40 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -53,9 +53,10 @@
 #undef YY_INPUT
 #define YY_INPUT(buf,result,max) \
        result = (*buf = *arith_buf++) ? 1 : YY_NULL;
-#define YY_NO_UNPUT
 %}
 
+%option nounput noinput
+
 %%
 [ \t\n]        { ; }
 0x[0-9a-fA-F]+ { yylval = strtoimax(yytext, 0, 0); return(ARITH_NUM); }



Home | Main Index | Thread Index | Old Index