aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-05-03 23:51:32 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-05-03 23:51:32 +0000
commita7880d59c9588622a96ec154fd3fbb6c037bb83a (patch)
tree178d54373fb0edb2ba3c317479c4aa893565bb94 /usr.sbin
parent8ce3644c917db6b436a11cb1109dfc3cdfb673c1 (diff)
downloadsrc-a7880d59c9588622a96ec154fd3fbb6c037bb83a.tar.gz
src-a7880d59c9588622a96ec154fd3fbb6c037bb83a.zip
Improve compatibility with recent flex from flex.sourceforge.net.
Notes
Notes: svn path=/head/; revision=250227
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/apmd/apmdlex.l8
-rw-r--r--usr.sbin/config/lang.l7
-rw-r--r--usr.sbin/jail/jaillex.l6
-rw-r--r--usr.sbin/kbdcontrol/lex.l5
-rw-r--r--usr.sbin/ndiscvt/inf-token.l5
-rw-r--r--usr.sbin/rrenumd/lexer.l4
6 files changed, 19 insertions, 16 deletions
diff --git a/usr.sbin/apmd/apmdlex.l b/usr.sbin/apmd/apmdlex.l
index dc7664dd6ca8..b002feb3f114 100644
--- a/usr.sbin/apmd/apmdlex.l
+++ b/usr.sbin/apmd/apmdlex.l
@@ -36,14 +36,14 @@
#include "apmd.h"
#include "y.tab.h"
-/* We don't need it, avoid the warning. */
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
-
int lineno;
int first_time;
%}
+/* We don't need it, avoid the warning. */
+%option nounput
+%option noinput
+
%s TOP
%%
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index 81f820f4481c..c56c6afebc8a 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -38,9 +38,6 @@
#include "y.tab.h"
#include "config.h"
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
-
/*
* Data for returning to previous files from include files.
*/
@@ -97,6 +94,10 @@ unsigned int hex(const char *);
int yyerror(const char *);
%}
+
+%option nounput
+%option noinput
+
ID [A-Za-z_][-A-Za-z_0-9]*
PATH [./][-/.%^A-Za-z_0-9]+
%START TOEOL
diff --git a/usr.sbin/jail/jaillex.l b/usr.sbin/jail/jaillex.l
index 0a2fcd72a526..b77e15a402a5 100644
--- a/usr.sbin/jail/jaillex.l
+++ b/usr.sbin/jail/jaillex.l
@@ -36,9 +36,6 @@ __FBSDID("$FreeBSD$");
#include "jailp.h"
#include "y.tab.h"
-#define YY_NO_INPUT
-#define YY_NO_UNPUT
-
extern int yynerrs;
static ssize_t text2lval(size_t triml, size_t trimr, int tovar);
@@ -47,6 +44,9 @@ static int instr;
static int lineno = 1;
%}
+%option noinput
+%option nounput
+
%start _ DQ
%%
diff --git a/usr.sbin/kbdcontrol/lex.l b/usr.sbin/kbdcontrol/lex.l
index ea165efc1205..d4c650804660 100644
--- a/usr.sbin/kbdcontrol/lex.l
+++ b/usr.sbin/kbdcontrol/lex.l
@@ -31,11 +31,12 @@
%{
#include "lex.h"
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
%}
+%option nounput
+%option noinput
+
D [0-9]
X [0-9a-fA-F]
A .
diff --git a/usr.sbin/ndiscvt/inf-token.l b/usr.sbin/ndiscvt/inf-token.l
index 1f290e1e1543..3e2a1278d530 100644
--- a/usr.sbin/ndiscvt/inf-token.l
+++ b/usr.sbin/ndiscvt/inf-token.l
@@ -43,8 +43,6 @@ __FBSDID("$FreeBSD$");
#include "y.tab.h"
int lineno = 1;
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
int yylex(void);
void yyerror(const char *);
@@ -59,6 +57,9 @@ update_lineno(const char *cp)
%}
+%option nounput
+%option noinput
+
%%
[ \t]+ ;
diff --git a/usr.sbin/rrenumd/lexer.l b/usr.sbin/rrenumd/lexer.l
index bd0d3c0f3984..6e55f9e88f06 100644
--- a/usr.sbin/rrenumd/lexer.l
+++ b/usr.sbin/rrenumd/lexer.l
@@ -32,8 +32,6 @@
*/
%{
-#define YY_NO_UNPUT
-
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
@@ -64,6 +62,8 @@ void yyerror(const char *);
int yylex(void);
%}
+%option nounput
+
/* common section */
nl \n
ws [ \t]+