|
|
a0dd313 |
diff -Burp flex-2.5.4/gen.c flex-2.5.4shap/gen.c
|
|
|
a0dd313 |
--- flex-2.5.4/gen.c 1997-07-26 22:32:18.000000000 -0400
|
|
|
a0dd313 |
+++ flex-2.5.4shap/gen.c 2006-01-15 11:49:20.000000000 -0500
|
|
|
a0dd313 |
@@ -1437,7 +1437,7 @@ void make_tables()
|
|
|
a0dd313 |
indent_puts( "if ( yy_act == 0 )" );
|
|
|
a0dd313 |
indent_up();
|
|
|
a0dd313 |
indent_puts( C_plus_plus ?
|
|
|
a0dd313 |
- "cerr << \"--scanner backing up\\n\";" :
|
|
|
a0dd313 |
+ "std::cerr << \"--scanner backing up\\n\";" :
|
|
|
a0dd313 |
"fprintf( stderr, \"--scanner backing up\\n\" );" );
|
|
|
a0dd313 |
indent_down();
|
|
|
a0dd313 |
|
|
|
a0dd313 |
@@ -1448,7 +1448,7 @@ void make_tables()
|
|
|
a0dd313 |
if ( C_plus_plus )
|
|
|
a0dd313 |
{
|
|
|
a0dd313 |
indent_puts(
|
|
|
a0dd313 |
- "cerr << \"--accepting rule at line \" << yy_rule_linenum[yy_act] <<" );
|
|
|
a0dd313 |
+ "std::cerr << \"--accepting rule at line \" << yy_rule_linenum[yy_act] <<" );
|
|
|
a0dd313 |
indent_puts(
|
|
|
a0dd313 |
" \"(\\\"\" << yytext << \"\\\")\\n\";" );
|
|
|
a0dd313 |
}
|
|
|
a0dd313 |
@@ -1470,7 +1470,7 @@ void make_tables()
|
|
|
a0dd313 |
if ( C_plus_plus )
|
|
|
a0dd313 |
{
|
|
|
a0dd313 |
indent_puts(
|
|
|
a0dd313 |
-"cerr << \"--accepting default rule (\\\"\" << yytext << \"\\\")\\n\";" );
|
|
|
a0dd313 |
+"std::cerr << \"--accepting default rule (\\\"\" << yytext << \"\\\")\\n\";" );
|
|
|
a0dd313 |
}
|
|
|
a0dd313 |
else
|
|
|
a0dd313 |
{
|
|
|
a0dd313 |
@@ -1486,7 +1486,7 @@ void make_tables()
|
|
|
a0dd313 |
indent_up();
|
|
|
a0dd313 |
|
|
|
a0dd313 |
indent_puts( C_plus_plus ?
|
|
|
a0dd313 |
- "cerr << \"--(end of buffer or a NUL)\\n\";" :
|
|
|
a0dd313 |
+ "std::cerr << \"--(end of buffer or a NUL)\\n\";" :
|
|
|
a0dd313 |
"fprintf( stderr, \"--(end of buffer or a NUL)\\n\" );" );
|
|
|
a0dd313 |
|
|
|
a0dd313 |
indent_down();
|
|
|
a0dd313 |
@@ -1498,7 +1498,7 @@ void make_tables()
|
|
|
a0dd313 |
if ( C_plus_plus )
|
|
|
a0dd313 |
{
|
|
|
a0dd313 |
indent_puts(
|
|
|
a0dd313 |
- "cerr << \"--EOF (start condition \" << YY_START << \")\\n\";" );
|
|
|
a0dd313 |
+ "std::cerr << \"--EOF (start condition \" << YY_START << \")\\n\";" );
|
|
|
a0dd313 |
}
|
|
|
a0dd313 |
else
|
|
|
a0dd313 |
{
|
|
|
a0dd313 |
diff -Burp flex-2.5.4/skel.c flex-2.5.4shap/skel.c
|
|
|
a0dd313 |
--- flex-2.5.4/skel.c 2006-01-14 22:53:17.000000000 -0500
|
|
|
a0dd313 |
+++ flex-2.5.4shap/skel.c 2006-01-15 11:56:59.000000000 -0500
|
|
|
a0dd313 |
@@ -146,6 +146,15 @@ const char *skel[] = {
|
|
|
a0dd313 |
"",
|
|
|
a0dd313 |
"#define unput(c) yyunput( c, yytext_ptr )",
|
|
|
a0dd313 |
"",
|
|
|
a0dd313 |
+ "/* Some routines like yy_flex_realloc() are emitted as static but are",
|
|
|
a0dd313 |
+ " not called by all lexers. This generates warnings in some compilers,",
|
|
|
a0dd313 |
+ " notably GCC. Arrange to suppress these. */",
|
|
|
a0dd313 |
+ "#ifdef __GNUC__",
|
|
|
a0dd313 |
+ "#define YY_MAY_BE_UNUSED __attribute__((unused))",
|
|
|
a0dd313 |
+ "#else",
|
|
|
a0dd313 |
+ "#define YY_MAY_BE_UNUSED",
|
|
|
a0dd313 |
+ "#endif",
|
|
|
a0dd313 |
+ "",
|
|
|
a0dd313 |
"/* The following is because we cannot portably get our hands on size_t",
|
|
|
a0dd313 |
" * (without autoconf's help, which isn't available because we want",
|
|
|
a0dd313 |
" * flex-generated scanners to compile on their own).",
|
|
|
a0dd313 |
@@ -260,7 +269,7 @@ const char *skel[] = {
|
|
|
a0dd313 |
"%*",
|
|
|
a0dd313 |
"",
|
|
|
a0dd313 |
"static void *yy_flex_alloc YY_PROTO(( yy_size_t ));",
|
|
|
a0dd313 |
- "static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));",
|
|
|
a0dd313 |
+ "static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;",
|
|
|
a0dd313 |
"static void yy_flex_free YY_PROTO(( void * ));",
|
|
|
a0dd313 |
"",
|
|
|
a0dd313 |
"#define yy_new_buffer yy_create_buffer",
|
|
|
a0dd313 |
@@ -1541,15 +1550,5 @@ const char *skel[] = {
|
|
|
a0dd313 |
" return 0;",
|
|
|
a0dd313 |
" }",
|
|
|
a0dd313 |
"#endif",
|
|
|
a0dd313 |
- "",
|
|
|
a0dd313 |
- "/* Some people want warning-free code, and under certain #define",
|
|
|
a0dd313 |
- " conditions, gcc will warn for unusedness of some functions. This",
|
|
|
a0dd313 |
- " function is provided merely to silent these warnings. It's not",
|
|
|
a0dd313 |
- " static itself, so it will clutter exports, but it has at least",
|
|
|
a0dd313 |
- " urandom name so that clashes won't occur.*/",
|
|
|
a0dd313 |
- "void _yy_dummy_uses_of_static_functions_b2f4_517d_02ff_b30c_3e5a_47d7_aaa3_3b5d_()",
|
|
|
a0dd313 |
- "{",
|
|
|
a0dd313 |
- " yy_flex_realloc ((void*)0, 0);",
|
|
|
a0dd313 |
- "}",
|
|
|
a0dd313 |
0
|
|
|
a0dd313 |
};
|