diff options
author | Yuichiro Kaneko <spiketeika@gmail.com> | 2023-05-12 18:25:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 18:25:10 +0900 |
commit | a1b01e7701f9fc370f8dff777aad6d39a2c5a3e3 (patch) | |
tree | 69bb0c08c139f1c7c5abe9422649f11581f85529 /ext | |
parent | d314fe42f987fcfaad67f102ec418ee4ca32ee99 (diff) |
Use Lrama LALR parser generator instead of Bisonv3_3_0_preview1
https://bugs.ruby-lang.org/issues/19637
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7798
Merged-By: yui-knk <spiketeika@gmail.com>
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ripper/depend | 2 | ||||
-rw-r--r-- | ext/ripper/extconf.rb | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/ripper/depend b/ext/ripper/depend index 84deba62ed..9aba267533 100644 --- a/ext/ripper/depend +++ b/ext/ripper/depend @@ -1,6 +1,7 @@ GEN = $(srcdir)/tools/generate.rb SRC1 = $(top_srcdir)/parse.y SRC2 = $(srcdir)/eventids2.c +BISON = $(BASERUBY) $(top_srcdir)/tool/lrama/exe/lrama .SUFFIXES: .y @@ -10,6 +11,7 @@ ripper.o: ripper.c .y.c: $(ECHO) compiling compiler $< + $(ECHO) $(BISON) $(Q) $(BISON) -t -v -oy.tab.c $< $(Q) sed -e "/^#/s!y\.tab\.c!$@!" -f $(top_srcdir)/tool/ytab.sed y.tab.c > $@ @$(RM) y.tab.c diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb index 65cb5030d3..bff5d429c3 100644 --- a/ext/ripper/extconf.rb +++ b/ext/ripper/extconf.rb @@ -7,11 +7,11 @@ require 'rbconfig' def main yacc = ENV["YACC"] || "bison" - unless find_executable(yacc) - unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") - raise 'missing bison; abort' - end - end + # unless find_executable(yacc) + # unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") + # raise 'missing bison; abort' + # end + # end $objs = %w(ripper.o) $distcleanfiles.concat %w(ripper.y ripper.c eventids1.c eventids2table.c) $cleanfiles.concat %w(ripper.E ripper.output y.output .eventids2-check) |