{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/513","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/513/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/513/events","html_url":"https://github.com/svaarala/duktape/pull/513","id":124941747,"number":513,"title":"Loosen rules for RegExp { } literals","user":{"login":"crazyjul","id":1247348,"avatar_url":"https://avatars.githubusercontent.com/u/1247348?v=3","gravatar_id":"","url":"https://api.github.com/users/crazyjul","html_url":"https://github.com/crazyjul","followers_url":"https://api.github.com/users/crazyjul/followers","following_url":"https://api.github.com/users/crazyjul/following{/other_user}","gists_url":"https://api.github.com/users/crazyjul/gists{/gist_id}","starred_url":"https://api.github.com/users/crazyjul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crazyjul/subscriptions","organizations_url":"https://api.github.com/users/crazyjul/orgs","repos_url":"https://api.github.com/users/crazyjul/repos","events_url":"https://api.github.com/users/crazyjul/events{/privacy}","received_events_url":"https://api.github.com/users/crazyjul/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-05T10:54:05Z","updated_at":"2016-01-05T14:58:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/svaarala/duktape/pulls/513","html_url":"https://github.com/svaarala/duktape/pull/513","diff_url":"https://github.com/svaarala/duktape/pull/513.diff","patch_url":"https://github.com/svaarala/duktape/pull/513.patch"},"body":"Check the regex for valid quantifier, if none found, suppose it's a character literal.\r\n\r\nIf } is encountered outside of quantifier parsing, it is treated as a literal\r\n\r\nThis MR fixes #142 and partial for #74"},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/169024863","html_url":"https://github.com/svaarala/duktape/pull/513#issuecomment-169024863","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/513","id":169024863,"user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T14:58:34Z","updated_at":"2016-01-05T14:58:34Z","body":"As for the concrete questions / issues:\r\n\r\nIMO it'd be OK to fail for now for e.g. `/{1111111111/`; the test case should illustrate this current limitation. I think this limitation should actually be fixable, and I can give it a go once the basic change is in master. The memory safety fix will be necessary before merging, of course.\r\n\r\nAs for the config option, I can handle that bit in master (if you prefer), but the change is basically:\r\n\r\n- Add a config metadata file, e.g. `config/config-options/DUK_USE_NONSTD_REGEXP_BRACES.yaml`, the option should be enabled by default. The YAML metadata is documented in `config/config-options/DUK_USE_EXAMPLE.yaml` but comparing to existing files is also useful.\r\n- Modify the changes in the lexer so that the new/old behavior are behind `#if defined(DUK_USE_NONSTD_REGEXP_BRACES)`. Test both cases by modifying `duk_config.h`.\r\n\r\nOnce the remaining issues are resolved, I'll be happy to merge this pull, and I think a lot of users will appreciate it :-)"}}