Combinatorial aspects of Sturmian sequences and their generalizations