mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
d5a3389886
bison with sed. [ruby-dev:32204] * ruby.c (proc_options): use yydebug in cmdline_options. * ruby.c (process_options): set yydebug flag of parser. * parse.y (yydebug): moved into struct parser_params. * parse.y (rb_parser_get_yydebug, rb_parser_set_yydebug): parser generic methods. * */Makefile.sub (parse.c): moved to common.mk. * tool/ytab.sed: comment out yydebug definition, and substitute yyerror with parser_yyerror. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
10 lines
181 B
Sed
Executable file
10 lines
181 B
Sed
Executable file
#!/bin/sed -f
|
|
/^int yydebug;/{
|
|
i\
|
|
#ifndef yydebug
|
|
a\
|
|
#endif
|
|
}
|
|
s/\<\(yyerror[ ]*([ ]*parser,\)/parser_\1/
|
|
s!^ *extern char \*getenv();!/* & */!
|
|
s/^\(#.*\)".*\.tab\.c"/\1"parse.c"/
|