diff options
author | June McEnroe <june@causal.agency> | 2021-11-28 17:58:54 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-11-28 17:58:54 -0500 |
commit | e6513fe186c2e293eb07ef20af53d73e39e8bde0 (patch) | |
tree | c7a744596d030f198434c6dfdc7a0491048c1f96 | |
parent | Add Sorrowland (diff) | |
download | src-e6513fe186c2e293eb07ef20af53d73e39e8bde0.tar.gz src-e6513fe186c2e293eb07ef20af53d73e39e8bde0.zip |
Use noinput, nounput options in lex files
-rw-r--r-- | bin/c11.l | 7 | ||||
-rw-r--r-- | bin/dehtml.l | 4 | ||||
-rw-r--r-- | bin/make.l | 7 | ||||
-rw-r--r-- | bin/mdoc.l | 7 | ||||
-rw-r--r-- | bin/sh.l | 7 | ||||
-rw-r--r-- | bin/shotty.l | 4 |
6 files changed, 6 insertions, 30 deletions
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 <http://www.gnu.org/licenses/>. */ -%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 <assert.h> @@ -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 <http://www.gnu.org/licenses/>. */ -%option noyywrap +%option noinput nounput noyywrap %{ @@ -101,8 +101,6 @@ ESC \x1B %x OSC %% - (void)input; - (void)yyunput; pn = 0; {ESC}"[" BEGIN(CSI); |