A rape victim has hit out at the law after the man accused of attacking her was cleared because he was sleepwalking.