diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 02:23:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-15 02:23:24 +0000 |
commit | 630ab3b925cd8b6e3c94250bb7c970d80604dcdc (patch) | |
tree | e11e9131055aec4182f5ca10e3e16eb37cdb0070 /tool/ytab.sed | |
parent | 5f3ddb32c7d76d93e88b0758ac9e5a66380adc2a (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ytab.sed')
-rwxr-xr-x | tool/ytab.sed | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tool/ytab.sed b/tool/ytab.sed index f232daf5aa..75a8785b60 100755 --- a/tool/ytab.sed +++ b/tool/ytab.sed @@ -14,7 +14,7 @@ a\ } /^yydestruct.*yymsg/,/#endif/{ /^yydestruct/{ - /p/!{ + /[, *]p)/!{ H s/^/ruby_parser_&/ s/)$/, p)/ @@ -25,18 +25,28 @@ a\ 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.*;/{ |