diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-15 02:47:05 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-15 02:47:05 +0000 |
commit | b73d1fbd2518c4d06ab245c7999dffa579d2b4f9 (patch) | |
tree | 930126484d3188993442eea72c47f06833505504 /lib/racc/parser.rb | |
parent | 8a6ebf4c513cbc6be7a8b099eedc7ab4e149d0b6 (diff) |
* lib/racc/parser.rb (do_parse, yyparse): using class eval to define
method and avoid __send__.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/racc/parser.rb')
-rw-r--r-- | lib/racc/parser.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/racc/parser.rb b/lib/racc/parser.rb index 887fa8c553..737b0fda5d 100644 --- a/lib/racc/parser.rb +++ b/lib/racc/parser.rb @@ -30,10 +30,10 @@ module Racc class Parser - Racc_Runtime_Version = '1.4.5' + Racc_Runtime_Version = '1.4.6' Racc_Runtime_Revision = %w$originalRevision: 1.8 $[1] - Racc_Runtime_Core_Version_R = '1.4.5' + Racc_Runtime_Core_Version_R = '1.4.6' Racc_Runtime_Core_Revision_R = %w$originalRevision: 1.8 $[1] begin require 'racc/cparse' @@ -95,9 +95,11 @@ module Racc ### do_parse ### + class_eval %{ def do_parse - __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) + #{Racc_Main_Parsing_Routine}(_racc_setup(), false) end + } def next_token raise NotImplementedError, "#{self.class}\#next_token is not defined" @@ -147,9 +149,11 @@ module Racc ### yyparse ### + class_eval %{ def yyparse(recv, mid) - __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true) + #{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, |