Use LRAMA instead of YACC

This commit is contained in:
ydah 2025-01-12 19:30:06 +09:00 committed by Yudai Takada
parent eafba0d5d3
commit ccb4ba45ed
Notes: git 2025-01-14 08:20:22 +00:00
4 changed files with 8 additions and 8 deletions

View File

@ -1070,7 +1070,7 @@ PHONY:
{$(srcdir)}.y.c: {$(srcdir)}.y.c:
$(ECHO) generating $@ $(ECHO) generating $@
$(Q)$(BASERUBY) $(tooldir)/id2token.rb $(SRC_FILE) | \ $(Q)$(BASERUBY) $(tooldir)/id2token.rb $(SRC_FILE) | \
$(YACC) $(YFLAGS) -o$@ -H$*.h - parse.y $(LRAMA) $(YFLAGS) -o$@ -H$*.h - parse.y
$(PLATFORM_D): $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D) $(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)

View File

@ -29,7 +29,7 @@ CPP = @CPP@
LD = @LD@ LD = @LD@
RUSTC = @RUSTC@ RUSTC = @RUSTC@
CARGO = @CARGO@ CARGO = @CARGO@
YACC = $(BASERUBY) $(tooldir)/lrama/exe/lrama LRAMA = $(BASERUBY) $(tooldir)/lrama/exe/lrama
PURIFY = PURIFY =
AUTOCONF = autoconf AUTOCONF = autoconf
CONFIGURE = @CONFIGURE@ CONFIGURE = @CONFIGURE@

View File

@ -72,7 +72,7 @@ GITURL = URI.parse("https://github.com/ruby/ruby.git")
RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/ RUBY_VERSION_PATTERN = /^\#define\s+RUBY_VERSION\s+"([\d.]+)"/
ENV["VPATH"] ||= "include/ruby" ENV["VPATH"] ||= "include/ruby"
YACC = ENV["YACC"] ||= "#{$tooldir}/lrama/exe/lrama" LRAMA = ENV["LRAMA"] ||= "#{$tooldir}/lrama/exe/lrama"
ENV["BASERUBY"] ||= "ruby" ENV["BASERUBY"] ||= "ruby"
ENV["RUBY"] ||= "ruby" ENV["RUBY"] ||= "ruby"
ENV["MV"] ||= "mv" ENV["MV"] ||= "mv"
@ -118,7 +118,7 @@ $digests ||= DIGESTS
$patch_file &&= File.expand_path($patch_file) $patch_file &&= File.expand_path($patch_file)
path = ENV["PATH"].split(File::PATH_SEPARATOR) path = ENV["PATH"].split(File::PATH_SEPARATOR)
%w[YACC BASERUBY RUBY MV MINIRUBY].each do |var| %w[LRAMA BASERUBY RUBY MV MINIRUBY].each do |var|
cmd, = ENV[var].shellsplit cmd, = ENV[var].shellsplit
unless path.any? {|dir| unless path.any? {|dir|
file = File.expand_path(cmd, dir) file = File.expand_path(cmd, dir)
@ -514,7 +514,7 @@ touch-unicode-files:
end end
print "prerequisites" print "prerequisites"
else else
system(*%W"#{YACC} -o parse.c parse.y") system(*%W"#{LRAMA} -o parse.c parse.y")
end end
vcs.after_export(".") if exported vcs.after_export(".") if exported
clean.concat(Dir.glob("ext/**/autom4te.cache")) clean.concat(Dir.glob("ext/**/autom4te.cache"))

View File

@ -105,8 +105,8 @@ CC = cl -nologo
!if !defined(CPP) || "$(CPP)" == "cl" !if !defined(CPP) || "$(CPP)" == "cl"
CPP = $(CC) -E CPP = $(CC) -E
!endif !endif
!if !defined(YACC) !if !defined(LRAMA)
YACC = $(BASERUBY) $(top_srcdir)/tool/lrama/exe/lrama LRAMA = $(BASERUBY) $(top_srcdir)/tool/lrama/exe/lrama
!endif !endif
AR = lib -nologo AR = lib -nologo
PURIFY = PURIFY =
@ -1040,7 +1040,7 @@ s,@CC@,$(CC),;t t
s,@CPP@,$(CPP),;t t s,@CPP@,$(CPP),;t t
s,@CXX@,$$(CC),;t t s,@CXX@,$$(CC),;t t
s,@LD@,$$(CC),;t t s,@LD@,$$(CC),;t t
s,@YACC@,$(YACC),;t t s,@LRAMA@,$(LRAMA),;t t
s,@RANLIB@,,;t t s,@RANLIB@,,;t t
s,@AR@,$(AR),;t t s,@AR@,$(AR),;t t
s,@ARFLAGS@,$(ARFLAGS),;t t s,@ARFLAGS@,$(ARFLAGS),;t t