Squelch useless flex-induced warning messages

tested in a gcc-4.2.2 flex-2.5.33 environment
This commit is contained in:
Larry Doolittle 2008-01-04 11:33:03 -08:00 committed by Stephen Williams
parent e01e7b1280
commit 17cc661336
8 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,6 @@
%option nounput
%{ %{
/* /*
* Copyright (c) 2001 Stephen Williams (steve@icarus.com) * Copyright (c) 2001 Stephen Williams (steve@icarus.com)

View File

@ -58,7 +58,7 @@ ivlpp@EXEEXT@: $O
$(CC) $(LDFLAGS) $O -o ivlpp@EXEEXT@ @EXTRALIBS@ $(CC) $(LDFLAGS) $O -o ivlpp@EXEEXT@ @EXTRALIBS@
lexor.c: lexor.lex lexor.c: lexor.lex
flex -s -olexor.c $(srcdir)/lexor.lex flex -olexor.c $(srcdir)/lexor.lex
parse.h parse.c: parse.y parse.h parse.c: parse.y
bison --verbose -t -d -o parse.c $(srcdir)/parse.y bison --verbose -t -d -o parse.c $(srcdir)/parse.y

View File

@ -158,6 +158,8 @@ static int ma_parenthesis_level = 0;
%} %}
%option stack %option stack
%option nounput
%option noyy_top_state
%x PPINCLUDE %x PPINCLUDE
%x DEF_NAME %x DEF_NAME

View File

@ -25,6 +25,8 @@
# include <stdio.h> # include <stdio.h>
static void yyerror(const char*msg); static void yyerror(const char*msg);
extern int yylex (void);
%} %}
%% %%

View File

@ -1,5 +1,6 @@
%option never-interactive %option never-interactive
%option nounput
%{ %{
/* /*
@ -390,8 +391,9 @@ W [ \t\b\f\r]+
error_count += 1; } error_count += 1; }
/* Final catchall. something got lost or mishandled. */ /* Final catchall. something got lost or mishandled. */
/* XXX Should we tell the luser something about the lexical state? */
. { cerr << yylloc.text << ":" << yylloc.first_line <*>.|\n { cerr << yylloc.text << ":" << yylloc.first_line
<< ": error: unmatched character ("; << ": error: unmatched character (";
if (isgraph(yytext[0])) if (isgraph(yytext[0]))
cerr << yytext[0]; cerr << yytext[0];

View File

@ -1,5 +1,6 @@
%option never-interactive %option never-interactive
%option nounput
%{ %{
/* /*

View File

@ -1,4 +1,6 @@
%option nounput
%{ %{
/* /*
* Copyright (c) 1999 Stephen Williams (steve@icarus.com) * Copyright (c) 1999 Stephen Williams (steve@icarus.com)

View File

@ -1,5 +1,6 @@
%option never-interactive %option never-interactive
%option nounput
%{ %{
/* /*