mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
Generate parser-text.rb with bcdc058e50
This commit is contained in:
parent
bcdc058e50
commit
048751dd73
1 changed files with 4 additions and 4 deletions
|
@ -262,11 +262,11 @@ module Racc
|
||||||
# def next_token
|
# def next_token
|
||||||
# @q.shift
|
# @q.shift
|
||||||
# end
|
# end
|
||||||
class_eval %{
|
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
||||||
def do_parse
|
def do_parse
|
||||||
#{Racc_Main_Parsing_Routine}(_racc_setup(), false)
|
#{Racc_Main_Parsing_Routine}(_racc_setup(), false)
|
||||||
end
|
end
|
||||||
}
|
RUBY
|
||||||
|
|
||||||
# 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.
|
||||||
|
@ -324,11 +324,11 @@ module Racc
|
||||||
#
|
#
|
||||||
# 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 %{
|
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
||||||
def yyparse(recv, mid)
|
def yyparse(recv, mid)
|
||||||
#{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
|
#{Racc_YY_Parse_Method}(recv, mid, _racc_setup(), false)
|
||||||
end
|
end
|
||||||
}
|
RUBY
|
||||||
|
|
||||||
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,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue