From e6513fe186c2e293eb07ef20af53d73e39e8bde0 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 28 Nov 2021 17:58:54 -0500 Subject: Use noinput, nounput options in lex files --- bin/c11.l | 7 +------ bin/dehtml.l | 4 +--- bin/make.l | 7 +------ bin/mdoc.l | 7 +------ bin/sh.l | 7 +------ bin/shotty.l | 4 +--- 6 files changed, 6 insertions(+), 30 deletions(-) (limited to 'bin') diff --git a/bin/c11.l b/bin/c11.l index 06006e3f..a4b8c25a 100644 --- a/bin/c11.l +++ b/bin/c11.l @@ -15,7 +15,7 @@ */ %option prefix="c11" -%option noyywrap +%option noinput nounput noyywrap %{ #include "hilex.h" @@ -139,11 +139,6 @@ register|restrict|return|static|struct|switch|typedef|union|volatile|while | .|\n { return Normal; } -%{ - (void)yyunput; - (void)input; -%} - %% const struct Lexer LexC = { yylex, &yyin, &yytext }; diff --git a/bin/dehtml.l b/bin/dehtml.l index 51e7f4f7..3f2de592 100644 --- a/bin/dehtml.l +++ b/bin/dehtml.l @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -%option noyywrap +%option noinput nounput noyywrap %{ enum Token { @@ -101,8 +101,6 @@ static bool isTag(const char *tag) { } int main(int argc, char *argv[]) { - (void)input; - (void)yyunput; setlocale(LC_CTYPE, ""); bool collapse = 0; diff --git a/bin/make.l b/bin/make.l index 027fefa3..ae1be2f5 100644 --- a/bin/make.l +++ b/bin/make.l @@ -15,7 +15,7 @@ */ %option prefix="make" -%option noyywrap +%option noinput nounput noyywrap %{ #include "hilex.h" @@ -122,11 +122,6 @@ operator [:!]|:: .|\n { return Normal; } -%{ - (void)yyunput; - (void)input; -%} - %% const struct Lexer LexMake = { yylex, &yyin, &yytext }; diff --git a/bin/mdoc.l b/bin/mdoc.l index a31b6a2e..f29b6ceb 100644 --- a/bin/mdoc.l +++ b/bin/mdoc.l @@ -15,7 +15,7 @@ */ %option prefix="mdoc" -%option noyywrap +%option noinput nounput noyywrap %{ #include "hilex.h" @@ -55,11 +55,6 @@ .|\n { return Normal; } -%{ - (void)yyunput; - (void)input; -%} - %% const struct Lexer LexMdoc = { yylex, &yyin, &yytext }; diff --git a/bin/sh.l b/bin/sh.l index b27ecebc..9664b009 100644 --- a/bin/sh.l +++ b/bin/sh.l @@ -15,7 +15,7 @@ */ %option prefix="sh" -%option noyywrap +%option noinput nounput noyywrap %{ #include @@ -168,11 +168,6 @@ reserved [!{}]|else|do|elif|for|done|fi|then|until|while|if|case|esac .|\n { return Normal; } -%{ - (void)yyunput; - (void)input; -%} - %% const struct Lexer LexSh = { yylex, &yyin, &yytext }; diff --git a/bin/shotty.l b/bin/shotty.l index c676d15b..ff78d241 100644 --- a/bin/shotty.l +++ b/bin/shotty.l @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -%option noyywrap +%option noinput nounput noyywrap %{ @@ -101,8 +101,6 @@ ESC \x1B %x OSC %% - (void)input; - (void)yyunput; pn = 0; {ESC}"[" BEGIN(CSI); -- cgit 1.4.1