diff --git a/parse.y b/parse.y index 19e5bb8a76..4c418d36b2 100644 --- a/parse.y +++ b/parse.y @@ -48,6 +48,7 @@ # define YYFPRINTF(f, fmt, ...) rb_parser_printf(parser, fmt, ##__VA_ARGS__) #else # define YYFPRINTF rb_parser_printf +# undef stderr # define stderr parser #endif #undef malloc diff --git a/tool/ytab.sed b/tool/ytab.sed index d8fb70016c..c1700edbc0 100755 --- a/tool/ytab.sed +++ b/tool/ytab.sed @@ -47,6 +47,16 @@ a\ } x } +/^yy_symbol_value_print/{ + a\ +#define yy_symbol_value_print(output, type, value, parser) yy_symbol_value_print(0, type, value, parser) +} +/^yy_symbol_print/{ + a\ +#define yy_symbol_print(output, type, value, parser) yy_symbol_print(0, type, value, parser) + a\ +#define yyoutput parser +} s/^\([ ]*\)\(yyerror[ ]*([ ]*parser,\)/\1parser_\2/ s!^ *extern char \*getenv();!/* & */! s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/