def parse_initial_board
      s0 = @current_pos
      parse_comments
      s2 = parse_hirate
      if s2 == :failed
        s2 = parse_ikkatsu
        if s2 == :failed
          s2 = @current_pos
          s3 = match_str("")
          if s3 != :failed
            @reported_pos = s2
            s3 = "NO"
          end
          s2 = s3
        end
      end
      if s2 != :failed
        s3 = parse_komabetsu
        if s3 != :failed
          parse_comments
          s5 = parse_teban
          if s5 != :failed
            if parse_nl != :failed
              @reported_pos = s0
              -> (data, koma, teban) do
                if data == "NO"
                  data = koma
                else
                  data["data"]["hands"] = koma["data"]["hands"]
                end
                data["data"]["color"] = teban
                data
              end.call(s2, s3, s5)
            else
              @current_pos = s0
              :failed
            end
          else
            @current_pos = s0
            :failed
          end
        else
          @current_pos = s0
          :failed
        end
      else
        @current_pos = s0
        :failed
      end
    end
def parse_initial_board
      s0 = @current_pos
      parse_comments
      s2 = parse_hirate
      if s2 == :failed
        s2 = parse_ikkatsu
        if s2 == :failed
          s2 = @current_pos
          s3 = match_str("")
          if s3 != :failed
            @reported_pos = s2
            s3 = "NO"
          end
          s2 = s3
        end
      end
      if s2 != :failed
        s3 = parse_komabetsu
        if s3 != :failed
          parse_comments
          s5 = parse_teban
          if s5 != :failed
            if parse_nl != :failed
              @reported_pos = s0
              -> (data, koma, teban) do
                if data == "NO"
                  data = koma
                else
                  data["data"]["hands"] = koma["data"]["hands"]
                end
                data["data"]["color"] = teban
                data
              end.call(s2, s3, s5)
            else
              @current_pos = s0
              :failed
            end
          else
            @current_pos = s0
            :failed
          end
        else
          @current_pos = s0
          :failed
        end
      else
        @current_pos = s0
        :failed
      end
    end
initialboard : comment* (hirate | ikkatsu | "") komabetsu comment* teban nl