Replace semicolon with EOS when semicolon can be omitted.