{"action":"opened","number":7094,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094","id":83221183,"html_url":"https://github.com/DynamoDS/Dynamo/pull/7094","diff_url":"https://github.com/DynamoDS/Dynamo/pull/7094.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/7094.patch","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/7094","number":7094,"state":"open","locked":false,"title":"Fix Escape Character Edge Case Issues in CodeBlockNode(#7044)","user":{"login":"samuelcwl","id":16283396,"avatar_url":"https://avatars.githubusercontent.com/u/16283396?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelcwl","html_url":"https://github.com/samuelcwl","followers_url":"https://api.github.com/users/samuelcwl/followers","following_url":"https://api.github.com/users/samuelcwl/following{/other_user}","gists_url":"https://api.github.com/users/samuelcwl/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelcwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelcwl/subscriptions","organizations_url":"https://api.github.com/users/samuelcwl/orgs","repos_url":"https://api.github.com/users/samuelcwl/repos","events_url":"https://api.github.com/users/samuelcwl/events{/privacy}","received_events_url":"https://api.github.com/users/samuelcwl/received_events","type":"User","site_admin":false},"body":"### Purpose\r\n\r\nAddressing Github Issue #7044, this PR is meant to provide a fix for the weird behavior exhibited by the escape character `\\`.\r\n\r\nPreviously, in several edge cases as demonstrated in the following screenshot, the escape character does not exhibit the correct behavior:\r\n\r\n![escapesequenceerr](https://cloud.githubusercontent.com/assets/16283396/18079930/c53a5246-6ec5-11e6-9d84-8349cb4a5b46.PNG)\r\n\r\nThis meant that there were 3 previously unresolved problems:\r\n\r\n1. There was no `SemiColonExpected` error which could be thrown. This resulted in this class of errors simply throwing `Error: error`.\r\n2. In the scenario where there was an escape character before a close-inverted comma, `\\\"`, the escape character did not escape the close inverted comma.\r\n3. In the scenario where there were two or more lines in the CodeBlockNode, the double escape character sequence before the close inverted comma `\\\\\"` would result in an error.\r\n\r\nPreviously, a fix was made which addressed all 3 problems, but caused Revit to crash (#7068). As such, changes to the code was made and now this fix addresses 2 parts of the issue:\r\n\r\n1. Throwing the appropriate `SemiColonExpected` error when a relevant issue arises.\r\n2. Throwing the appropriate `EOF Expected` error when the escape character escapes the close inverted comma.\r\n3. The last problem could not be solved despite multiple attempts to address the issue through Coco/R's EBNF parser. \r\n\r\nAs such, the current state of string parsing is shown here:\r\n\r\n![backslashissue](https://cloud.githubusercontent.com/assets/16283396/18080097/832cfb8c-6ec6-11e6-85ab-612d462df8a9.PNG)\r\n\r\n![backslashissue2](https://cloud.githubusercontent.com/assets/16283396/18080136/b507df82-6ec6-11e6-9484-313d2c15fad5.PNG)\r\n\r\n### Declarations\r\n\r\nCheck these if you believe they are true\r\n\r\n- [ ] The code base is in a better state after this PR\r\n- [ ] Is documented according to the [standards](https://github.com/DynamoDS/Dynamo/wiki/Coding-Standards)\r\n- [ ] The level of testing this PR includes is appropriate\r\n- [ ] User facing strings, if any, are extracted into `*.resx` files\r\n- [ ] All tests pass using the self-service CI.\r\n- [ ] Snapshot of UI changes, if any.\r\n- [ ] Follows [Semantic Versioning](https://github.com/DynamoDS/Dynamo/wiki/Dynamo-Versions) standards (*No change of public methods or types etc..*)\r\n\r\n### Reviewers\r\n\r\n@ke-yu \r\n\r\n### FYIs\r\n\r\n","created_at":"2016-08-30T07:31:20Z","updated_at":"2016-08-30T07:31:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/7094/comments","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/6c2160405ae6e30e5c67ab79074367e4a337067a","head":{"label":"samuelcwl:backslashv2","ref":"backslashv2","sha":"6c2160405ae6e30e5c67ab79074367e4a337067a","user":{"login":"samuelcwl","id":16283396,"avatar_url":"https://avatars.githubusercontent.com/u/16283396?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelcwl","html_url":"https://github.com/samuelcwl","followers_url":"https://api.github.com/users/samuelcwl/followers","following_url":"https://api.github.com/users/samuelcwl/following{/other_user}","gists_url":"https://api.github.com/users/samuelcwl/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelcwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelcwl/subscriptions","organizations_url":"https://api.github.com/users/samuelcwl/orgs","repos_url":"https://api.github.com/users/samuelcwl/repos","events_url":"https://api.github.com/users/samuelcwl/events{/privacy}","received_events_url":"https://api.github.com/users/samuelcwl/received_events","type":"User","site_admin":false},"repo":{"id":61698578,"name":"Dynamo","full_name":"samuelcwl/Dynamo","owner":{"login":"samuelcwl","id":16283396,"avatar_url":"https://avatars.githubusercontent.com/u/16283396?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelcwl","html_url":"https://github.com/samuelcwl","followers_url":"https://api.github.com/users/samuelcwl/followers","following_url":"https://api.github.com/users/samuelcwl/following{/other_user}","gists_url":"https://api.github.com/users/samuelcwl/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelcwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelcwl/subscriptions","organizations_url":"https://api.github.com/users/samuelcwl/orgs","repos_url":"https://api.github.com/users/samuelcwl/repos","events_url":"https://api.github.com/users/samuelcwl/events{/privacy}","received_events_url":"https://api.github.com/users/samuelcwl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samuelcwl/Dynamo","description":"Visual Programming","fork":true,"url":"https://api.github.com/repos/samuelcwl/Dynamo","forks_url":"https://api.github.com/repos/samuelcwl/Dynamo/forks","keys_url":"https://api.github.com/repos/samuelcwl/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samuelcwl/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samuelcwl/Dynamo/teams","hooks_url":"https://api.github.com/repos/samuelcwl/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/samuelcwl/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/samuelcwl/Dynamo/events","assignees_url":"https://api.github.com/repos/samuelcwl/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/samuelcwl/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/samuelcwl/Dynamo/tags","blobs_url":"https://api.github.com/repos/samuelcwl/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samuelcwl/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samuelcwl/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/samuelcwl/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samuelcwl/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/samuelcwl/Dynamo/languages","stargazers_url":"https://api.github.com/repos/samuelcwl/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/samuelcwl/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/samuelcwl/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/samuelcwl/Dynamo/subscription","commits_url":"https://api.github.com/repos/samuelcwl/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/samuelcwl/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/samuelcwl/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/samuelcwl/Dynamo/issues/comments{/number}","contents_url":"https://api.github.com/repos/samuelcwl/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/samuelcwl/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samuelcwl/Dynamo/merges","archive_url":"https://api.github.com/repos/samuelcwl/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samuelcwl/Dynamo/downloads","issues_url":"https://api.github.com/repos/samuelcwl/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/samuelcwl/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/samuelcwl/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/samuelcwl/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samuelcwl/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/samuelcwl/Dynamo/releases{/id}","deployments_url":"https://api.github.com/repos/samuelcwl/Dynamo/deployments","created_at":"2016-06-22T07:32:28Z","updated_at":"2016-06-22T07:32:45Z","pushed_at":"2016-08-30T07:21:13Z","git_url":"git://github.com/samuelcwl/Dynamo.git","ssh_url":"git@github.com:samuelcwl/Dynamo.git","clone_url":"https://github.com/samuelcwl/Dynamo.git","svn_url":"https://github.com/samuelcwl/Dynamo","homepage":"http://dynamobim.org","size":936381,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"DynamoDS:master","ref":"master","sha":"a3521961703d4a6ef2dbbbfe10facadf04ffb830","user":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"repo":{"id":3395179,"name":"Dynamo","full_name":"DynamoDS/Dynamo","owner":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DynamoDS/Dynamo","description":"Visual Programming","fork":false,"url":"https://api.github.com/repos/DynamoDS/Dynamo","forks_url":"https://api.github.com/repos/DynamoDS/Dynamo/forks","keys_url":"https://api.github.com/repos/DynamoDS/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DynamoDS/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DynamoDS/Dynamo/teams","hooks_url":"https://api.github.com/repos/DynamoDS/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/events","assignees_url":"https://api.github.com/repos/DynamoDS/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/DynamoDS/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/tags","blobs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/DynamoDS/Dynamo/languages","stargazers_url":"https://api.github.com/repos/DynamoDS/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/DynamoDS/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscription","commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments{/number}","contents_url":"https://api.github.com/repos/DynamoDS/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/DynamoDS/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DynamoDS/Dynamo/merges","archive_url":"https://api.github.com/repos/DynamoDS/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DynamoDS/Dynamo/downloads","issues_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/DynamoDS/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/DynamoDS/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/DynamoDS/Dynamo/releases{/id}","deployments_url":"https://api.github.com/repos/DynamoDS/Dynamo/deployments","created_at":"2012-02-09T07:35:33Z","updated_at":"2016-08-25T20:29:04Z","pushed_at":"2016-08-30T03:37:08Z","git_url":"git://github.com/DynamoDS/Dynamo.git","ssh_url":"git@github.com:DynamoDS/Dynamo.git","clone_url":"https://github.com/DynamoDS/Dynamo.git","svn_url":"https://github.com/DynamoDS/Dynamo","homepage":"http://dynamobim.org","size":1183317,"stargazers_count":372,"watchers_count":372,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":259,"mirror_url":null,"open_issues_count":634,"forks":259,"open_issues":634,"watchers":372,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/7094"},"issue":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/7094"},"comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/7094/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/7094/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/6c2160405ae6e30e5c67ab79074367e4a337067a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":10,"deletions":2,"changed_files":3}}
{"actor":{"display_login":"samuelcwl"}}