diff options
Diffstat (limited to 'lib/racc/parser-text.rb')
-rw-r--r-- | lib/racc/parser-text.rb | 21 |
1 files changed, 12 insertions, 9 deletions
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] <var>grammarfile</var> # # [+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, |