measuring AC voltage with an analog input pin.

Why not use a transformer, for example 120vac to 12 vac, then rectify and apply to a divider?