From 6c3ed0d71cb1b59be5b2fbc886b5dd962ab74d35 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Oct 2019 21:36:59 +0900 Subject: [PATCH] Update the latest versions from upstream repository of racc --- ext/racc/cparse/extconf.rb | 2 +- lib/racc/exception.rb | 2 +- lib/racc/grammar.rb | 2 +- lib/racc/grammarfileparser.rb | 2 +- lib/racc/info.rb | 2 +- lib/racc/iset.rb | 2 +- lib/racc/logfilegenerator.rb | 2 +- lib/racc/parser-text.rb | 21 ++++++++++++--------- lib/racc/parserfilegenerator.rb | 2 +- lib/racc/state.rb | 2 +- 10 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ext/racc/cparse/extconf.rb b/ext/racc/cparse/extconf.rb index a9187b5bc4..47b455d992 100644 --- a/ext/racc/cparse/extconf.rb +++ b/ext/racc/cparse/extconf.rb @@ -1,5 +1,5 @@ # frozen_string_literal: false -# $Id$ +# $Id: a9187b5bc40e6adf05e7b6ee5b370b39a3429ecd $ require 'mkmf' diff --git a/lib/racc/exception.rb b/lib/racc/exception.rb index bd46fcb323..0069ca3443 100644 --- a/lib/racc/exception.rb +++ b/lib/racc/exception.rb @@ -1,5 +1,5 @@ # -# $Id: d5858363d1d4a4b5a2ca8d193b5153a49312188e $ +# $Id: ebb9798ad0b211e031670a12a1ab154678c1c8f3 $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/grammar.rb b/lib/racc/grammar.rb index cc4e48eed7..123f1f1834 100644 --- a/lib/racc/grammar.rb +++ b/lib/racc/grammar.rb @@ -1,5 +1,5 @@ # -# $Id: acc33b7e1fe05f28f2d271f1fb9f1c42e50705dc $ +# $Id: 3fcabd58bef02540bf78e8142469681cb9f975c2 $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index 488f3e6683..ff7c682f7d 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -1,5 +1,5 @@ # -# $Id: 5e1871defa15d288d2252e6a76bb2c4cf2119ed3 $ +# $Id: 0e355164c34f7baf8a813f76a138b8924ec3269a $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/info.rb b/lib/racc/info.rb index c688fed96c..3a6e7f6e60 100644 --- a/lib/racc/info.rb +++ b/lib/racc/info.rb @@ -1,5 +1,5 @@ # -# $Id: 10d9595b388ab1ba061c08c038901ff632a0c3c3 $ +# $Id: 8ab2cb5341529fe5e35956bb1a1f42ec9b9c6f5a $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/iset.rb b/lib/racc/iset.rb index 1e5fcf5d43..245bad8b50 100644 --- a/lib/racc/iset.rb +++ b/lib/racc/iset.rb @@ -1,5 +1,5 @@ # -# $Id: de638608cfd72d3ed9819d87b65a89ee6a57b589 $ +# $Id: 31aa4331c08dfd4609c06eb5f94b7ef38dc708e1 $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/logfilegenerator.rb b/lib/racc/logfilegenerator.rb index 05a4e0c691..68593c41f6 100644 --- a/lib/racc/logfilegenerator.rb +++ b/lib/racc/logfilegenerator.rb @@ -1,5 +1,5 @@ # -# $Id: a7e9663605afdda065d305b250a9805e3bd3fa70 $ +# $Id: 5e9d0a01b5d56fd9cdc3d5cb078b1a3e1bbaf779 $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/parser-text.rb b/lib/racc/parser-text.rb index 07ff41afaa..63ef3235c9 100644 --- a/lib/racc/parser-text.rb +++ b/lib/racc/parser-text.rb @@ -1,8 +1,7 @@ module Racc PARSER_TEXT = <<'__end_of_file__' -# -# $Id: 1c0ef52c0f41acc465725e9e44b5b9d74d392ba5 $ -# +# frozen_string_literal: false +#-- # Copyright (c) 1999-2006 Minero Aoki # # This program is free software. @@ -11,7 +10,7 @@ module Racc # As a special exception, when this code is copied by Racc # into a Racc output file, you may use that output file # without restriction. -# +#++ require 'racc/info' @@ -45,7 +44,7 @@ end # [--version] [--copyright] [--help] grammarfile # # [+filename+] -# Racc grammar file. Any extention is permitted. +# Racc grammar file. Any extension is permitted. # [-o+outfile+, --output-file=+outfile+] # A filename for output. default is <+filename+>.tab.rb # [-O+filename+, --log-file=+filename+] @@ -189,10 +188,10 @@ module Racc class Parser Racc_Runtime_Version = ::Racc::VERSION - Racc_Runtime_Revision = '$Id: 1c0ef52c0f41acc465725e9e44b5b9d74d392ba5 $' + Racc_Runtime_Revision = '$Id: 87af5c09d4467cae567837b4162ec2145417a90e $' Racc_Runtime_Core_Version_R = ::Racc::VERSION - Racc_Runtime_Core_Revision_R = '$Id: 1c0ef52c0f41acc465725e9e44b5b9d74d392ba5 $'.split[1] + Racc_Runtime_Core_Revision_R = '$Id: 87af5c09d4467cae567837b4162ec2145417a90e $'.split[1] begin if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' require 'racc/cparse-jruby.jar' @@ -269,9 +268,11 @@ puts $!.backtrace # def next_token # @q.shift # end + class_eval %{ def do_parse - __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) + #{Racc_Main_Parsing_Routine}(_racc_setup(), false) end + } # The method to fetch next token. # If you use #do_parse method, you must implement #next_token. @@ -329,9 +330,11 @@ puts $!.backtrace # # RECEIVER#METHOD_ID is a method to get next token. # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE]. + class_eval %{ def yyparse(recv, mid) - __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), false) + #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true) end + } def _racc_yyparse_rb(recv, mid, arg, c_debug) action_table, action_check, action_default, action_pointer, diff --git a/lib/racc/parserfilegenerator.rb b/lib/racc/parserfilegenerator.rb index 35c6357576..b4fac62ce5 100644 --- a/lib/racc/parserfilegenerator.rb +++ b/lib/racc/parserfilegenerator.rb @@ -1,5 +1,5 @@ # -# $Id: 19fb5debfd07d70f6bc2ddc79ef43fbb3d27f15e $ +# $Id: 67117a7ef68abc59a11abce2b42084f65cddb2ca $ # # Copyright (c) 1999-2006 Minero Aoki # diff --git a/lib/racc/state.rb b/lib/racc/state.rb index 814d14d333..51b1d83664 100644 --- a/lib/racc/state.rb +++ b/lib/racc/state.rb @@ -1,5 +1,5 @@ # -# $Id: a101d6acb72abc392f7757cda89bf6f0a683a43d $ +# $Id: 6bd3136439c94cb8d928917f5e0de9c593181527 $ # # Copyright (c) 1999-2006 Minero Aoki #