ruby-changes:49707
From: mame <ko1@a...>
Date: Mon, 15 Jan 2018 09:45:32 +0900 (JST)
Subject: [ruby-changes:49707] mame:r61824 (trunk): tool/ytab.sed: Support some old bison implementations
mame 2018-01-15 09:45:26 +0900 (Mon, 15 Jan 2018) New Revision: 61824 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61824 Log: tool/ytab.sed: Support some old bison implementations At least, I confirmed bison 2.3 (because macOS uses the version). Modified files: trunk/tool/ytab.sed Index: tool/ytab.sed =================================================================== --- tool/ytab.sed (revision 61823) +++ tool/ytab.sed (revision 61824) @@ -14,10 +14,10 @@ a\ https://github.com/ruby/ruby/blob/trunk/tool/ytab.sed#L14 } /^yydestruct.*yymsg/,/#endif/{ /^yydestruct/{ - /parser/!{ + /p/!{ H s/^/ruby_parser_&/ - s/)$/, parser)/ + s/)$/, p)/ /\*/s/parser)$/struct parser_params *&/ } } @@ -25,9 +25,9 @@ a\ https://github.com/ruby/ruby/blob/trunk/tool/ytab.sed#L25 x /yydestruct/{ i\ - struct parser_params *parser; + struct parser_params *p; a\ -#define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, parser) +#define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p) } x } @@ -49,7 +49,7 @@ a\ https://github.com/ruby/ruby/blob/trunk/tool/ytab.sed#L49 x } /^yy_reduce_print/,/^}/{ - s/fprintf *(stderr,/YYFPRINTF (parser,/g + s/fprintf *(stderr,/YYFPRINTF (p,/g } s/\( YYFPRINTF *(\)yyoutput,/\1p,/ s/\( YYFPRINTF *(\)stderr,/\1p,/ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/