Improved octave parsing