home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ruby164.zip / rbemx164.zip / ruby / share / doc / rdtool-0.6.10 / missing / rd / rdblockparser.tab.rb next >
Text File  |  2001-06-07  |  37KB  |  1,517 lines

  1. #
  2. # missing/rd/rdblockparser.tab.rb: generated by racc (runtime embedded)
  3. #
  4.  
  5. ###### racc/parser.rb
  6.  
  7. unless $".index 'racc/parser.rb' then
  8. $".push 'racc/parser.rb'
  9.  
  10. type.module_eval <<'..end /usr/local/lib/ruby/site_ruby/1.7/racc/parser.rb modeval..ida2ed1007f7', '/usr/local/lib/ruby/site_ruby/1.7/racc/parser.rb', 1
  11. #
  12. # parser.rb
  13. #
  14. #   Copyright (c) 1999-2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
  15. #
  16. #   This program is free software.
  17. #   You can distribute/modify this program under the terms of
  18. #   the GNU Lesser General Public License version 2 or later.
  19. #
  20. #   As a special exception, when this code is copied by Racc
  21. #   into a Racc output file, you may use that output file
  22. #   without restriction.
  23. #
  24.  
  25. module Racc
  26.   class ParseError < StandardError; end
  27. end
  28. unless defined? ParseError then
  29.   ParseError = Racc::ParseError
  30. end
  31.  
  32.  
  33. module Racc
  34.  
  35.   class Parser
  36.  
  37.     private
  38.  
  39.  
  40.     begin
  41.       if defined? Racc_Debug_Ruby_Parser then
  42.         raise LoadError, 'debug ruby routine'
  43.       end
  44.       require 'racc/cparse'
  45.       unless new.respond_to? :_racc_do_parse_c, true then
  46.         raise LoadError, 'old cparse.so'
  47.       end
  48.       Racc_Main_Parsing_Routine = :_racc_do_parse_c
  49.       Racc_YY_Parse_Method      = :_racc_yyparse_c
  50.     rescue LoadError
  51.       Racc_Main_Parsing_Routine = :_racc_do_parse_rb
  52.       Racc_YY_Parse_Method      = :_racc_yyparse_rb
  53.     end
  54.  
  55.     Racc_ruby_parser_version = '1.3.9'
  56.     Racc_parser_version = Racc_ruby_parser_version
  57.  
  58.     def self.racc_runtime_type
  59.       if Racc_Main_Parsing_Routine == :_racc_do_parse_c then
  60.         'c'
  61.       else
  62.         'ruby'
  63.       end
  64.     end
  65.  
  66.  
  67.     def _racc_setup
  68.       t = self.type
  69.  
  70.       unless t::Racc_debug_parser then
  71.         @yydebug = false
  72.       end
  73.       @yydebug = false unless defined? @yydebug
  74.  
  75.       if @yydebug then
  76.         @racc_debug_out = $stderr unless defined? @racc_debug_out
  77.         @racc_debug_out ||= $stderr
  78.       end
  79.  
  80.       arg = t::Racc_arg
  81.       if arg.size < 14 then
  82.         arg[13] = true
  83.       end
  84.       arg
  85.     end
  86.  
  87.     def _racc_init_sysvars
  88.       @racc_state = [ 0 ]
  89.       @racc_tstack = []
  90.       @racc_vstack = []
  91.  
  92.       @racc_t = nil
  93.       @racc_val = nil
  94.  
  95.       @racc_read_next = true
  96.  
  97.       @racc_user_yyerror = false
  98.       @racc_error_status = 0
  99.     end
  100.  
  101.  
  102.     ###
  103.     ### do_parse
  104.     ###
  105.  
  106.     def do_parse
  107.       __send__ Racc_Main_Parsing_Routine, _racc_setup(), false
  108.     end
  109.  
  110.     def next_token
  111.       raise NotImplementError, "#{self.type}\#next_token must be defined"
  112.     end
  113.  
  114.     def _racc_do_parse_rb( arg, in_debug )
  115.       action_table, action_check, action_default, action_pointer,
  116.       goto_table,   goto_check,   goto_default,   goto_pointer,
  117.       nt_base,      reduce_table, token_table,    shift_n,
  118.       reduce_n,     use_result,   * = arg
  119.  
  120.       _racc_init_sysvars
  121.       tok = act = i = nil
  122.       nerr = 0
  123.  
  124.  
  125.       catch( :racc_end_parse ) {
  126.       while true do
  127.  
  128.         if i = action_pointer[ @racc_state[-1] ] then
  129.           if @racc_read_next then
  130.             if @racc_t != 0 then   # not EOF
  131.               tok, @racc_val = next_token()
  132.               unless tok then   # EOF
  133.                 @racc_t = 0
  134.               else
  135.                 @racc_t = (token_table[tok] or 1)   # error token
  136.               end
  137.               racc_read_token( @racc_t, tok, @racc_val ) if @yydebug
  138.  
  139.               @racc_read_next = false
  140.             end
  141.           end
  142.           i += @racc_t
  143.           if i >= 0 and act = action_table[i] and
  144.              action_check[i] == @racc_state[-1] then
  145.             ;
  146.           else
  147.             act = action_default[ @racc_state[-1] ]
  148.           end
  149.         else
  150.           act = action_default[ @racc_state[-1] ]
  151.         end
  152.  
  153.         while act = _racc_evalact( act, arg ) do end
  154.  
  155.       end
  156.       }
  157.     end
  158.  
  159.  
  160.     ###
  161.     ### yyparse
  162.     ###
  163.  
  164.     def yyparse( recv, mid )
  165.       __send__ Racc_YY_Parse_Method, recv, mid, _racc_setup(), true
  166.     end
  167.  
  168.     def _racc_yyparse_rb( recv, mid, arg, c_debug )
  169.       action_table, action_check, action_default, action_pointer,
  170.       goto_table,   goto_check,   goto_default,   goto_pointer,
  171.       nt_base,      reduce_table, token_table,    shift_n,
  172.       reduce_n,     use_result,   * = arg
  173.  
  174.       _racc_init_sysvars
  175.       tok = nil
  176.       act = nil
  177.       i = nil
  178.       nerr = 0
  179.  
  180.  
  181.       catch( :racc_end_parse ) {
  182.         until i = action_pointer[ @racc_state[-1] ] do
  183.           while act = _racc_evalact(
  184.                   action_default[ @racc_state[-1] ], arg ) do end
  185.         end
  186.  
  187.         recv.__send__( mid ) do |tok, val|
  188. # $stderr.puts "rd: tok=#{tok}, val=#{val}"
  189.           unless tok then
  190.             @racc_t = 0
  191.           else
  192.             @racc_t = (token_table[tok] or 1)   # error token
  193.           end
  194.           @racc_val = val
  195.           @racc_read_next = false
  196.  
  197.           i += @racc_t
  198.           if i >= 0 and act = action_table[i] and
  199.              action_check[i] == @racc_state[-1] then
  200. # $stderr.puts "01: act=#{act}"
  201.           else
  202.             act = action_default[ @racc_state[-1] ]
  203. # $stderr.puts "02: act=#{act}"
  204. # $stderr.puts "curstate=#{@racc_state[-1]}"
  205.           end
  206.  
  207.           while act = _racc_evalact( act, arg ) do end
  208.  
  209.           while not (i = action_pointer[ @racc_state[-1] ]) or
  210.                 not @racc_read_next or
  211.                 @racc_t == 0 do   # $
  212.             if i and i += @racc_t and
  213.                i >= 0 and
  214.                act = action_table[i] and
  215.                action_check[i] == @racc_state[-1] then
  216. # $stderr.puts "03: act=#{act}"
  217.               ;
  218.             else
  219. # $stderr.puts "04: act=#{act}"
  220.               act = action_default[ @racc_state[-1] ]
  221.             end
  222.  
  223.             while act = _racc_evalact( act, arg ) do end
  224.           end
  225.         end
  226.       }
  227.     end
  228.  
  229.  
  230.     ###
  231.     ### common
  232.     ###
  233.  
  234.     def _racc_evalact( act, arg )
  235. # $stderr.puts "ea: act=#{act}"
  236.       action_table, action_check, action_default, action_pointer,
  237.       goto_table,   goto_check,   goto_default,   goto_pointer,
  238.       nt_base,      reduce_table, token_table,    shift_n,
  239.       reduce_n,     use_result,   * = arg
  240. nerr = 0   # tmp
  241.  
  242.       if act > 0 and act < shift_n then
  243.         #
  244.         # shift
  245.         #
  246.  
  247.         if @racc_error_status > 0 then
  248.           @racc_error_status -= 1 unless @racc_t == 1   # error token
  249.         end
  250.  
  251.         @racc_vstack.push @racc_val
  252.         @racc_state.push act
  253.         @racc_read_next = true
  254.  
  255.         if @yydebug then
  256.           @racc_tstack.push @racc_t
  257.           racc_shift( @racc_t, @racc_tstack, @racc_vstack )
  258.         end
  259.  
  260.       elsif act < 0 and act > -reduce_n then
  261.         #
  262.         # reduce
  263.         #
  264.  
  265.         code = catch( :racc_jump ) {
  266.           @racc_state.push _racc_do_reduce( arg, act )
  267.           false
  268.         }
  269.         if code then
  270.           case code
  271.           when 1 # yyerror
  272.             @racc_user_yyerror = true   # user_yyerror
  273.             return -reduce_n
  274.           when 2 # yyaccept
  275.             return shift_n
  276.           else
  277.             raise RuntimeError, '[Racc Bug] unknown jump code'
  278.           end
  279.         end
  280.  
  281.       elsif act == shift_n then
  282.         #
  283.         # accept
  284.         #
  285.  
  286.         racc_accept if @yydebug
  287.         throw :racc_end_parse, @racc_vstack[0]
  288.  
  289.       elsif act == -reduce_n then
  290.         #
  291.         # error
  292.         #
  293.  
  294.         case @racc_error_status
  295.         when 0
  296.           unless arg[21] then   # user_yyerror
  297.             nerr += 1
  298.             on_error @racc_t, @racc_val, @racc_vstack
  299.           end
  300.         when 3
  301.           if @racc_t == 0 then   # is $
  302.             throw :racc_end_parse, nil
  303.           end
  304.           @racc_read_next = true
  305.         end
  306.         @racc_user_yyerror = false
  307.         @racc_error_status = 3
  308.  
  309.         while true do
  310.           if i = action_pointer[ @racc_state[-1] ] then
  311.             i += 1   # error token
  312.             if i >= 0 and
  313.                (act = action_table[i]) and
  314.                action_check[i] == @racc_state[-1]  then
  315.                break
  316.             end
  317.           end
  318.  
  319.           throw :racc_end_parse, nil if @racc_state.size < 2
  320.           @racc_state.pop
  321.           @racc_vstack.pop
  322.           if @yydebug then
  323.             @racc_tstack.pop
  324.             racc_e_pop( @racc_state, @racc_tstack, @racc_vstack )
  325.           end
  326.         end
  327.  
  328.         return act
  329.  
  330.       else
  331.         raise RuntimeError, "[Racc Bug] unknown action #{act.inspect}"
  332.       end
  333.  
  334.       racc_next_state( @racc_state[-1], @racc_state ) if @yydebug
  335.  
  336.       nil
  337.     end
  338.  
  339.     def _racc_do_reduce( arg, act )
  340.       action_table, action_check, action_default, action_pointer,
  341.       goto_table,   goto_check,   goto_default,   goto_pointer,
  342.       nt_base,      reduce_table, token_table,    shift_n,
  343.       reduce_n,     use_result,   * = arg
  344.       state = @racc_state
  345.       vstack = @racc_vstack
  346.       tstack = @racc_tstack
  347.  
  348.       i = act * -3
  349.       len       = reduce_table[i]
  350.       reduce_to = reduce_table[i+1]
  351.       method_id = reduce_table[i+2]
  352.       void_array = []
  353.  
  354.       tmp_t = tstack[ -len, len ] if @yydebug
  355.       tmp_v = vstack[ -len, len ]
  356.       tstack[ -len, len ] = void_array if @yydebug
  357.       vstack[ -len, len ] = void_array
  358.       state[ -len, len ]  = void_array
  359.  
  360.       # tstack must be updated AFTER method call
  361.       if use_result then
  362.         vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0])
  363.       else
  364.         vstack.push __send__(method_id, tmp_v, vstack)
  365.       end
  366.       tstack.push reduce_to
  367.  
  368.       racc_reduce( tmp_t, reduce_to, tstack, vstack ) if @yydebug
  369.  
  370.       k1 = reduce_to - nt_base
  371.       if i = goto_pointer[ k1 ] then
  372.         i += state[-1]
  373.         if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 then
  374.           return curstate
  375.         end
  376.       end
  377.       goto_default[ k1 ]
  378.     end
  379.  
  380.     def on_error( t, val, vstack )
  381.       raise ParseError, sprintf("\nparse error on value %s (%s)",
  382.                                 val.inspect,
  383.                                 token_to_str(t) || '?')
  384.     end
  385.  
  386.     def yyerror
  387.       throw :racc_jump, 1
  388.     end
  389.  
  390.     def yyaccept
  391.       throw :racc_jump, 2
  392.     end
  393.  
  394.     def yyerrok
  395.       @racc_error_status = 0
  396.     end
  397.  
  398.  
  399.     # for debugging output
  400.  
  401.     def racc_read_token( t, tok, val )
  402.       @racc_debug_out.print 'read    '
  403.       @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') '
  404.       @racc_debug_out.puts val.inspect
  405.       @racc_debug_out.puts
  406.     end
  407.  
  408.     def racc_shift( tok, tstack, vstack )
  409.       @racc_debug_out.puts "shift   #{racc_token2str tok}"
  410.       racc_print_stacks tstack, vstack
  411.       @racc_debug_out.puts
  412.     end
  413.  
  414.     def racc_reduce( toks, sim, tstack, vstack )
  415.       out = @racc_debug_out
  416.       out.print 'reduce '
  417.       if toks.empty? then
  418.         out.print ' <none>'
  419.       else
  420.         toks.each {|t| out.print ' ', racc_token2str(t) }
  421.       end
  422.       out.puts " --> #{racc_token2str(sim)}"
  423.           
  424.       racc_print_stacks tstack, vstack
  425.       @racc_debug_out.puts
  426.     end
  427.  
  428.     def racc_accept
  429.       @racc_debug_out.puts 'accept'
  430.       @racc_debug_out.puts
  431.     end
  432.  
  433.     def racc_e_pop( state, tstack, vstack )
  434.       @racc_debug_out.puts 'error recovering mode: pop token'
  435.       racc_print_states state
  436.       racc_print_stacks tstack, vstack
  437.       @racc_debug_out.puts
  438.     end
  439.  
  440.     def racc_next_state( curstate, state )
  441.       @racc_debug_out.puts  "goto    #{curstate}"
  442.       racc_print_states state
  443.       @racc_debug_out.puts
  444.     end
  445.  
  446.     def racc_print_stacks( t, v )
  447.       out = @racc_debug_out
  448.       out.print '        ['
  449.       t.each_index do |i|
  450.         out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')'
  451.       end
  452.       out.puts ' ]'
  453.     end
  454.  
  455.     def racc_print_states( s )
  456.       out = @racc_debug_out
  457.       out.print '        ['
  458.       s.each {|st| out.print ' ', st }
  459.       out.puts ' ]'
  460.     end
  461.  
  462.     def racc_token2str( tok )
  463.       type::Racc_token_to_s_table[tok] or
  464.         raise RuntimeError, "[Racc Bug] can't convert token #{tok} to string"
  465.     end
  466.  
  467.     def token_to_str( t )
  468.       type::Racc_token_to_s_table[t]
  469.     end
  470.  
  471.   end
  472.  
  473. end
  474. ..end /usr/local/lib/ruby/site_ruby/1.7/racc/parser.rb modeval..ida2ed1007f7
  475. end   # end of racc/parser.rb
  476.  
  477.  
  478. require "rd/rdinlineparser.tab.rb"
  479. require "rd/parser-util"
  480.  
  481. module RD
  482.  
  483. class RDParser < ::Racc::Parser
  484.  
  485. module_eval <<'..end rd/rdblockparser.ry modeval..id64427aaba6', 'rd/rdblockparser.ry', 231
  486. include ParserUtility
  487.  
  488. TMPFILE = ["rdtmp", $$, 0]
  489.  
  490. attr_reader :tree
  491.  
  492. def initialize
  493.   @inline_parser = RDInlineParser.new(self)
  494. end
  495.  
  496. def parse(src, tree)
  497.   @src = src
  498.   @src.push(false)
  499.   # RDtree
  500.   @tree = tree
  501.   
  502.   # @i: index(line no.) of src
  503.   @i = 0
  504.   # stack for current indentation
  505.   @indent_stack = []
  506.   # how indented.
  507.   @current_indent = @indent_stack.join("")
  508.   # RDParser for tmp src
  509.   @subparser = nil
  510.   # which part is in now
  511.   @in_part = nil
  512.   @part_content = []
  513.  
  514.   @in_verbatim = false
  515.  
  516.   @yydebug = true
  517.   do_parse
  518. end
  519.  
  520. def next_token
  521.   # preprocessing
  522.   # if it is not in RD part
  523.   # => method
  524.   while @in_part != "rd"
  525.     line = @src[@i]
  526.     @i += 1 # next line
  527.     
  528.     case line
  529.     # src end
  530.     when false
  531.       return [false, false]
  532.     # RD part begin
  533.     when /^=begin\s*(?:\bRD\b.*)?\s*$/
  534.       if @in_part # if in non-RD part
  535.     @part_content.push(line)
  536.       else
  537.     @in_part = "rd"
  538.     return [:WHITELINE, "=begin\n"] # <= for textblockand
  539.       end
  540.     # non-RD part begin
  541.     when /^=begin\s+(\w+)/
  542.       part = $1
  543.       if @in_part # if in non-RD part
  544.     @part_content.push(line)
  545.       else
  546.     @in_part = part if @tree.filter[part] # if filter exists
  547. #    p "BEGIN_PART: #{@in_part}" # DEBUG
  548.       end
  549.     # non-RD part end
  550.     when /^=end/
  551.       if @in_part # if in non-RD part
  552. #    p "END_PART: #{@in_part}" # DEBUG
  553.     # make Part-in object
  554.     part = RD::Part.new(@part_content.join(""), @tree, "r")
  555.     @part_content.clear
  556.     # call filter, part_out is output(Part object)
  557.     part_out = @tree.filter[@in_part].call(part)
  558.     
  559.     if @tree.filter[@in_part].mode == :rd # if output is RD formated
  560.       subtree = parse_subtree(part_out.to_a)
  561.     else # if output is target formated
  562.       basename = TMPFILE.join('.')
  563.       TMPFILE[-1] += 1
  564.       tmpfile = open(@tree.tmp_dir + "/" + basename + ".#{@in_part}", "w")
  565.       tmpfile.print(part_out)
  566.       tmpfile.close
  567.       subtree = parse_subtree(["=begin\n", "<<< #{basename}\n", "=end\n"])
  568.     end
  569.     @in_part = nil
  570.     return [:SUBTREE, subtree]
  571.       end
  572.     else
  573.       if @in_part # if in non-RD part
  574.     @part_content.push(line)
  575.       end
  576.     end
  577.   end
  578.  
  579.   @current_indent = @indent_stack.join("")
  580.   line = @src[@i]
  581.   case line
  582.   when false
  583.     if_current_indent_equal("") do
  584.       [false, false]
  585.     end
  586.   when /^=end/
  587.     if_current_indent_equal("") do
  588.       @in_part = nil
  589.       [:WHITELINE, "=end"] # MUST CHANGE??
  590.     end
  591.   when /^\s*$/
  592.     @i += 1 # next line
  593.     return [:WHITELINE, ':WHITELINE']
  594.   when /^\#/  # comment line
  595.     @i += 1 # next line
  596.     return [:WHITELINE, '(:COMMENT) ' + $']
  597.   when /^(={1,4})(?!=)\s*(?=\S)/, /^(\+{1,2})(?!\+)\s*(?=\S)/
  598.     rest = $'                    # '
  599.     rest.chomp!
  600.     mark = $1
  601.     if_current_indent_equal("") do
  602.       return [:HEADLINE, [Headline.mark_to_level(mark), rest]]
  603.     end
  604.   when /^<<<\s*(\S+)/
  605.     file = $1
  606.     if_current_indent_equal("") do
  607.       suffix = file[-3 .. -1] 
  608.       if suffix == ".rd" or suffix == ".rb"
  609.     subtree = parse_subtree(get_included(file))
  610.     [:SUBTREE, subtree]
  611.       else
  612.     [:INCLUDE, file]
  613.       end
  614.     end
  615.   when /^(\s*)\*(\s*)/
  616.     rest = $'                   # '
  617.     newIndent = $2
  618.     if_current_indent_equal($1) do
  619.       if @in_verbatim
  620.     [:STRINGLINE, line]
  621.       else
  622.     @indent_stack.push("\s" << newIndent)
  623.     [:ITEMLISTLINE, rest]
  624.       end
  625.     end
  626.   when /^(\s*)(\(\d+\))(\s*)/
  627.     rest = $'                     # '
  628.     mark = $2
  629.     newIndent = $3
  630.     if_current_indent_equal($1) do
  631.       if @in_verbatim
  632.     [:STRINGLINE, line]
  633.       else
  634.     @indent_stack.push("\s" * mark.size << newIndent)
  635.     [:ENUMLISTLINE, rest]
  636.       end
  637.     end
  638.   when /^(\s*):(\s*)/
  639.     rest = $'                    # '
  640.     newIndent = $2
  641.     if_current_indent_equal($1) do
  642.       if @in_verbatim
  643.     [:STRINGLINE, line]
  644.       else
  645.     @indent_stack.push("\s" <<$2)
  646.     [:DESCLISTLINE, rest]
  647.       end
  648.     end
  649.   when /^(\s*)---(?!-)/
  650.     indent = $1
  651.     rest = $'
  652.     /\s*/ === rest
  653.     term = $'
  654.     new_indent = $&
  655.     if_current_indent_equal(indent) do
  656.       if @in_verbatim
  657.     [:STRINGLINE, line]
  658.       else
  659.     @indent_stack.push("\s\s\s" + new_indent)
  660.     [:METHODLISTLINE, term]
  661.       end
  662.     end
  663.   when /^(\s*)/
  664.     if_current_indent_equal($1) do
  665.       [:STRINGLINE, line]
  666.     end
  667.   else
  668.     raise "[BUG] parsing error may occured."
  669.   end
  670. end
  671.  
  672. =begin private
  673.   --- RDParser#if_current_indent_equal(indent)
  674.         if (({@current_indent == ((|indent|))})) then yield block, otherwise
  675.         process indentation.
  676. =end
  677. def if_current_indent_equal(indent)
  678.   if @current_indent == indent
  679.     @i += 1 # next line
  680.     yield
  681.   elsif indent.index(@current_indent) == 0
  682.     @indent_stack.push(indent[@current_indent.size .. -1])
  683.     [:INDENT, ":INDENT"]
  684.   else
  685.     @indent_stack.pop
  686.     [:DEDENT, ":DEDENT"]
  687.   end
  688. end
  689. private :if_current_indent_equal
  690.  
  691. def cut_off(src)
  692.   ret = []
  693.   whiteline_buf = []
  694.   line = src.shift
  695.   /^\s*/ =~ line
  696.   indent = Regexp.quote($&)
  697.   ret.push($')                 # '
  698.   while line = src.shift
  699.     if /^(\s*)$/ =~ line
  700.       whiteline_buf.push(line)
  701.     elsif /^#{indent}/ =~ line
  702.       unless whiteline_buf.empty?
  703.     ret.concat(whiteline_buf)
  704.     whiteline_buf.clear
  705.       end
  706.       ret.push($')            # '
  707.     else
  708.       raise "[BUG]: probably Parser Error while cutting off.\n"
  709.     end
  710.   end
  711.   ret
  712. end
  713. private :cut_off
  714.  
  715. def set_term_to_element(parent, term)
  716. #  parent.set_term_under_document_struct(term, @tree.document_struct)
  717.   parent.set_term_without_document_struct(term)
  718. end
  719. private :set_term_to_element
  720.  
  721. def on_error( et, ev, _values )
  722.   line = @src[@i]
  723.   prv, cur, nxt = format_line_num(@i, @i+1, @i+2)
  724.   
  725.   raise ParseError, <<Msg
  726.  
  727. RD syntax error: line #{@i+1}:
  728.   #{prv}  |#{@src[@i-1].chomp}
  729.   #{cur}=>|#{@src[@i].chomp}
  730.   #{nxt}  |#{@src[@i+1].chomp}
  731.  
  732. Msg
  733. end
  734.  
  735. def line_index
  736.   @i
  737. end
  738.  
  739. def parse_subtree(src)
  740.   @subparser = RD::RDParser.new() unless @subparser
  741.   
  742.   @subparser.parse(src, @tree)
  743. end
  744. private :parse_subtree
  745.  
  746. def get_included(file)
  747.   included = ""
  748.   @tree.include_path.each do |dir|
  749.     file_name = dir + "/" + file
  750.     if test(?e, file_name)
  751.       included = IO.readlines(file_name)
  752.       break
  753.     end
  754.   end
  755.   included
  756. end
  757. private :get_included
  758.  
  759. def format_line_num(*args)
  760.   width = args.collect{|i| i.to_s.length }.max
  761.   args.collect{|i| sprintf("%#{width}d", i) }
  762. end
  763. private :format_line_num
  764.  
  765. ..end rd/rdblockparser.ry modeval..id64427aaba6
  766.  
  767. ##### racc 1.3.9 generates ###
  768.  
  769. racc_reduce_table = [
  770.  0, 0, :racc_error,
  771.  1, 15, :_reduce_1,
  772.  0, 15, :_reduce_2,
  773.  2, 16, :_reduce_3,
  774.  1, 16, :_reduce_none,
  775.  1, 17, :_reduce_5,
  776.  1, 17, :_reduce_6,
  777.  1, 17, :_reduce_none,
  778.  1, 17, :_reduce_8,
  779.  1, 17, :_reduce_9,
  780.  1, 17, :_reduce_10,
  781.  1, 17, :_reduce_11,
  782.  1, 21, :_reduce_12,
  783.  1, 22, :_reduce_13,
  784.  1, 18, :_reduce_14,
  785.  2, 23, :_reduce_15,
  786.  1, 23, :_reduce_16,
  787.  3, 19, :_reduce_17,
  788.  1, 25, :_reduce_18,
  789.  2, 24, :_reduce_19,
  790.  4, 24, :_reduce_20,
  791.  2, 24, :_reduce_21,
  792.  1, 24, :_reduce_22,
  793.  1, 26, :_reduce_none,
  794.  1, 26, :_reduce_none,
  795.  1, 26, :_reduce_none,
  796.  1, 26, :_reduce_none,
  797.  1, 20, :_reduce_none,
  798.  3, 20, :_reduce_28,
  799.  4, 20, :_reduce_29,
  800.  2, 31, :_reduce_30,
  801.  1, 31, :_reduce_31,
  802.  1, 27, :_reduce_32,
  803.  2, 32, :_reduce_33,
  804.  1, 32, :_reduce_34,
  805.  3, 33, :_reduce_35,
  806.  1, 28, :_reduce_36,
  807.  2, 36, :_reduce_37,
  808.  1, 36, :_reduce_38,
  809.  3, 37, :_reduce_39,
  810.  1, 29, :_reduce_40,
  811.  2, 39, :_reduce_41,
  812.  1, 39, :_reduce_42,
  813.  3, 40, :_reduce_43,
  814.  1, 30, :_reduce_44,
  815.  2, 42, :_reduce_45,
  816.  1, 42, :_reduce_46,
  817.  3, 43, :_reduce_47,
  818.  3, 41, :_reduce_48,
  819.  2, 41, :_reduce_49,
  820.  4, 41, :_reduce_50,
  821.  1, 41, :_reduce_51,
  822.  2, 45, :_reduce_52,
  823.  1, 45, :_reduce_none,
  824.  1, 46, :_reduce_54,
  825.  1, 46, :_reduce_55,
  826.  1, 46, :_reduce_none,
  827.  1, 46, :_reduce_57,
  828.  1, 44, :_reduce_none,
  829.  0, 44, :_reduce_none,
  830.  2, 47, :_reduce_none,
  831.  1, 47, :_reduce_none,
  832.  2, 34, :_reduce_62,
  833.  1, 34, :_reduce_63,
  834.  2, 38, :_reduce_64,
  835.  1, 38, :_reduce_65,
  836.  2, 35, :_reduce_66,
  837.  2, 35, :_reduce_67,
  838.  2, 35, :_reduce_68,
  839.  1, 35, :_reduce_69,
  840.  1, 35, :_reduce_none,
  841.  1, 35, :_reduce_71,
  842.  0, 35, :_reduce_72 ]
  843.  
  844. racc_reduce_n = 73
  845.  
  846. racc_shift_n = 89
  847.  
  848. racc_action_table = [
  849.     13,    18,    23,    27,    33,    59,    80,    49,    49,    21,
  850.     88,    13,    18,    23,    27,    48,    13,    18,    23,    27,
  851.     48,    74,    13,    18,    23,    27,    33,    59,    49,    76,
  852.     23,    21,    13,    18,    23,    27,    33,    59,    79,    57,
  853.     81,    21,    13,    18,    23,    27,    66,    39,    18,    33,
  854.     48,    21,    13,    18,    23,    27,    33,    59,    58,    84,
  855.     33,    21,    13,    18,    23,    27,    33,    59,    27,    57,
  856.     13,    21,    13,    18,    23,    27,    33,     3,     6,    11,
  857.     16,    21,    13,    18,    23,    27,    33,    59,    57,   nil,
  858.    nil,    21,    13,    18,    23,    27,    33,    59,   nil,   nil,
  859.    nil,    21,    13,    18,    23,    27,    33,    59,   nil,   nil,
  860.    nil,    21,    13,    18,    23,    27,   nil,    39,   nil,   nil,
  861.    nil,    21,    13,    18,    23,    27,    33,    59,   nil,   nil,
  862.    nil,    21,    13,    18,    23,    27,    33,    59,   nil,   nil,
  863.    nil,    21,    13,    18,    23,    27,    33,     3,     6,    11,
  864.     16,    21,    71,    68,    71,    68,   nil,    69,    70,    69,
  865.     87,    71,    68,    33,   nil,   nil,    69,   nil,    78,    13,
  866.     18,    23,    27 ]
  867.  
  868. racc_action_check = [
  869.     86,    86,    86,    86,    86,    86,    54,    27,    23,    86,
  870.     86,    47,    47,    47,    47,    47,    21,    21,    21,    21,
  871.     21,    47,    65,    65,    65,    65,    65,    65,    49,    50,
  872.     31,    65,    78,    78,    78,    78,    78,    78,    53,    44,
  873.     58,    78,     9,     9,     9,     9,    41,     9,    19,    18,
  874.     69,     9,    77,    77,    77,    77,    77,    77,    35,    73,
  875.     13,    77,    67,    67,    67,    67,    67,    67,     8,    34,
  876.      2,    67,     4,     4,     4,     4,     4,     4,     4,     4,
  877.      4,     4,    63,    63,    63,    63,    63,    63,    43,   nil,
  878.    nil,    63,    85,    85,    85,    85,    85,    85,   nil,   nil,
  879.    nil,    85,    39,    39,    39,    39,    39,    39,   nil,   nil,
  880.    nil,    39,    28,    28,    28,    28,   nil,    28,   nil,   nil,
  881.    nil,    28,    42,    42,    42,    42,    42,    42,   nil,   nil,
  882.    nil,    42,    40,    40,    40,    40,    40,    40,   nil,   nil,
  883.    nil,    40,     0,     0,     0,     0,     0,     0,     0,     0,
  884.      0,     0,    46,    46,    83,    83,   nil,    46,    46,    83,
  885.     83,    72,    72,    51,   nil,   nil,    72,   nil,    51,    32,
  886.     32,    32,    32 ]
  887.  
  888. racc_action_pointer = [
  889.    139,   nil,    67,   nil,    69,   nil,   nil,   nil,    62,    39,
  890.    nil,   nil,   nil,    53,   nil,   nil,   nil,   nil,    42,    44,
  891.    nil,    13,   nil,     0,   nil,   nil,   nil,    -1,   109,   nil,
  892.    nil,    25,   166,   nil,    62,    58,   nil,   nil,   nil,    99,
  893.    129,    33,   119,    81,    32,   nil,   145,     8,   nil,    20,
  894.     16,   156,   nil,    25,    -7,   nil,   nil,   nil,    40,   nil,
  895.    nil,   nil,   nil,    79,   nil,    19,   nil,    59,   nil,    43,
  896.    nil,   nil,   154,    46,   nil,   nil,   nil,    49,    29,   nil,
  897.    nil,   nil,   nil,   147,   nil,    89,    -3,   nil,   nil ]
  898.  
  899. racc_action_default = [
  900.     -2,   -42,   -32,   -10,    -1,   -34,   -11,    -4,   -44,   -72,
  901.    -31,   -12,    -5,   -63,   -46,   -23,   -13,    -6,   -65,   -36,
  902.    -24,   -73,    -7,   -59,   -38,   -25,    -8,   -59,   -72,   -26,
  903.     -9,   -40,   -27,   -16,   -14,   -73,   -33,    -3,   -45,   -71,
  904.    -69,   -73,   -70,   -62,   -64,   -37,   -73,   -73,   -22,   -61,
  905.    -73,   -51,   -58,   -73,   -73,   -41,   -30,   -15,   -73,   -57,
  906.    -54,   -55,   -56,   -68,   -53,   -66,   -35,   -67,   -21,   -73,
  907.    -17,   -19,   -18,   -73,   -28,   -60,   -43,   -49,   -73,   -47,
  908.    -39,    89,   -52,   -73,   -29,   -48,   -73,   -20,   -50 ]
  909.  
  910. racc_goto_table = [
  911.     12,    46,    63,    65,    12,    67,    17,    22,    56,    41,
  912.     17,    22,    43,    47,    50,    40,    42,    44,    53,    36,
  913.     82,     7,    82,    56,    82,    37,    45,    72,    54,    55,
  914.     73,    38,    35,     4,    40,    42,    75,   nil,   nil,   nil,
  915.     85,    86,    82,    82,   nil,   nil,   nil,   nil,   nil,    83,
  916.    nil,    77 ]
  917.  
  918. racc_goto_check = [
  919.      4,    10,    31,    31,     4,    31,     5,     6,    12,    21,
  920.      5,     6,     9,    17,    27,     5,     6,     9,    27,    19,
  921.     32,     3,    32,    12,    32,     3,    23,    10,    21,    26,
  922.     11,    29,     1,     2,     5,     6,    33,   nil,   nil,   nil,
  923.     31,    31,    32,    32,   nil,   nil,   nil,   nil,   nil,    10,
  924.    nil,     4 ]
  925.  
  926. racc_goto_pointer = [
  927.    nil,    32,    33,    21,     0,     6,     7,   nil,   nil,    -1,
  928.    -20,   -17,   -24,   nil,   nil,   nil,   nil,    -8,   nil,    17,
  929.    nil,     0,   nil,     7,   nil,   nil,    -2,    -9,   nil,    23,
  930.    nil,   -37,   -43,   -13 ]
  931.  
  932. racc_goto_default = [
  933.    nil,   nil,   nil,   nil,    60,    61,    62,    26,    30,    34,
  934.    nil,   nil,    10,    15,    20,    25,    29,    32,     2,     5,
  935.      9,   nil,    19,    24,    28,    31,     1,   nil,     8,    14,
  936.     51,   nil,    64,    52 ]
  937.  
  938. racc_token_table = {
  939.  false => 0,
  940.  Object.new => 1,
  941.  :DUMMY => 2,
  942.  :ITEMLISTLINE => 3,
  943.  :ENUMLISTLINE => 4,
  944.  :DESCLISTLINE => 5,
  945.  :METHODLISTLINE => 6,
  946.  :STRINGLINE => 7,
  947.  :WHITELINE => 8,
  948.  :SUBTREE => 9,
  949.  :HEADLINE => 10,
  950.  :INCLUDE => 11,
  951.  :INDENT => 12,
  952.  :DEDENT => 13 }
  953.  
  954. racc_use_result_var = true
  955.  
  956. racc_nt_base = 14
  957.  
  958. Racc_arg = [
  959.  racc_action_table,
  960.  racc_action_check,
  961.  racc_action_default,
  962.  racc_action_pointer,
  963.  racc_goto_table,
  964.  racc_goto_check,
  965.  racc_goto_default,
  966.  racc_goto_pointer,
  967.  racc_nt_base,
  968.  racc_reduce_table,
  969.  racc_token_table,
  970.  racc_shift_n,
  971.  racc_reduce_n,
  972.  racc_use_result_var ]
  973.  
  974. Racc_token_to_s_table = [
  975. '$end',
  976. 'error',
  977. 'DUMMY',
  978. 'ITEMLISTLINE',
  979. 'ENUMLISTLINE',
  980. 'DESCLISTLINE',
  981. 'METHODLISTLINE',
  982. 'STRINGLINE',
  983. 'WHITELINE',
  984. 'SUBTREE',
  985. 'HEADLINE',
  986. 'INCLUDE',
  987. 'INDENT',
  988. 'DEDENT',
  989. '$start',
  990. 'document',
  991. 'blocks',
  992. 'block',
  993. 'textblock',
  994. 'verbatim',
  995. 'lists',
  996. 'headline',
  997. 'include',
  998. 'textblockcontent',
  999. 'verbatimcontent',
  1000. 'verbatim_after_lists',
  1001. 'list',
  1002. 'itemlist',
  1003. 'enumlist',
  1004. 'desclist',
  1005. 'methodlist',
  1006. 'lists2',
  1007. 'itemlistitems',
  1008. 'itemlistitem',
  1009. 'first_textblock_in_itemlist',
  1010. 'other_blocks_in_list',
  1011. 'enumlistitems',
  1012. 'enumlistitem',
  1013. 'first_textblock_in_enumlist',
  1014. 'desclistitems',
  1015. 'desclistitem',
  1016. 'description_part',
  1017. 'methodlistitems',
  1018. 'methodlistitem',
  1019. 'whitelines',
  1020. 'blocks_in_list',
  1021. 'block_in_list',
  1022. 'whitelines2']
  1023.  
  1024. Racc_debug_parser = false
  1025.  
  1026. ##### racc system variables end #####
  1027.  
  1028.  # reduce 0 omitted
  1029.  
  1030. module_eval <<'.,.,', 'rd/rdblockparser.ry', 12
  1031.   def _reduce_1( val, _values, result )
  1032.  result = DocumentElement.new
  1033.                add_children_to_element(result, *val[0])
  1034.    result
  1035.   end
  1036. .,.,
  1037.  
  1038. module_eval <<'.,.,', 'rd/rdblockparser.ry', 16
  1039.   def _reduce_2( val, _values, result )
  1040.                          raise ParseError,
  1041.                          "Error: file empty or doesn't have `=begin', `=end'."
  1042.    result
  1043.   end
  1044. .,.,
  1045.  
  1046. module_eval <<'.,.,', 'rd/rdblockparser.ry', 20
  1047.   def _reduce_3( val, _values, result )
  1048.  result.concat(val[1])
  1049.    result
  1050.   end
  1051. .,.,
  1052.  
  1053.  # reduce 4 omitted
  1054.  
  1055. module_eval <<'.,.,', 'rd/rdblockparser.ry', 23
  1056.   def _reduce_5( val, _values, result )
  1057.  result = val
  1058.    result
  1059.   end
  1060. .,.,
  1061.  
  1062. module_eval <<'.,.,', 'rd/rdblockparser.ry', 24
  1063.   def _reduce_6( val, _values, result )
  1064.  result = val
  1065.    result
  1066.   end
  1067. .,.,
  1068.  
  1069.  # reduce 7 omitted
  1070.  
  1071. module_eval <<'.,.,', 'rd/rdblockparser.ry', 26
  1072.   def _reduce_8( val, _values, result )
  1073.  result = val
  1074.    result
  1075.   end
  1076. .,.,
  1077.  
  1078. module_eval <<'.,.,', 'rd/rdblockparser.ry', 27
  1079.   def _reduce_9( val, _values, result )
  1080.  result = val
  1081.    result
  1082.   end
  1083. .,.,
  1084.  
  1085. module_eval <<'.,.,', 'rd/rdblockparser.ry', 28
  1086.   def _reduce_10( val, _values, result )
  1087.  result = []
  1088.    result
  1089.   end
  1090. .,.,
  1091.  
  1092. module_eval <<'.,.,', 'rd/rdblockparser.ry', 29
  1093.   def _reduce_11( val, _values, result )
  1094.  result = val[0].blocks
  1095.    result
  1096.   end
  1097. .,.,
  1098.  
  1099. module_eval <<'.,.,', 'rd/rdblockparser.ry', 32
  1100.   def _reduce_12( val, _values, result )
  1101.  # val[0] is like [level, title]
  1102.               title = @inline_parser.parse(val[0][1])
  1103.               result = Headline.new(val[0][0])
  1104.               add_children_to_element(result, *title)
  1105.    result
  1106.   end
  1107. .,.,
  1108.  
  1109. module_eval <<'.,.,', 'rd/rdblockparser.ry', 38
  1110.   def _reduce_13( val, _values, result )
  1111.  result = Include.new(val[0])
  1112.    result
  1113.   end
  1114. .,.,
  1115.  
  1116. module_eval <<'.,.,', 'rd/rdblockparser.ry', 42
  1117.   def _reduce_14( val, _values, result )
  1118.  # val[0] is Array of String
  1119.               content = cut_off(val[0]).join("")
  1120.               contents = @inline_parser.parse(content)
  1121.               result = TextBlock.new()
  1122.               add_children_to_element(result, *contents)
  1123.    result
  1124.   end
  1125. .,.,
  1126.  
  1127. module_eval <<'.,.,', 'rd/rdblockparser.ry', 50
  1128.   def _reduce_15( val, _values, result )
  1129.  result.push(val[1])
  1130.    result
  1131.   end
  1132. .,.,
  1133.  
  1134. module_eval <<'.,.,', 'rd/rdblockparser.ry', 51
  1135.   def _reduce_16( val, _values, result )
  1136.  result = val
  1137.    result
  1138.   end
  1139. .,.,
  1140.  
  1141. module_eval <<'.,.,', 'rd/rdblockparser.ry', 55
  1142.   def _reduce_17( val, _values, result )
  1143.  # val[1] is Array of String
  1144.               content = cut_off(val[1])
  1145.               result = Verbatim.new(content)
  1146.               # imform to lexer.
  1147.               @in_verbatim = false
  1148.    result
  1149.   end
  1150. .,.,
  1151.  
  1152. module_eval <<'.,.,', 'rd/rdblockparser.ry', 62
  1153.   def _reduce_18( val, _values, result )
  1154.  # val[0] is Array of String
  1155.               content = cut_off(val[0])
  1156.               result = Verbatim.new(content)
  1157.               # imform to lexer.
  1158.               @in_verbatim = false
  1159.    result
  1160.   end
  1161. .,.,
  1162.  
  1163. module_eval <<'.,.,', 'rd/rdblockparser.ry', 69
  1164.   def _reduce_19( val, _values, result )
  1165.  result.push(val[1])
  1166.    result
  1167.   end
  1168. .,.,
  1169.  
  1170. module_eval <<'.,.,', 'rd/rdblockparser.ry', 71
  1171.   def _reduce_20( val, _values, result )
  1172.  result.concat(val[2])
  1173.    result
  1174.   end
  1175. .,.,
  1176.  
  1177. module_eval <<'.,.,', 'rd/rdblockparser.ry', 73
  1178.   def _reduce_21( val, _values, result )
  1179.  result.push("\n")
  1180.    result
  1181.   end
  1182. .,.,
  1183.  
  1184. module_eval <<'.,.,', 'rd/rdblockparser.ry', 74
  1185.   def _reduce_22( val, _values, result )
  1186.  result = val
  1187.                     # imform to lexer.
  1188.                     @in_verbatim = true
  1189.    result
  1190.   end
  1191. .,.,
  1192.  
  1193.  # reduce 23 omitted
  1194.  
  1195.  # reduce 24 omitted
  1196.  
  1197.  # reduce 25 omitted
  1198.  
  1199.  # reduce 26 omitted
  1200.  
  1201.  # reduce 27 omitted
  1202.  
  1203. module_eval <<'.,.,', 'rd/rdblockparser.ry', 85
  1204.   def _reduce_28( val, _values, result )
  1205.  result = val[1]
  1206.    result
  1207.   end
  1208. .,.,
  1209.  
  1210. module_eval <<'.,.,', 'rd/rdblockparser.ry', 87
  1211.   def _reduce_29( val, _values, result )
  1212.  result = val[1].push(val[2])
  1213.    result
  1214.   end
  1215. .,.,
  1216.  
  1217. module_eval <<'.,.,', 'rd/rdblockparser.ry', 90
  1218.   def _reduce_30( val, _values, result )
  1219.  result.push(val[1])
  1220.    result
  1221.   end
  1222. .,.,
  1223.  
  1224. module_eval <<'.,.,', 'rd/rdblockparser.ry', 91
  1225.   def _reduce_31( val, _values, result )
  1226.  result = val
  1227.    result
  1228.   end
  1229. .,.,
  1230.  
  1231. module_eval <<'.,.,', 'rd/rdblockparser.ry', 95
  1232.   def _reduce_32( val, _values, result )
  1233.                           result = ItemList.new
  1234.               add_children_to_element(result, *val[0])
  1235.    result
  1236.   end
  1237. .,.,
  1238.  
  1239. module_eval <<'.,.,', 'rd/rdblockparser.ry', 100
  1240.   def _reduce_33( val, _values, result )
  1241.  result.push(val[1])
  1242.    result
  1243.   end
  1244. .,.,
  1245.  
  1246. module_eval <<'.,.,', 'rd/rdblockparser.ry', 101
  1247.   def _reduce_34( val, _values, result )
  1248.  result = val
  1249.    result
  1250.   end
  1251. .,.,
  1252.  
  1253. module_eval <<'.,.,', 'rd/rdblockparser.ry', 105
  1254.   def _reduce_35( val, _values, result )
  1255.                   result = ItemListItem.new
  1256.           add_children_to_element(result, val[0], *val[1])
  1257.    result
  1258.   end
  1259. .,.,
  1260.  
  1261. module_eval <<'.,.,', 'rd/rdblockparser.ry', 111
  1262.   def _reduce_36( val, _values, result )
  1263.                           result = EnumList.new
  1264.               add_children_to_element(result, *val[0])
  1265.    result
  1266.   end
  1267. .,.,
  1268.  
  1269. module_eval <<'.,.,', 'rd/rdblockparser.ry', 116
  1270.   def _reduce_37( val, _values, result )
  1271.  result.push(val[1])
  1272.    result
  1273.   end
  1274. .,.,
  1275.  
  1276. module_eval <<'.,.,', 'rd/rdblockparser.ry', 117
  1277.   def _reduce_38( val, _values, result )
  1278.  result = val
  1279.    result
  1280.   end
  1281. .,.,
  1282.  
  1283. module_eval <<'.,.,', 'rd/rdblockparser.ry', 121
  1284.   def _reduce_39( val, _values, result )
  1285.                   result = EnumListItem.new
  1286.           add_children_to_element(result, val[0], *val[1])
  1287.    result
  1288.   end
  1289. .,.,
  1290.  
  1291. module_eval <<'.,.,', 'rd/rdblockparser.ry', 127
  1292.   def _reduce_40( val, _values, result )
  1293.                           result = DescList.new
  1294.               add_children_to_element(result, *val[0])
  1295.    result
  1296.   end
  1297. .,.,
  1298.  
  1299. module_eval <<'.,.,', 'rd/rdblockparser.ry', 132
  1300.   def _reduce_41( val, _values, result )
  1301.             result.push(val[1])
  1302.    result
  1303.   end
  1304. .,.,
  1305.  
  1306. module_eval <<'.,.,', 'rd/rdblockparser.ry', 133
  1307.   def _reduce_42( val, _values, result )
  1308.  result = val
  1309.    result
  1310.   end
  1311. .,.,
  1312.  
  1313. module_eval <<'.,.,', 'rd/rdblockparser.ry', 137
  1314.   def _reduce_43( val, _values, result )
  1315.                           term = DescListItem::Term.new
  1316.                           term_contents = @inline_parser.parse(val[0])
  1317.               add_children_to_element(term, *term_contents)
  1318.  
  1319.               result = DescListItem.new
  1320.                           set_term_to_element(result, term)
  1321.                   add_children_to_element(result, *val[1])
  1322.    result
  1323.   end
  1324. .,.,
  1325.  
  1326. module_eval <<'.,.,', 'rd/rdblockparser.ry', 148
  1327.   def _reduce_44( val, _values, result )
  1328.                           result = MethodList.new
  1329.               add_children_to_element(result, *val[0])
  1330.    result
  1331.   end
  1332. .,.,
  1333.  
  1334. module_eval <<'.,.,', 'rd/rdblockparser.ry', 153
  1335.   def _reduce_45( val, _values, result )
  1336.  result.push(val[1])
  1337.    result
  1338.   end
  1339. .,.,
  1340.  
  1341. module_eval <<'.,.,', 'rd/rdblockparser.ry', 154
  1342.   def _reduce_46( val, _values, result )
  1343.  result = val
  1344.    result
  1345.   end
  1346. .,.,
  1347.  
  1348. module_eval <<'.,.,', 'rd/rdblockparser.ry', 158
  1349.   def _reduce_47( val, _values, result )
  1350.               term = MethodListItem::Term.new(val[0].strip)
  1351.               result = MethodListItem.new
  1352.                           set_term_to_element(result, term)
  1353.               add_children_to_element(result, *val[1])
  1354.    result
  1355.   end
  1356. .,.,
  1357.  
  1358. module_eval <<'.,.,', 'rd/rdblockparser.ry', 166
  1359.   def _reduce_48( val, _values, result )
  1360.  result = [val[1]].concat(val[2])
  1361.    result
  1362.   end
  1363. .,.,
  1364.  
  1365. module_eval <<'.,.,', 'rd/rdblockparser.ry', 167
  1366.   def _reduce_49( val, _values, result )
  1367.  result = [val[1]]
  1368.    result
  1369.   end
  1370. .,.,
  1371.  
  1372. module_eval <<'.,.,', 'rd/rdblockparser.ry', 169
  1373.   def _reduce_50( val, _values, result )
  1374.  result = val[2]
  1375.    result
  1376.   end
  1377. .,.,
  1378.  
  1379. module_eval <<'.,.,', 'rd/rdblockparser.ry', 170
  1380.   def _reduce_51( val, _values, result )
  1381.  result = []
  1382.    result
  1383.   end
  1384. .,.,
  1385.  
  1386. module_eval <<'.,.,', 'rd/rdblockparser.ry', 173
  1387.   def _reduce_52( val, _values, result )
  1388.  result.concat(val[1])
  1389.    result
  1390.   end
  1391. .,.,
  1392.  
  1393.  # reduce 53 omitted
  1394.  
  1395. module_eval <<'.,.,', 'rd/rdblockparser.ry', 176
  1396.   def _reduce_54( val, _values, result )
  1397.  result = val
  1398.    result
  1399.   end
  1400. .,.,
  1401.  
  1402. module_eval <<'.,.,', 'rd/rdblockparser.ry', 177
  1403.   def _reduce_55( val, _values, result )
  1404.  result = val
  1405.    result
  1406.   end
  1407. .,.,
  1408.  
  1409.  # reduce 56 omitted
  1410.  
  1411. module_eval <<'.,.,', 'rd/rdblockparser.ry', 179
  1412.   def _reduce_57( val, _values, result )
  1413.  result = []
  1414.    result
  1415.   end
  1416. .,.,
  1417.  
  1418.  # reduce 58 omitted
  1419.  
  1420.  # reduce 59 omitted
  1421.  
  1422.  # reduce 60 omitted
  1423.  
  1424.  # reduce 61 omitted
  1425.  
  1426. module_eval <<'.,.,', 'rd/rdblockparser.ry', 190
  1427.   def _reduce_62( val, _values, result )
  1428.  content = cut_off([val[0]].concat(val[1])).join("")
  1429.           contents = @inline_parser.parse(content)
  1430.                   result = TextBlock.new()
  1431.           add_children_to_element(result, *contents)
  1432.    result
  1433.   end
  1434. .,.,
  1435.  
  1436. module_eval <<'.,.,', 'rd/rdblockparser.ry', 197
  1437.   def _reduce_63( val, _values, result )
  1438.  content = cut_off([val[0]]).join("")
  1439.           contents = @inline_parser.parse(content)
  1440.           result = TextBlock.new()
  1441.           add_children_to_element(result, *contents)
  1442.    result
  1443.   end
  1444. .,.,
  1445.  
  1446. module_eval <<'.,.,', 'rd/rdblockparser.ry', 205
  1447.   def _reduce_64( val, _values, result )
  1448.  content = cut_off([val[0]].concat(val[1])).join("")
  1449.           contents = @inline_parser.parse(content)
  1450.               result = TextBlock.new()
  1451.           add_children_to_element(result, *contents)
  1452.    result
  1453.   end
  1454. .,.,
  1455.  
  1456. module_eval <<'.,.,', 'rd/rdblockparser.ry', 212
  1457.   def _reduce_65( val, _values, result )
  1458.  content = cut_off([val[0]]).join("")
  1459.           contents = @inline_parser.parse(content)
  1460.               result = TextBlock.new()
  1461.           add_children_to_element(result, *contents)
  1462.    result
  1463.   end
  1464. .,.,
  1465.  
  1466. module_eval <<'.,.,', 'rd/rdblockparser.ry', 219
  1467.   def _reduce_66( val, _values, result )
  1468.  result = [val[0]].concat(val[1])
  1469.    result
  1470.   end
  1471. .,.,
  1472.  
  1473. module_eval <<'.,.,', 'rd/rdblockparser.ry', 220
  1474.   def _reduce_67( val, _values, result )
  1475.  result.concat(val[1])
  1476.    result
  1477.   end
  1478. .,.,
  1479.  
  1480. module_eval <<'.,.,', 'rd/rdblockparser.ry', 221
  1481.   def _reduce_68( val, _values, result )
  1482.  result = val[1]
  1483.    result
  1484.   end
  1485. .,.,
  1486.  
  1487. module_eval <<'.,.,', 'rd/rdblockparser.ry', 222
  1488.   def _reduce_69( val, _values, result )
  1489.  result = val
  1490.    result
  1491.   end
  1492. .,.,
  1493.  
  1494.  # reduce 70 omitted
  1495.  
  1496. module_eval <<'.,.,', 'rd/rdblockparser.ry', 224
  1497.   def _reduce_71( val, _values, result )
  1498.  result = []
  1499.    result
  1500.   end
  1501. .,.,
  1502.  
  1503. module_eval <<'.,.,', 'rd/rdblockparser.ry', 225
  1504.   def _reduce_72( val, _values, result )
  1505.  result = []
  1506.    result
  1507.   end
  1508. .,.,
  1509.  
  1510.  def _reduce_none( val, _values, result )
  1511.   result
  1512.  end
  1513.  
  1514. end   # class RDParser
  1515.  
  1516. end # end of module RD 
  1517.