{"action":"created","comment":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/comments/67946733","id":67946733,"diff_hunk":"@@ -0,0 +1,327 @@\n+﻿using Rubberduck.RegexAssistant.Extensions;\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text.RegularExpressions;\n+\n+namespace Rubberduck.RegexAssistant\n+{\n+    public interface IRegularExpression : IDescribable\n+    {\n+        Quantifier Quantifier { get; }\n+\n+        bool TryMatch(string text, out string remaining);\n+    }\n+\n+    public class ConcatenatedExpression : IRegularExpression\n+    {\n+        private readonly Quantifier quant;\n+        internal readonly IList<IRegularExpression> Subexpressions;\n+\n+        public ConcatenatedExpression(IList<IRegularExpression> subexpressions)\n+        {\n+            Subexpressions = subexpressions;\n+            quant = new Quantifier(\"\"); // these are always exactly once. Quantifying happens through groups\n+        }\n+\n+        public string Description\n+        {\n+            get\n+            {\n+                return string.Join(\", \", Subexpressions.Select(exp => exp.Description)) + \" \" + Quantifier.HumanReadable();\n+            }\n+        }\n+\n+        public Quantifier Quantifier\n+        {\n+            get\n+            {\n+                return quant;\n+            }\n+        }\n+\n+        public bool TryMatch(string text, out string remaining)\n+        {\n+            throw new NotImplementedException();\n+        }\n+    }\n+\n+    public class AlternativesExpression : IRegularExpression\n+    {\n+        private readonly Quantifier quant;\n+        internal readonly IList<IRegularExpression> Subexpressions;\n+\n+        public AlternativesExpression(IList<IRegularExpression> subexpressions)\n+        {\n+            Subexpressions = subexpressions;\n+            quant = new Quantifier(\"\"); // these are always exactly once. Quantifying happens through groups","path":"Rubberduck.RegexAssistant/IRegularExpression.cs","position":57,"original_position":57,"commit_id":"a1459c282c64744e1de3f3d5e204453fd6ab82fe","original_commit_id":"a1459c282c64744e1de3f3d5e204453fd6ab82fe","user":{"login":"Vogel612","id":7288995,"avatar_url":"https://avatars.githubusercontent.com/u/7288995?v=3","gravatar_id":"","url":"https://api.github.com/users/Vogel612","html_url":"https://github.com/Vogel612","followers_url":"https://api.github.com/users/Vogel612/followers","following_url":"https://api.github.com/users/Vogel612/following{/other_user}","gists_url":"https://api.github.com/users/Vogel612/gists{/gist_id}","starred_url":"https://api.github.com/users/Vogel612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vogel612/subscriptions","organizations_url":"https://api.github.com/users/Vogel612/orgs","repos_url":"https://api.github.com/users/Vogel612/repos","events_url":"https://api.github.com/users/Vogel612/events{/privacy}","received_events_url":"https://api.github.com/users/Vogel612/received_events","type":"User","site_admin":false},"body":"actually not a nitpick. using \"\" impacts performance on lower optimization compilations because it actually allocates a new String every time","created_at":"2016-06-21T20:36:45Z","updated_at":"2016-06-21T20:36:45Z","html_url":"https://github.com/rubberduck-vba/Rubberduck/pull/1871#discussion_r67946733","pull_request_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871","_links":{"self":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/comments/67946733"},"html":{"href":"https://github.com/rubberduck-vba/Rubberduck/pull/1871#discussion_r67946733"},"pull_request":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871"}}},"pull_request":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871","id":74350759,"html_url":"https://github.com/rubberduck-vba/Rubberduck/pull/1871","diff_url":"https://github.com/rubberduck-vba/Rubberduck/pull/1871.diff","patch_url":"https://github.com/rubberduck-vba/Rubberduck/pull/1871.patch","issue_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/1871","number":1871,"state":"open","locked":false,"title":"Regex Assistant - \"Backend\"","user":{"login":"Vogel612","id":7288995,"avatar_url":"https://avatars.githubusercontent.com/u/7288995?v=3","gravatar_id":"","url":"https://api.github.com/users/Vogel612","html_url":"https://github.com/Vogel612","followers_url":"https://api.github.com/users/Vogel612/followers","following_url":"https://api.github.com/users/Vogel612/following{/other_user}","gists_url":"https://api.github.com/users/Vogel612/gists{/gist_id}","starred_url":"https://api.github.com/users/Vogel612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vogel612/subscriptions","organizations_url":"https://api.github.com/users/Vogel612/orgs","repos_url":"https://api.github.com/users/Vogel612/repos","events_url":"https://api.github.com/users/Vogel612/events{/privacy}","received_events_url":"https://api.github.com/users/Vogel612/received_events","type":"User","site_admin":false},"body":"The \"Backend\" for the RegexAssistant. This should be fully functional. Basic Tests verify the functionality for simple Regexes. The actual working into Descriptions needs some help.\r\n\r\nDesign critique is rather very welcome. Functionality should be:\r\n- Parse an **arbitrary vbscript regex** into an IRegularExpression\r\n\r\nNote: Anchors are not implemented yet","created_at":"2016-06-19T00:06:13Z","updated_at":"2016-06-21T20:36:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1783df1da0d6e6c6c952a5e1da97cb47f5a8ad54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871/commits","review_comments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871/comments","review_comment_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/1871/comments","statuses_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/statuses/a1459c282c64744e1de3f3d5e204453fd6ab82fe","head":{"label":"Vogel612:RegexAssistant","ref":"RegexAssistant","sha":"a1459c282c64744e1de3f3d5e204453fd6ab82fe","user":{"login":"Vogel612","id":7288995,"avatar_url":"https://avatars.githubusercontent.com/u/7288995?v=3","gravatar_id":"","url":"https://api.github.com/users/Vogel612","html_url":"https://github.com/Vogel612","followers_url":"https://api.github.com/users/Vogel612/followers","following_url":"https://api.github.com/users/Vogel612/following{/other_user}","gists_url":"https://api.github.com/users/Vogel612/gists{/gist_id}","starred_url":"https://api.github.com/users/Vogel612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vogel612/subscriptions","organizations_url":"https://api.github.com/users/Vogel612/orgs","repos_url":"https://api.github.com/users/Vogel612/repos","events_url":"https://api.github.com/users/Vogel612/events{/privacy}","received_events_url":"https://api.github.com/users/Vogel612/received_events","type":"User","site_admin":false},"repo":{"id":36952874,"name":"Rubberduck","full_name":"Vogel612/Rubberduck","owner":{"login":"Vogel612","id":7288995,"avatar_url":"https://avatars.githubusercontent.com/u/7288995?v=3","gravatar_id":"","url":"https://api.github.com/users/Vogel612","html_url":"https://github.com/Vogel612","followers_url":"https://api.github.com/users/Vogel612/followers","following_url":"https://api.github.com/users/Vogel612/following{/other_user}","gists_url":"https://api.github.com/users/Vogel612/gists{/gist_id}","starred_url":"https://api.github.com/users/Vogel612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vogel612/subscriptions","organizations_url":"https://api.github.com/users/Vogel612/orgs","repos_url":"https://api.github.com/users/Vogel612/repos","events_url":"https://api.github.com/users/Vogel612/events{/privacy}","received_events_url":"https://api.github.com/users/Vogel612/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vogel612/Rubberduck","description":"Every programmer needs a rubberduck. COM add-in for the VBA IDE (VBE).","fork":true,"url":"https://api.github.com/repos/Vogel612/Rubberduck","forks_url":"https://api.github.com/repos/Vogel612/Rubberduck/forks","keys_url":"https://api.github.com/repos/Vogel612/Rubberduck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vogel612/Rubberduck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vogel612/Rubberduck/teams","hooks_url":"https://api.github.com/repos/Vogel612/Rubberduck/hooks","issue_events_url":"https://api.github.com/repos/Vogel612/Rubberduck/issues/events{/number}","events_url":"https://api.github.com/repos/Vogel612/Rubberduck/events","assignees_url":"https://api.github.com/repos/Vogel612/Rubberduck/assignees{/user}","branches_url":"https://api.github.com/repos/Vogel612/Rubberduck/branches{/branch}","tags_url":"https://api.github.com/repos/Vogel612/Rubberduck/tags","blobs_url":"https://api.github.com/repos/Vogel612/Rubberduck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vogel612/Rubberduck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vogel612/Rubberduck/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vogel612/Rubberduck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vogel612/Rubberduck/statuses/{sha}","languages_url":"https://api.github.com/repos/Vogel612/Rubberduck/languages","stargazers_url":"https://api.github.com/repos/Vogel612/Rubberduck/stargazers","contributors_url":"https://api.github.com/repos/Vogel612/Rubberduck/contributors","subscribers_url":"https://api.github.com/repos/Vogel612/Rubberduck/subscribers","subscription_url":"https://api.github.com/repos/Vogel612/Rubberduck/subscription","commits_url":"https://api.github.com/repos/Vogel612/Rubberduck/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vogel612/Rubberduck/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vogel612/Rubberduck/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vogel612/Rubberduck/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vogel612/Rubberduck/contents/{+path}","compare_url":"https://api.github.com/repos/Vogel612/Rubberduck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vogel612/Rubberduck/merges","archive_url":"https://api.github.com/repos/Vogel612/Rubberduck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vogel612/Rubberduck/downloads","issues_url":"https://api.github.com/repos/Vogel612/Rubberduck/issues{/number}","pulls_url":"https://api.github.com/repos/Vogel612/Rubberduck/pulls{/number}","milestones_url":"https://api.github.com/repos/Vogel612/Rubberduck/milestones{/number}","notifications_url":"https://api.github.com/repos/Vogel612/Rubberduck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vogel612/Rubberduck/labels{/name}","releases_url":"https://api.github.com/repos/Vogel612/Rubberduck/releases{/id}","deployments_url":"https://api.github.com/repos/Vogel612/Rubberduck/deployments","created_at":"2015-06-05T20:03:56Z","updated_at":"2015-06-05T20:03:57Z","pushed_at":"2016-06-21T19:19:02Z","git_url":"git://github.com/Vogel612/Rubberduck.git","ssh_url":"git@github.com:Vogel612/Rubberduck.git","clone_url":"https://github.com/Vogel612/Rubberduck.git","svn_url":"https://github.com/Vogel612/Rubberduck","homepage":"","size":22051,"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":"rubberduck-vba:next","ref":"next","sha":"5fc0039f35a493a19a516bcb9e51a9d2e01a0887","user":{"login":"rubberduck-vba","id":12832254,"avatar_url":"https://avatars.githubusercontent.com/u/12832254?v=3","gravatar_id":"","url":"https://api.github.com/users/rubberduck-vba","html_url":"https://github.com/rubberduck-vba","followers_url":"https://api.github.com/users/rubberduck-vba/followers","following_url":"https://api.github.com/users/rubberduck-vba/following{/other_user}","gists_url":"https://api.github.com/users/rubberduck-vba/gists{/gist_id}","starred_url":"https://api.github.com/users/rubberduck-vba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubberduck-vba/subscriptions","organizations_url":"https://api.github.com/users/rubberduck-vba/orgs","repos_url":"https://api.github.com/users/rubberduck-vba/repos","events_url":"https://api.github.com/users/rubberduck-vba/events{/privacy}","received_events_url":"https://api.github.com/users/rubberduck-vba/received_events","type":"Organization","site_admin":false},"repo":{"id":25800128,"name":"Rubberduck","full_name":"rubberduck-vba/Rubberduck","owner":{"login":"rubberduck-vba","id":12832254,"avatar_url":"https://avatars.githubusercontent.com/u/12832254?v=3","gravatar_id":"","url":"https://api.github.com/users/rubberduck-vba","html_url":"https://github.com/rubberduck-vba","followers_url":"https://api.github.com/users/rubberduck-vba/followers","following_url":"https://api.github.com/users/rubberduck-vba/following{/other_user}","gists_url":"https://api.github.com/users/rubberduck-vba/gists{/gist_id}","starred_url":"https://api.github.com/users/rubberduck-vba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubberduck-vba/subscriptions","organizations_url":"https://api.github.com/users/rubberduck-vba/orgs","repos_url":"https://api.github.com/users/rubberduck-vba/repos","events_url":"https://api.github.com/users/rubberduck-vba/events{/privacy}","received_events_url":"https://api.github.com/users/rubberduck-vba/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubberduck-vba/Rubberduck","description":"Every programmer needs a rubberduck. COM add-in for the VBA IDE (VBE).","fork":false,"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck","forks_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/forks","keys_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/teams","hooks_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/hooks","issue_events_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/events{/number}","events_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/events","assignees_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/assignees{/user}","branches_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/branches{/branch}","tags_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/tags","blobs_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/statuses/{sha}","languages_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/languages","stargazers_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/stargazers","contributors_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/contributors","subscribers_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/subscribers","subscription_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/subscription","commits_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/contents/{+path}","compare_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/merges","archive_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/downloads","issues_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues{/number}","pulls_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls{/number}","milestones_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/milestones{/number}","notifications_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/labels{/name}","releases_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/releases{/id}","deployments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/deployments","created_at":"2014-10-27T02:35:11Z","updated_at":"2016-06-21T19:26:07Z","pushed_at":"2016-06-21T19:19:03Z","git_url":"git://github.com/rubberduck-vba/Rubberduck.git","ssh_url":"git@github.com:rubberduck-vba/Rubberduck.git","clone_url":"https://github.com/rubberduck-vba/Rubberduck.git","svn_url":"https://github.com/rubberduck-vba/Rubberduck","homepage":"","size":23511,"stargazers_count":215,"watchers_count":215,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":70,"mirror_url":null,"open_issues_count":252,"forks":70,"open_issues":252,"watchers":215,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871"},"html":{"href":"https://github.com/rubberduck-vba/Rubberduck/pull/1871"},"issue":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/1871"},"comments":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/1871/comments"},"review_comments":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871/comments"},"review_comment":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/pulls/1871/commits"},"statuses":{"href":"https://api.github.com/repos/rubberduck-vba/Rubberduck/statuses/a1459c282c64744e1de3f3d5e204453fd6ab82fe"}}}}
{"actor":{"display_login":"Vogel612"}}