parse rationals