diff --git a/usr.bin/lex/initparse.h b/usr.bin/lex/initparse.h --- a/usr.bin/lex/initparse.h +++ b/usr.bin/lex/initparse.h @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ #define CHAR 257 #define NUMBER 258 #define SECTEND 259 diff --git a/usr.bin/lex/initparse.c b/usr.bin/lex/initparse.c --- a/usr.bin/lex/initparse.c +++ b/usr.bin/lex/initparse.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* original parser id follows */ /* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */ /* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */ @@ -6,7 +5,7 @@ #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 -#define YYPATCH 20170430 +#define YYPATCH 20200330 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -19,8 +18,6 @@ #define YYPURE 0 #line 35 "parse.y" -/* SPDX-License-Identifier: BSD-2-Clause */ - /* Copyright (c) 1990 The Regents of the University of California. */ /* All rights reserved. */ @@ -130,6 +127,10 @@ # define YYLEX yylex() #endif +#if !(defined(yylex) || defined(YYSTATE)) +int YYLEX_DECL(); +#endif + /* Parameters sent to yyerror. */ #ifndef YYERROR_DECL #define YYERROR_DECL() yyerror(const char *s) @@ -488,13 +489,15 @@ }; #endif +#if YYDEBUG int yydebug; -int yynerrs; +#endif int yyerrflag; int yychar; YYSTYPE yyval; YYSTYPE yylval; +int yynerrs; /* define the initial stack-sizes */ #ifdef YYSTACKSIZE @@ -655,7 +658,7 @@ { (void)msg; } -#line 656 "parse.c" +#line 662 "parse.c" #if YYDEBUG #include /* needed for printf */ @@ -1781,7 +1784,7 @@ #line 946 "parse.y" { yyval = mkstate( SYM_EPSILON ); } break; -#line 1782 "parse.c" +#line 1788 "parse.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; diff --git a/usr.bin/lex/initscan.c b/usr.bin/lex/initscan.c --- a/usr.bin/lex/initscan.c +++ b/usr.bin/lex/initscan.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ #line 2 "" @@ -4578,7 +4577,11 @@ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) +#ifdef YY_FLEX_LEX_COMPAT return 0; +#else + return EOF; +#endif if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; diff --git a/usr.bin/lex/initskel.c b/usr.bin/lex/initskel.c --- a/usr.bin/lex/initskel.c +++ b/usr.bin/lex/initskel.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* File created from flex.skl via mkskel.sh */ #include "flexdef.h" @@ -448,11 +447,7 @@ "/* First, we deal with platform-specific or compiler-specific issues. */", "", "#if defined(__FreeBSD__)", - "#ifndef __STDC_LIMIT_MACROS", - "#define __STDC_LIMIT_MACROS", - "#endif", "#include ", - "#include ", "#else", "#define __dead2", "#endif", @@ -2301,7 +2296,11 @@ " case EOB_ACT_END_OF_FILE:", " {", " if ( yywrap( M4_YY_CALL_ONLY_ARG ) )", + "#ifdef YY_FLEX_LEX_COMPAT", " return 0;", + "#else", + " return EOF;", + "#endif", "", " if ( ! YY_G(yy_did_buffer_switch_on_eof) )", " YY_NEW_FILE;",