diff options
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/ytab.sed | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tool/ytab.sed b/tool/ytab.sed index d75367abed..92f8218202 100755 --- a/tool/ytab.sed +++ b/tool/ytab.sed @@ -5,6 +5,26 @@ i\ a\ #endif } -s/^[ ]*\(yyerror[ ]*([ ]*parser,\)/parser_\1/ +/^yydestruct/,/#endif/{ + /^yydestruct/{ + /parser/!{ + h + s/^/ruby_parser_&/ + s/)$/, parser)/ + /\*/s/parser)$/struct parser_params *&/ + } + } + /^#endif/{ + x + /^./{ + i\ + struct parser_params *parser; + a\ +#define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser) + } + x + } +} +s/^\([ ]*\)\(yyerror[ ]*([ ]*parser,\)/\1parser_\2/ s!^ *extern char \*getenv();!/* & */! s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/ |