{"action":"opened","issue":{"url":"https://api.github.com/repos/toml-lang/toml/issues/570","repository_url":"https://api.github.com/repos/toml-lang/toml","labels_url":"https://api.github.com/repos/toml-lang/toml/issues/570/labels{/name}","comments_url":"https://api.github.com/repos/toml-lang/toml/issues/570/comments","events_url":"https://api.github.com/repos/toml-lang/toml/issues/570/events","html_url":"https://github.com/toml-lang/toml/issues/570","id":367453664,"node_id":"MDU6SXNzdWUzNjc0NTM2NjQ=","number":570,"title":"Ambiguous multi-line string rules in ABNF definition","user":{"login":"jorisvr","id":6183894,"node_id":"MDQ6VXNlcjYxODM4OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6183894?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvr","html_url":"https://github.com/jorisvr","followers_url":"https://api.github.com/users/jorisvr/followers","following_url":"https://api.github.com/users/jorisvr/following{/other_user}","gists_url":"https://api.github.com/users/jorisvr/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvr/subscriptions","organizations_url":"https://api.github.com/users/jorisvr/orgs","repos_url":"https://api.github.com/users/jorisvr/repos","events_url":"https://api.github.com/users/jorisvr/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-06T12:40:28Z","updated_at":"2018-10-06T12:40:28Z","closed_at":null,"author_association":"NONE","body":"First, I strongly appreciate the effort to create an ABNF definition for TOML. It is a great way to make provide a precise specification of the TOML language.\r\n\r\nI think I found two ambigous rules in the current version of the ABNF.\r\n1. The ABNF allows unlimited use of raw \" characters inside multi-line basic strings.\r\n2. The ABNF allows unlimited use of raw ' characters inside multi-line literal strings.\r\n\r\nFor (1), note that `ml-basic-unescaped` includes the raw character \" and `ml-basic-string` may contain unlimited sequences of `ml-basic-unescaped`. As a result, the following TOML document is valid:\r\n\r\n    a = \"\"\" multi-line basic string \" \"\" \"\"\" \"\"\"\" \"\"\"\"\" \"\"\"\"\"\" still inside the string \"\"\"\r\n\r\nThe following TOML document is ambiguous:\r\n\r\n    a = \"\"\"\" string \"\"\" # comment or still part of the string ? \"\"\"\r\n\r\nIt can be parsed either as `{\"a\": \" string \"}` or as `{\"a\": \" string \\\"\\\"\\\" # comment or still part of the string ? \"}`\r\n\r\nFor (2), the situation is analogous."}}
{"actor":{"display_login":"jorisvr"}}