Merged revisions 162264 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162264 | murf | 2008-12-09 13:20:54 -0700 (Tue, 09 Dec 2008) | 1 line

In discussion with seanbright on #asterisk-dev,  I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2008-12-09 20:40:31 +00:00
parent 5f4dc23293
commit 08225b9f7a
2 changed files with 108 additions and 86 deletions

View File

@@ -35,6 +35,14 @@
%option prefix="ael_yy"
%option noyywrap 8bit
/* I specify this option to suppress flex generating code with ECHO
in it. This generates compiler warnings in some systems; We've
seen the fwrite generate Unused variable warnings with 4.1.2 gcc.
Some systems have tweaked flex ECHO macro to keep the compiler
happy. To keep the warning message from getting output, I added
a default rule at the end of the patterns section */
%option nodefault
/* yyfree normally just frees its arg. It can be null sometimes,
which some systems will complain about, so, we'll define our own version */
%option noyyfree
@@ -643,6 +651,8 @@ includes { STORE_POS; return KW_INCLUDES;}
}
}
<*>.|\n { /* default rule */ ast_log(LOG_ERROR,"Unhandled char(s): %s\n", yytext); }
%%
static void pbcpush(char x)