ruby-changes:49709
From: nobu <ko1@a...>
Date: Mon, 15 Jan 2018 11:23:33 +0900 (JST)
Subject: [ruby-changes:49709] nobu:r61826 (trunk): more ytab.sed fixes
nobu 2018-01-15 11:23:24 +0900 (Mon, 15 Jan 2018) New Revision: 61826 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61826 Log: more ytab.sed fixes * tool/ytab.sed: `p` is too short to distinguish alone from other names. fix for more old bison which does not support %lex-param at yydestruct. add `p` argument to non-prototype declaration of yy_stack_print. Modified files: trunk/tool/ytab.sed Index: tool/ytab.sed =================================================================== --- tool/ytab.sed (revision 61825) +++ tool/ytab.sed (revision 61826) @@ -14,7 +14,7 @@ a\ https://github.com/ruby/ruby/blob/trunk/tool/ytab.sed#L14 } /^yydestruct.*yymsg/,/#endif/{ /^yydestruct/{ - /p/!{ + /[, *]p)/!{ H s/^/ruby_parser_&/ s/)$/, p)/ @@ -25,18 +25,28 @@ a\ https://github.com/ruby/ruby/blob/trunk/tool/ytab.sed#L25 x /yydestruct/{ i\ - struct parser_params *p; +\ struct parser_params *p; a\ #define yydestruct(m, t, v) ruby_parser_yydestruct(m, t, v, p) } x } } -/^yy_stack_print/{ - /parser/!{ - H - s/)$/, p)/ - /\*/s/p)$/struct parser_params *&/ +/^yy_stack_print /,/#endif/{ + /^yy_stack_print/{ + /[, *]p)/!{ + H + s/)$/, p)/ + /\*/s/p)$/struct parser_params *&/ + } + } + /^#endif/{ + x + /yy_stack_print/{ + i\ +\ struct parser_params *p; + } + x } } /yy_stack_print.*;/{ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/