Factor out attribute parsing methods in standard derivers.