Module Name: src Committed By: christos Date: Thu Oct 29 14:49:04 UTC 2009
Modified Files: src/crypto/dist/heimdal/lib/com_err: lex.l src/crypto/dist/heimdal/lib/sl: lex.l slc-lex.l src/dist/libpcap: scanner.l src/external/gpl3/binutils/dist/ld: ldlex.l src/gnu/dist/binutils/ld: ldlex.l src/lib/libc/net: nslexer.l src/sbin/cgdconfig: cgdlex.l src/sbin/veriexecctl: veriexecctl_conf.l src/usr.bin/fgen: fgen.l src/usr.bin/m4: tokenizer.l src/usr.bin/mkesdb: lex.l src/usr.bin/xlint/lint1: scan.l src/usr.sbin/ndiscvt: inf-token.l Log Message: use %option instead of #define YY_NO_... To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/crypto/dist/heimdal/lib/com_err/lex.l cvs rdiff -u -r1.5 -r1.6 src/crypto/dist/heimdal/lib/sl/lex.l cvs rdiff -u -r1.1 -r1.2 src/crypto/dist/heimdal/lib/sl/slc-lex.l cvs rdiff -u -r1.2 -r1.3 src/dist/libpcap/scanner.l cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/binutils/dist/ld/ldlex.l cvs rdiff -u -r1.1.1.3 -r1.2 src/gnu/dist/binutils/ld/ldlex.l cvs rdiff -u -r1.8 -r1.9 src/lib/libc/net/nslexer.l cvs rdiff -u -r1.4 -r1.5 src/sbin/cgdconfig/cgdlex.l cvs rdiff -u -r1.13 -r1.14 src/sbin/veriexecctl/veriexecctl_conf.l cvs rdiff -u -r1.32 -r1.33 src/usr.bin/fgen/fgen.l cvs rdiff -u -r1.3 -r1.4 src/usr.bin/m4/tokenizer.l cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mkesdb/lex.l cvs rdiff -u -r1.45 -r1.46 src/usr.bin/xlint/lint1/scan.l cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/ndiscvt/inf-token.l Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/dist/heimdal/lib/com_err/lex.l diff -u src/crypto/dist/heimdal/lib/com_err/lex.l:1.3 src/crypto/dist/heimdal/lib/com_err/lex.l:1.4 --- src/crypto/dist/heimdal/lib/com_err/lex.l:1.3 Sat Mar 22 04:37:06 2008 +++ src/crypto/dist/heimdal/lib/com_err/lex.l Thu Oct 29 10:49:02 2009 @@ -45,17 +45,16 @@ #include "lex.h" __RCSID("$Heimdal: lex.l 15143 2005-05-16 08:52:54Z lha $" - "$NetBSD: lex.l,v 1.3 2008/03/22 08:37:06 mlelstv Exp $"); + "$NetBSD: lex.l,v 1.4 2009/10/29 14:49:02 christos Exp $"); static unsigned lineno = 1; static int getstring(void); -#define YY_NO_UNPUT - #undef ECHO %} +%option nounput %% et { return ET; } Index: src/crypto/dist/heimdal/lib/sl/lex.l diff -u src/crypto/dist/heimdal/lib/sl/lex.l:1.5 src/crypto/dist/heimdal/lib/sl/lex.l:1.6 --- src/crypto/dist/heimdal/lib/sl/lex.l:1.5 Sat Mar 22 04:37:23 2008 +++ src/crypto/dist/heimdal/lib/sl/lex.l Thu Oct 29 10:49:03 2009 @@ -38,17 +38,16 @@ #include "parse.h" __RCSID("$Heimdal: lex.l 10703 2001-09-16 23:10:10Z assar $" - "$NetBSD: lex.l,v 1.5 2008/03/22 08:37:23 mlelstv Exp $"); + "$NetBSD: lex.l,v 1.6 2009/10/29 14:49:03 christos Exp $"); static unsigned lineno = 1; static int getstring(void); -#define YY_NO_UNPUT - #undef ECHO %} +%option nounput %% command_table { return TABLE; } Index: src/crypto/dist/heimdal/lib/sl/slc-lex.l diff -u src/crypto/dist/heimdal/lib/sl/slc-lex.l:1.1 src/crypto/dist/heimdal/lib/sl/slc-lex.l:1.2 --- src/crypto/dist/heimdal/lib/sl/slc-lex.l:1.1 Sat Mar 22 04:37:23 2008 +++ src/crypto/dist/heimdal/lib/sl/slc-lex.l Thu Oct 29 10:49:03 2009 @@ -33,7 +33,7 @@ */ /* $Heimdal: slc-lex.l 15118 2005-05-10 22:19:01Z lha $ - $NetBSD: slc-lex.l,v 1.1 2008/03/22 08:37:23 mlelstv Exp $ */ + $NetBSD: slc-lex.l,v 1.2 2009/10/29 14:49:03 christos Exp $ */ #undef ECHO @@ -48,11 +48,13 @@ static void handle_comment(void); static char * handle_string(void); -#define YY_NO_UNPUT #undef ECHO %} + +%option nounput + %% [A-Za-z][-A-Za-z0-9_]* { yylval.string = strdup ((const char *)yytext); Index: src/dist/libpcap/scanner.l diff -u src/dist/libpcap/scanner.l:1.2 src/dist/libpcap/scanner.l:1.3 --- src/dist/libpcap/scanner.l:1.2 Mon Feb 27 10:55:30 2006 +++ src/dist/libpcap/scanner.l Thu Oct 29 10:49:03 2009 @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /cvsroot/src/dist/libpcap/scanner.l,v 1.2 2006/02/27 15:55:30 drochner Exp $ (LBL)"; + "@(#) $Header: /cvsroot/src/dist/libpcap/scanner.l,v 1.3 2009/10/29 14:49:03 christos Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -63,7 +63,6 @@ static inline int xdtoi(int); #ifdef FLEX_SCANNER -#define YY_NO_UNPUT static YY_BUFFER_STATE in_buffer; #else static char *in_buffer; @@ -166,6 +165,8 @@ V6 ({V680}|{V670}|{V671}|{V672}|{V673}|{V674}|{V675}|{V676}|{V677}|{V660}|{V661}|{V662}|{V663}|{V664}|{V665}|{V666}|{V650}|{V651}|{V652}|{V653}|{V654}|{V655}|{V640}|{V641}|{V642}|{V643}|{V644}|{V630}|{V631}|{V632}|{V633}|{V620}|{V621}|{V622}|{V610}|{V611}|{V600}|{V6604}|{V6504}|{V6514}|{V6524}|{V6534}|{V6544}|{V6554}|{V6404}|{V6414}|{V6424}|{V6434}|{V6444}|{V6304}|{V6314}|{V6324}|{V6334}|{V6204}|{V6214}|{V6224}|{V6104}|{V6114}|{V6004}) +%option nounput + %% dst return DST; src return SRC; Index: src/external/gpl3/binutils/dist/ld/ldlex.l diff -u src/external/gpl3/binutils/dist/ld/ldlex.l:1.1.1.1 src/external/gpl3/binutils/dist/ld/ldlex.l:1.2 --- src/external/gpl3/binutils/dist/ld/ldlex.l:1.1.1.1 Tue Aug 18 06:04:53 2009 +++ src/external/gpl3/binutils/dist/ld/ldlex.l Thu Oct 29 10:49:03 2009 @@ -59,7 +59,6 @@ #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]; @@ -90,6 +89,8 @@ #endif %} +%option nounput + %a 4000 %o 5000 Index: src/gnu/dist/binutils/ld/ldlex.l diff -u src/gnu/dist/binutils/ld/ldlex.l:1.1.1.3 src/gnu/dist/binutils/ld/ldlex.l:1.2 --- src/gnu/dist/binutils/ld/ldlex.l:1.1.1.3 Thu Feb 2 16:18:12 2006 +++ src/gnu/dist/binutils/ld/ldlex.l Thu Oct 29 10:49:03 2009 @@ -65,8 +65,6 @@ #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]; @@ -120,6 +118,9 @@ %s VERS_START %s VERS_SCRIPT %s VERS_NODE + +%option nounput + %% if (parser_input != input_selected) Index: src/lib/libc/net/nslexer.l diff -u src/lib/libc/net/nslexer.l:1.8 src/lib/libc/net/nslexer.l:1.9 --- src/lib/libc/net/nslexer.l:1.8 Mon Apr 28 16:23:00 2008 +++ src/lib/libc/net/nslexer.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: nslexer.l,v 1.8 2008/04/28 20:23:00 martin Exp $ */ +/* $NetBSD: nslexer.l,v 1.9 2009/10/29 14:49:03 christos Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: nslexer.l,v 1.8 2008/04/28 20:23:00 martin Exp $"); +__RCSID("$NetBSD: nslexer.l,v 1.9 2009/10/29 14:49:03 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -44,11 +44,9 @@ #include "nsparser.h" -#define YY_NO_UNPUT - %} -%option yylineno +%option yylineno nounput %option never-interactive BLANK [ \t] Index: src/sbin/cgdconfig/cgdlex.l diff -u src/sbin/cgdconfig/cgdlex.l:1.4 src/sbin/cgdconfig/cgdlex.l:1.5 --- src/sbin/cgdconfig/cgdlex.l:1.4 Wed Oct 28 16:59:46 2009 +++ src/sbin/cgdconfig/cgdlex.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgdlex.l,v 1.4 2009/10/28 20:59:46 christos Exp $ */ +/* $NetBSD: cgdlex.l,v 1.5 2009/10/29 14:49:03 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: cgdlex.l,v 1.4 2009/10/28 20:59:46 christos Exp $"); +__RCSID("$NetBSD: cgdlex.l,v 1.5 2009/10/29 14:49:03 christos Exp $"); #endif #include <err.h> @@ -41,7 +41,6 @@ #include "utils.h" #include "cgdparse.h" -#define YY_NO_UNPUT /* * We use macros here to separate the C from the tokeniser, to * ease reading each. @@ -87,6 +86,7 @@ %} %x quoted +%option nounput %% Index: src/sbin/veriexecctl/veriexecctl_conf.l diff -u src/sbin/veriexecctl/veriexecctl_conf.l:1.13 src/sbin/veriexecctl/veriexecctl_conf.l:1.14 --- src/sbin/veriexecctl/veriexecctl_conf.l:1.13 Wed Oct 28 13:25:44 2009 +++ src/sbin/veriexecctl/veriexecctl_conf.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: veriexecctl_conf.l,v 1.13 2009/10/28 17:25:44 christos Exp $ */ +/* $NetBSD: veriexecctl_conf.l,v 1.14 2009/10/29 14:49:03 christos Exp $ */ /*- * Copyright 2005 Elad Efrat <e...@netbsd.org> @@ -40,7 +40,6 @@ #include "veriexecctl_parse.h" -#define YY_NO_UNPUT int yylex(void); extern size_t line; @@ -82,6 +81,8 @@ STRING [0-9a-zA-Z]+ PCHAR (\\.|[^ \t]) +%option nounput + %% /* path */ Index: src/usr.bin/fgen/fgen.l diff -u src/usr.bin/fgen/fgen.l:1.32 src/usr.bin/fgen/fgen.l:1.33 --- src/usr.bin/fgen/fgen.l:1.32 Thu Oct 29 10:35:25 2009 +++ src/usr.bin/fgen/fgen.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: fgen.l,v 1.32 2009/10/29 14:35:25 christos Exp $ */ +/* $NetBSD: fgen.l,v 1.33 2009/10/29 14:49:03 christos Exp $ */ /* FLEX input for FORTH input file scanner */ /* * Copyright (c) 1998 Eduardo Horvath. @@ -42,7 +42,7 @@ #endif #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: fgen.l,v 1.32 2009/10/29 14:35:25 christos Exp $"); +__RCSID("$NetBSD: fgen.l,v 1.33 2009/10/29 14:49:03 christos Exp $"); #endif %} @@ -103,9 +103,10 @@ #define ASSERT if (debug) assert #define STATE(y, x) do { if (debug) printf( "%ld State %s: token `%s'\n", outpos, x, y); } while (0) -#define YY_NO_UNPUT %} +%option nounput + %% 0 { ltoken.type = TOK_OTHER; ltoken.text = yytext; return <oken; } Index: src/usr.bin/m4/tokenizer.l diff -u src/usr.bin/m4/tokenizer.l:1.3 src/usr.bin/m4/tokenizer.l:1.4 --- src/usr.bin/m4/tokenizer.l:1.3 Wed Oct 28 17:42:47 2009 +++ src/usr.bin/m4/tokenizer.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: tokenizer.l,v 1.3 2009/10/28 21:42:47 christos Exp $ */ +/* $NetBSD: tokenizer.l,v 1.4 2009/10/29 14:49:03 christos Exp $ */ /* $OpenBSD: tokenizer.l,v 1.6 2008/08/21 21:00:14 espie Exp $ */ /* * Copyright (c) 2004 Marc Espie <es...@cvs.openbsd.org> @@ -20,7 +20,7 @@ #include "nbtool_config.h" #endif #include "parser.h" -__RCSID("$NetBSD: tokenizer.l,v 1.3 2009/10/28 21:42:47 christos Exp $"); +__RCSID("$NetBSD: tokenizer.l,v 1.4 2009/10/29 14:49:03 christos Exp $"); #include <stdlib.h> #include <errno.h> #include <stdint.h> @@ -34,9 +34,10 @@ int32_t number(void); int32_t parse_radix(void); -#define YY_NO_UNPUT %} +%option nounput + delim [ \t\n] ws {delim}+ hex 0[xX][0-9a-fA-F]+ Index: src/usr.bin/mkesdb/lex.l diff -u src/usr.bin/mkesdb/lex.l:1.4 src/usr.bin/mkesdb/lex.l:1.5 --- src/usr.bin/mkesdb/lex.l:1.4 Wed Oct 28 18:22:44 2009 +++ src/usr.bin/mkesdb/lex.l Thu Oct 29 10:49:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.l,v 1.4 2009/10/28 22:22:44 christos Exp $ */ +/* $NetBSD: lex.l,v 1.5 2009/10/29 14:49:03 christos Exp $ */ %{ /*- @@ -33,7 +33,7 @@ #include <sys/cdefs.h> #if !defined(lint) -__RCSID("$NetBSD: lex.l,v 1.4 2009/10/28 22:22:44 christos Exp $"); +__RCSID("$NetBSD: lex.l,v 1.5 2009/10/29 14:49:03 christos Exp $"); #endif /* not lint */ #include <assert.h> @@ -50,10 +50,9 @@ int line_number = 1; -#define YY_NO_UNPUT -#define YY_NO_INPUT %} +%option noinput nounput %x COMMENT %% Index: src/usr.bin/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.45 src/usr.bin/xlint/lint1/scan.l:1.46 --- src/usr.bin/xlint/lint1/scan.l:1.45 Fri Oct 2 11:03:45 2009 +++ src/usr.bin/xlint/lint1/scan.l Thu Oct 29 10:49:03 2009 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.45 2009/10/02 15:03:45 christos Exp $ */ +/* $NetBSD: scan.l,v 1.46 2009/10/29 14:49:03 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: scan.l,v 1.45 2009/10/02 15:03:45 christos Exp $"); +__RCSID("$NetBSD: scan.l,v 1.46 2009/10/29 14:49:03 christos Exp $"); #endif #include <stdlib.h> @@ -50,7 +50,6 @@ #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 }; @@ -91,6 +90,8 @@ HD [0-9A-Fa-f] EX ([eE][+-]?[0-9]+) +%option nounput + %% {L}({L}|{D})* return (name()); Index: src/usr.sbin/ndiscvt/inf-token.l diff -u src/usr.sbin/ndiscvt/inf-token.l:1.7 src/usr.sbin/ndiscvt/inf-token.l:1.8 --- src/usr.sbin/ndiscvt/inf-token.l:1.7 Wed Dec 12 05:04:52 2007 +++ src/usr.sbin/ndiscvt/inf-token.l Thu Oct 29 10:49:03 2009 @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD: src/usr.sbin/ndiscvt/inf-token.l,v 1.3 2004/01/11 21:10:35 mdodd Exp $"); #endif #ifdef __NetBSD__ -__RCSID("$NetBSD: inf-token.l,v 1.7 2007/12/12 10:04:52 martin Exp $"); +__RCSID("$NetBSD: inf-token.l,v 1.8 2009/10/29 14:49:03 christos Exp $"); #endif #include <regex.h> @@ -48,7 +48,6 @@ #include "inf-parse.h" int lineno = 1; -#define YY_NO_UNPUT int input_is_unicode = 0; #define IS_UNICODE 1 @@ -72,6 +71,8 @@ %} +%option nounput + %% [ \t]+ ;