зеркало из https://github.com/github/ruby.git
Preprocess for older bison is no longer needed
This commit is contained in:
Родитель
5a4d9f91c4
Коммит
b7504af8fc
|
@ -956,8 +956,6 @@ PHONY:
|
|||
{$(srcdir)}.y.c:
|
||||
$(ECHO) generating $@
|
||||
$(Q)$(BASERUBY) $(tooldir)/id2token.rb $(SRC_FILE) > parse.tmp.y
|
||||
$(Q)$(BASERUBY) $(tooldir)/pure_parser.rb parse.tmp.y $(YACC)
|
||||
$(Q)$(RM) parse.tmp.y.bak
|
||||
$(Q)$(YACC) -d $(YFLAGS) -o y.tab.c parse.tmp.y
|
||||
$(Q)$(RM) parse.tmp.y
|
||||
$(Q)sed -f $(tooldir)/ytab.sed -e "/^#/s|parse\.tmp\.[iy]|$(SRC_FILE)|" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
|
||||
|
|
|
@ -20,8 +20,6 @@ static: check
|
|||
ripper.y: $(srcdir)/tools/preproc.rb $(srcdir)/tools/dsl.rb $(top_srcdir)/parse.y $(top_srcdir)/defs/id.def
|
||||
$(ECHO) extracting $@ from $(top_srcdir)/parse.y
|
||||
$(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb $(top_srcdir)/parse.y > ripper.tmp.y
|
||||
$(Q) $(RUBY) $(top_srcdir)/tool/pure_parser.rb ripper.tmp.y $(BISON)
|
||||
$(Q) $(RM) ripper.tmp.y.bak
|
||||
$(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@
|
||||
$(Q) $(RM) ripper.tmp.y
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/ruby -pi.bak
|
||||
BEGIN {
|
||||
# pathological setting
|
||||
ENV['LANG'] = ENV['LC_MESSAGES'] = ENV['LC_ALL'] = 'C'
|
||||
|
||||
require_relative 'lib/colorize'
|
||||
|
||||
colorize = Colorize.new
|
||||
file = ARGV.shift
|
||||
begin
|
||||
version = IO.popen(ARGV+%w[--version], "rb", &:read)
|
||||
rescue Errno::ENOENT
|
||||
abort "Failed to run `#{colorize.fail ARGV.join(' ')}'; You may have to install it."
|
||||
end
|
||||
unless /\Abison .* (\d+)\.\d+/ =~ version
|
||||
puts colorize.fail("not bison")
|
||||
exit
|
||||
end
|
||||
exit if $1.to_i >= 3
|
||||
ARGV.clear
|
||||
ARGV.push(file)
|
||||
}
|
||||
$_.sub!(/^%define\s+api\.pure/, '%pure-parser')
|
||||
$_.sub!(/^%define\s+.*/, '')
|
Загрузка…
Ссылка в новой задаче