зеркало из https://github.com/github/ruby.git
tool/ytab.sed: Support some old bison implementations
At least, I confirmed bison 2.3 (because macOS uses the version). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5c0748b627
Коммит
4cc9894845
|
@ -14,10 +14,10 @@ a\
|
|||
}
|
||||
/^yydestruct.*yymsg/,/#endif/{
|
||||
/^yydestruct/{
|
||||
/parser/!{
|
||||
/p/!{
|
||||
H
|
||||
s/^/ruby_parser_&/
|
||||
s/)$/, parser)/
|
||||
s/)$/, p)/
|
||||
/\*/s/parser)$/struct parser_params *&/
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ a\
|
|||
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\
|
|||
x
|
||||
}
|
||||
/^yy_reduce_print/,/^}/{
|
||||
s/fprintf *(stderr,/YYFPRINTF (parser,/g
|
||||
s/fprintf *(stderr,/YYFPRINTF (p,/g
|
||||
}
|
||||
s/\( YYFPRINTF *(\)yyoutput,/\1p,/
|
||||
s/\( YYFPRINTF *(\)stderr,/\1p,/
|
||||
|
|
Загрузка…
Ссылка в новой задаче