def parse_csa1
      s0 = @current_pos
      s1 = parse_players
      s1 = nil if s1 == :failed
      s2 = parse_initial_board
      s2 = nil if s2 == :failed
      s3 = parse_moves
      if s3 != :failed
        @reported_pos = s0
        s0 = -> (ply, ini, ms) do
          ret = { "header" => {}, "initial" => ini, "moves" => ms }
          if ply
            ret["header"]["先手"] = ply[0] if ply[0]
            ret["header"]["後手"] = ply[1] if ply[1]
          end
          ret
        end.call(s1, s2, s3)
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
def parse_csa1
      s0 = @current_pos
      s1 = parse_players
      s1 = nil if s1 == :failed
      s2 = parse_initial_board
      s2 = nil if s2 == :failed
      s3 = parse_moves
      if s3 != :failed
        @reported_pos = s0
        s0 = -> (ply, ini, ms) do
          ret = { "header" => {}, "initial" => ini, "moves" => ms }
          if ply
            ret["header"]["先手"] = ply[0] if ply[0]
            ret["header"]["後手"] = ply[1] if ply[1]
          end
          ret
        end.call(s1, s2, s3)
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
csa1 : players? initialboard? moves