summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/binutils/binutils/arlex.l4
-rw-r--r--contrib/binutils/ld/ldlex.l8
-rw-r--r--lib/libc/net/nslexer.l5
-rw-r--r--lib/libipsec/policy_token.l4
-rw-r--r--sbin/devd/token.l5
-rw-r--r--usr.bin/ar/acplex.l4
-rw-r--r--usr.bin/csup/token.l3
-rw-r--r--usr.bin/xlint/lint1/scan.l3
-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
14 files changed, 37 insertions, 34 deletions
diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l
index 1560294..e0992f2 100644
--- a/contrib/binutils/binutils/arlex.l
+++ b/contrib/binutils/binutils/arlex.l
@@ -28,13 +28,13 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#include "libiberty.h"
#include "arparse.h"
-#define YY_NO_UNPUT
-
extern int yylex (void);
int linenumber;
%}
+%option nounput
+
%a 10000
%o 25000
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index b0313d9..2f76c5a 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -63,8 +63,6 @@ const char *lex_string = NULL;
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size)
-#define YY_NO_UNPUT
-
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -72,7 +70,7 @@ static unsigned int lineno_stack[MAX_INCLUDE_DEPTH];
static unsigned int include_stack_ptr = 0;
static int vers_node_nesting = 0;
-static void yy_input (char *, int *, int);
+static void yy_input (char *, yy_size_t *, yy_size_t);
static void comment (void);
static void lex_warn_invalid (char *where, char *what);
@@ -94,6 +92,8 @@ int yywrap (void) { return 1; }
#endif
%}
+%option nounput
+
%a 4000
%o 5000
@@ -612,7 +612,7 @@ ldlex_popstate (void)
either the number of characters read, or 0 to indicate EOF. */
static void
-yy_input (char *buf, int *result, int max_size)
+yy_input (char *buf, yy_size_t *result, yy_size_t max_size)
{
*result = 0;
if (YY_CURRENT_BUFFER->yy_input_file)
diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l
index 0f705cf..bc36ea2 100644
--- a/lib/libc/net/nslexer.l
+++ b/lib/libc/net/nslexer.l
@@ -53,11 +53,10 @@ static char *rcsid =
#include "nsparser.h"
-#define YY_NO_INPUT
-#define YY_NO_UNPUT
-
%}
+%option noinput
+%option nounput
%option yylineno
BLANK [ \t]
diff --git a/lib/libipsec/policy_token.l b/lib/libipsec/policy_token.l
index 2a79d5e..219cce4 100644
--- a/lib/libipsec/policy_token.l
+++ b/lib/libipsec/policy_token.l
@@ -139,8 +139,8 @@ void
__policy__strbuffer__init__(msg)
char *msg;
{
- if (yy_current_buffer)
- yy_delete_buffer(yy_current_buffer);
+ if (YY_CURRENT_BUFFER)
+ yy_delete_buffer(YY_CURRENT_BUFFER);
strbuffer = (YY_BUFFER_STATE)yy_scan_string(msg);
yy_switch_to_buffer(strbuffer);
diff --git a/sbin/devd/token.l b/sbin/devd/token.l
index 7a63bec..b3441c3 100644
--- a/sbin/devd/token.l
+++ b/sbin/devd/token.l
@@ -37,8 +37,6 @@
#include "y.tab.h"
int lineno = 1;
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
static void
update_lineno(const char *cp)
@@ -50,6 +48,9 @@ update_lineno(const char *cp)
%}
+%option nounput
+%option noinput
+
%%
[ \t]+ ;
diff --git a/usr.bin/ar/acplex.l b/usr.bin/ar/acplex.l
index 0acf5b7..a82db37 100644
--- a/usr.bin/ar/acplex.l
+++ b/usr.bin/ar/acplex.l
@@ -36,14 +36,14 @@ __FBSDID("$FreeBSD$");
#include "y.tab.h"
-#define YY_NO_UNPUT
-#define YY_NO_INPUT
int lineno = 1;
int yylex(void);
%}
+%option nounput
+%option noinput
%option noyywrap
%%
diff --git a/usr.bin/csup/token.l b/usr.bin/csup/token.l
index 267e61f..69f5ea4 100644
--- a/usr.bin/csup/token.l
+++ b/usr.bin/csup/token.l
@@ -35,12 +35,11 @@
#include "misc.h"
#include "token.h"
-#define YY_NO_UNPUT
-
int lineno = 1;
%}
+%option nounput
%option noyywrap
%%
diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l
index 65d2d11..013a795 100644
--- a/usr.bin/xlint/lint1/scan.l
+++ b/usr.bin/xlint/lint1/scan.l
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include "cgram.h"
#define CHAR_MASK (~(~0 << CHAR_BIT))
-#define YY_NO_UNPUT
/* Current position (its also updated when an included file is parsed) */
pos_t curr_pos = { 1, "", 0 };
@@ -86,6 +85,8 @@ static int wcstrg(void);
%}
+%option nounput
+
L [_A-Za-z]
D [0-9]
NZD [1-9]
diff --git a/usr.sbin/apmd/apmdlex.l b/usr.sbin/apmd/apmdlex.l
index dc7664d..b002feb 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 81f820f..c56c6af 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 0a2fcd7..b77e15a 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 ea165ef..d4c6508 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 1f290e1..3e2a127 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 bd0d3c0..6e55f9e 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]+
OpenPOWER on IntegriCloud