optimized parsing with exceptions