1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update the latest versions from upstream repository of racc

This commit is contained in:
Hiroshi SHIBATA 2019-10-30 21:36:59 +09:00
parent e6d611ad37
commit 6c3ed0d71c
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
10 changed files with 21 additions and 18 deletions

View file

@ -1,5 +1,5 @@
# frozen_string_literal: false # frozen_string_literal: false
# $Id$ # $Id: a9187b5bc40e6adf05e7b6ee5b370b39a3429ecd $
require 'mkmf' require 'mkmf'

View file

@ -1,5 +1,5 @@
# #
# $Id: d5858363d1d4a4b5a2ca8d193b5153a49312188e $ # $Id: ebb9798ad0b211e031670a12a1ab154678c1c8f3 $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: acc33b7e1fe05f28f2d271f1fb9f1c42e50705dc $ # $Id: 3fcabd58bef02540bf78e8142469681cb9f975c2 $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: 5e1871defa15d288d2252e6a76bb2c4cf2119ed3 $ # $Id: 0e355164c34f7baf8a813f76a138b8924ec3269a $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: 10d9595b388ab1ba061c08c038901ff632a0c3c3 $ # $Id: 8ab2cb5341529fe5e35956bb1a1f42ec9b9c6f5a $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: de638608cfd72d3ed9819d87b65a89ee6a57b589 $ # $Id: 31aa4331c08dfd4609c06eb5f94b7ef38dc708e1 $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: a7e9663605afdda065d305b250a9805e3bd3fa70 $ # $Id: 5e9d0a01b5d56fd9cdc3d5cb078b1a3e1bbaf779 $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,8 +1,7 @@
module Racc module Racc
PARSER_TEXT = <<'__end_of_file__' PARSER_TEXT = <<'__end_of_file__'
# # frozen_string_literal: false
# $Id: 1c0ef52c0f41acc465725e9e44b5b9d74d392ba5 $ #--
#
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #
# This program is free software. # This program is free software.
@ -11,7 +10,7 @@ module Racc
# As a special exception, when this code is copied by Racc # As a special exception, when this code is copied by Racc
# into a Racc output file, you may use that output file # into a Racc output file, you may use that output file
# without restriction. # without restriction.
# #++
require 'racc/info' require 'racc/info'
@ -45,7 +44,7 @@ end
# [--version] [--copyright] [--help] <var>grammarfile</var> # [--version] [--copyright] [--help] <var>grammarfile</var>
# #
# [+filename+] # [+filename+]
# Racc grammar file. Any extention is permitted. # Racc grammar file. Any extension is permitted.
# [-o+outfile+, --output-file=+outfile+] # [-o+outfile+, --output-file=+outfile+]
# A filename for output. default is <+filename+>.tab.rb # A filename for output. default is <+filename+>.tab.rb
# [-O+filename+, --log-file=+filename+] # [-O+filename+, --log-file=+filename+]
@ -189,10 +188,10 @@ module Racc
class Parser class Parser
Racc_Runtime_Version = ::Racc::VERSION 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_Version_R = ::Racc::VERSION
Racc_Runtime_Core_Revision_R = '$Id: 1c0ef52c0f41acc465725e9e44b5b9d74d392ba5 $'.split[1] Racc_Runtime_Core_Revision_R = '$Id: 87af5c09d4467cae567837b4162ec2145417a90e $'.split[1]
begin begin
if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby' if Object.const_defined?(:RUBY_ENGINE) and RUBY_ENGINE == 'jruby'
require 'racc/cparse-jruby.jar' require 'racc/cparse-jruby.jar'
@ -269,9 +268,11 @@ puts $!.backtrace
# def next_token # def next_token
# @q.shift # @q.shift
# end # end
class_eval %{
def do_parse def do_parse
__send__(Racc_Main_Parsing_Routine, _racc_setup(), false) #{Racc_Main_Parsing_Routine}(_racc_setup(), false)
end end
}
# The method to fetch next token. # The method to fetch next token.
# If you use #do_parse method, you must implement #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. # RECEIVER#METHOD_ID is a method to get next token.
# It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE]. # It must 'yield' the token, which format is [TOKEN-SYMBOL, VALUE].
class_eval %{
def yyparse(recv, mid) def yyparse(recv, mid)
__send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), false) #{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), true)
end end
}
def _racc_yyparse_rb(recv, mid, arg, c_debug) def _racc_yyparse_rb(recv, mid, arg, c_debug)
action_table, action_check, action_default, action_pointer, action_table, action_check, action_default, action_pointer,

View file

@ -1,5 +1,5 @@
# #
# $Id: 19fb5debfd07d70f6bc2ddc79ef43fbb3d27f15e $ # $Id: 67117a7ef68abc59a11abce2b42084f65cddb2ca $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #

View file

@ -1,5 +1,5 @@
# #
# $Id: a101d6acb72abc392f7757cda89bf6f0a683a43d $ # $Id: 6bd3136439c94cb8d928917f5e0de9c593181527 $
# #
# Copyright (c) 1999-2006 Minero Aoki # Copyright (c) 1999-2006 Minero Aoki
# #