A Characterization of the Leaf Language Classes