further unrolling of string parsing states and elimination of `when`
guards