Analyticity for some degenerate one-dimensional evolution equations