ytab.sed: replace argument
* tool/ytab.sed: substitute the first argument of YYFPRINTF, instead of substitution by preprocessor, not to redefine stderr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a7b67cc82e
commit
d2e19fdc42
8
parse.y
8
parse.y
@ -44,13 +44,7 @@
|
|||||||
#define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
|
#define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
|
||||||
#define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
|
#define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
|
||||||
#define YYFREE(ptr) rb_parser_free(parser, (ptr))
|
#define YYFREE(ptr) rb_parser_free(parser, (ptr))
|
||||||
#ifdef HAVE_VA_ARGS_MACRO
|
#define YYFPRINTF rb_parser_printf
|
||||||
# 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
|
#undef malloc
|
||||||
#undef realloc
|
#undef realloc
|
||||||
#undef calloc
|
#undef calloc
|
||||||
|
@ -47,16 +47,9 @@ a\
|
|||||||
}
|
}
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
/^yy_symbol_value_print/{
|
s/\( YYFPRINTF *(\)yyoutput,/\1parser,/
|
||||||
a\
|
s/\( YYFPRINTF *(\)stderr,/\1parser,/
|
||||||
#define yy_symbol_value_print(output, type, value, parser) yy_symbol_value_print(0, type, value, parser)
|
s/\( YYDPRINTF *((\)stderr,/\1parser,/
|
||||||
}
|
|
||||||
/^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/^\([ ]*\)\(yyerror[ ]*([ ]*parser,\)/\1parser_\2/
|
||||||
s!^ *extern char \*getenv();!/* & */!
|
s!^ *extern char \*getenv();!/* & */!
|
||||||
s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/
|
s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user