_parse (RParsec::BestParser)

    # File rparsec/parsers.rb, line 217
      def _parse ctxt
        best_result, best_ind = nil, -1
        err_ind, err_pos = -1, -1
        ind, result, err = ctxt.index, ctxt.result, ctxt.error
        for p in @alts
          ctxt.reset_error
          ctxt.index, ctxt.result = ind, result
          if p._parse(ctxt)
            err, now_ind = nil, ctxt.index
            if best_ind==-1 || now_ind != best_ind && @longer == (now_ind>best_ind)
              best_result, best_ind = ctxt.result, now_ind
            end
          elsif best_ind < 0 # no good match found yet.
            if ctxt.error.index > err_pos
              err_ind, err_pos = ctxt.index, ctxt.error.index
            end
            err = Failures.add_error(err, ctxt.error)
          end
        end
        if best_ind >= 0
          ctxt.index = best_ind
          return ctxt.retn(best_result)
        else
          ctxt.error, ctxt.index = err, err_ind
          return false
        end
      end