{"action":"created","comment":{"url":"https://api.github.com/repos/softdevteam/lrpar/pulls/comments/37309158","id":37309158,"diff_hunk":"@@ -344,3 +360,127 @@ pub fn goto1(grm: &Grammar, firsts: &HashMap<String, HashSet<String>>,\n     closure1(grm, firsts, &mut goto);\n     goto\n }\n+\n+// Haven't decided yet if I want to use a struct or not\n+// struct State {\n+//     id: usize,","path":"src/lib/pgen.rs","position":52,"original_position":52,"commit_id":"98e81f820fbc273900a0ee97b6fc6540497bfd35","original_commit_id":"366e99bc0ebf3b57007831179ee3d39d36b8ff1b","user":{"login":"ptersilie","id":375552,"avatar_url":"https://avatars.githubusercontent.com/u/375552?v=3","gravatar_id":"","url":"https://api.github.com/users/ptersilie","html_url":"https://github.com/ptersilie","followers_url":"https://api.github.com/users/ptersilie/followers","following_url":"https://api.github.com/users/ptersilie/following{/other_user}","gists_url":"https://api.github.com/users/ptersilie/gists{/gist_id}","starred_url":"https://api.github.com/users/ptersilie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptersilie/subscriptions","organizations_url":"https://api.github.com/users/ptersilie/orgs","repos_url":"https://api.github.com/users/ptersilie/repos","events_url":"https://api.github.com/users/ptersilie/events{/privacy}","received_events_url":"https://api.github.com/users/ptersilie/received_events","type":"User","site_admin":false},"body":"Yes, we need a way to get the state from its state number anyway, so storing the number on the state itself is not really necessary.","created_at":"2015-08-18T15:04:19Z","updated_at":"2015-08-18T15:04:19Z","html_url":"https://github.com/softdevteam/lrpar/pull/19#discussion_r37309158","pull_request_url":"https://api.github.com/repos/softdevteam/lrpar/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/comments/37309158"},"html":{"href":"https://github.com/softdevteam/lrpar/pull/19#discussion_r37309158"},"pull_request":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/softdevteam/lrpar/pulls/19","id":42705346,"html_url":"https://github.com/softdevteam/lrpar/pull/19","diff_url":"https://github.com/softdevteam/lrpar/pull/19.diff","patch_url":"https://github.com/softdevteam/lrpar/pull/19.patch","issue_url":"https://api.github.com/repos/softdevteam/lrpar/issues/19","number":19,"state":"open","locked":false,"title":"Added function to build stategraphs","user":{"login":"ptersilie","id":375552,"avatar_url":"https://avatars.githubusercontent.com/u/375552?v=3","gravatar_id":"","url":"https://api.github.com/users/ptersilie","html_url":"https://github.com/ptersilie","followers_url":"https://api.github.com/users/ptersilie/followers","following_url":"https://api.github.com/users/ptersilie/following{/other_user}","gists_url":"https://api.github.com/users/ptersilie/gists{/gist_id}","starred_url":"https://api.github.com/users/ptersilie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptersilie/subscriptions","organizations_url":"https://api.github.com/users/ptersilie/orgs","repos_url":"https://api.github.com/users/ptersilie/repos","events_url":"https://api.github.com/users/ptersilie/events{/privacy}","received_events_url":"https://api.github.com/users/ptersilie/received_events","type":"User","site_admin":false},"body":"This function takes a `Grammar` as input and then builds a `StateGraph` containing all states and their edges.\r\n\r\nThe `test_stategraph` uses the following grammar:\r\n\r\n```\r\nZ : S\r\nS : Sb\r\n    bAa\r\nA : aSc\r\n    a\r\n    aSb\r\n```\r\n\r\nthe resulting graph looks like this (with one extra state `Start! : Z. {$}` and an additional rule `Start! : .Z {$}` in State #0):\r\n![test_grammar](https://cloud.githubusercontent.com/assets/375552/9332722/f8465e64-45bd-11e5-963a-4da09019e6c5.png)\r\nNote that the state numbers may be different each execution due to the `LR1Items` being stored in a `HashSet` and thus being processed in arbitrary order.","created_at":"2015-08-18T14:31:35Z","updated_at":"2015-08-18T15:04:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2dfd952c2e61e7f5d5af287c5483aa525bb1968c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/softdevteam/lrpar/pulls/19/commits","review_comments_url":"https://api.github.com/repos/softdevteam/lrpar/pulls/19/comments","review_comment_url":"https://api.github.com/repos/softdevteam/lrpar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/softdevteam/lrpar/issues/19/comments","statuses_url":"https://api.github.com/repos/softdevteam/lrpar/statuses/98e81f820fbc273900a0ee97b6fc6540497bfd35","head":{"label":"softdevteam:stategraph","ref":"stategraph","sha":"98e81f820fbc273900a0ee97b6fc6540497bfd35","user":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"repo":{"id":36933561,"name":"lrpar","full_name":"softdevteam/lrpar","owner":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softdevteam/lrpar","description":"Rust LR parser","fork":false,"url":"https://api.github.com/repos/softdevteam/lrpar","forks_url":"https://api.github.com/repos/softdevteam/lrpar/forks","keys_url":"https://api.github.com/repos/softdevteam/lrpar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softdevteam/lrpar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softdevteam/lrpar/teams","hooks_url":"https://api.github.com/repos/softdevteam/lrpar/hooks","issue_events_url":"https://api.github.com/repos/softdevteam/lrpar/issues/events{/number}","events_url":"https://api.github.com/repos/softdevteam/lrpar/events","assignees_url":"https://api.github.com/repos/softdevteam/lrpar/assignees{/user}","branches_url":"https://api.github.com/repos/softdevteam/lrpar/branches{/branch}","tags_url":"https://api.github.com/repos/softdevteam/lrpar/tags","blobs_url":"https://api.github.com/repos/softdevteam/lrpar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softdevteam/lrpar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softdevteam/lrpar/git/refs{/sha}","trees_url":"https://api.github.com/repos/softdevteam/lrpar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softdevteam/lrpar/statuses/{sha}","languages_url":"https://api.github.com/repos/softdevteam/lrpar/languages","stargazers_url":"https://api.github.com/repos/softdevteam/lrpar/stargazers","contributors_url":"https://api.github.com/repos/softdevteam/lrpar/contributors","subscribers_url":"https://api.github.com/repos/softdevteam/lrpar/subscribers","subscription_url":"https://api.github.com/repos/softdevteam/lrpar/subscription","commits_url":"https://api.github.com/repos/softdevteam/lrpar/commits{/sha}","git_commits_url":"https://api.github.com/repos/softdevteam/lrpar/git/commits{/sha}","comments_url":"https://api.github.com/repos/softdevteam/lrpar/comments{/number}","issue_comment_url":"https://api.github.com/repos/softdevteam/lrpar/issues/comments{/number}","contents_url":"https://api.github.com/repos/softdevteam/lrpar/contents/{+path}","compare_url":"https://api.github.com/repos/softdevteam/lrpar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softdevteam/lrpar/merges","archive_url":"https://api.github.com/repos/softdevteam/lrpar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softdevteam/lrpar/downloads","issues_url":"https://api.github.com/repos/softdevteam/lrpar/issues{/number}","pulls_url":"https://api.github.com/repos/softdevteam/lrpar/pulls{/number}","milestones_url":"https://api.github.com/repos/softdevteam/lrpar/milestones{/number}","notifications_url":"https://api.github.com/repos/softdevteam/lrpar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softdevteam/lrpar/labels{/name}","releases_url":"https://api.github.com/repos/softdevteam/lrpar/releases{/id}","created_at":"2015-06-05T13:16:16Z","updated_at":"2015-08-05T14:47:09Z","pushed_at":"2015-08-18T14:56:43Z","git_url":"git://github.com/softdevteam/lrpar.git","ssh_url":"git@github.com:softdevteam/lrpar.git","clone_url":"https://github.com/softdevteam/lrpar.git","svn_url":"https://github.com/softdevteam/lrpar","homepage":"http://soft-dev.org/","size":356,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"softdevteam:master","ref":"master","sha":"553ec784fda2950d62f04ec5aaee6f9477801cbf","user":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"repo":{"id":36933561,"name":"lrpar","full_name":"softdevteam/lrpar","owner":{"login":"softdevteam","id":10271085,"avatar_url":"https://avatars.githubusercontent.com/u/10271085?v=3","gravatar_id":"","url":"https://api.github.com/users/softdevteam","html_url":"https://github.com/softdevteam","followers_url":"https://api.github.com/users/softdevteam/followers","following_url":"https://api.github.com/users/softdevteam/following{/other_user}","gists_url":"https://api.github.com/users/softdevteam/gists{/gist_id}","starred_url":"https://api.github.com/users/softdevteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softdevteam/subscriptions","organizations_url":"https://api.github.com/users/softdevteam/orgs","repos_url":"https://api.github.com/users/softdevteam/repos","events_url":"https://api.github.com/users/softdevteam/events{/privacy}","received_events_url":"https://api.github.com/users/softdevteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/softdevteam/lrpar","description":"Rust LR parser","fork":false,"url":"https://api.github.com/repos/softdevteam/lrpar","forks_url":"https://api.github.com/repos/softdevteam/lrpar/forks","keys_url":"https://api.github.com/repos/softdevteam/lrpar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/softdevteam/lrpar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/softdevteam/lrpar/teams","hooks_url":"https://api.github.com/repos/softdevteam/lrpar/hooks","issue_events_url":"https://api.github.com/repos/softdevteam/lrpar/issues/events{/number}","events_url":"https://api.github.com/repos/softdevteam/lrpar/events","assignees_url":"https://api.github.com/repos/softdevteam/lrpar/assignees{/user}","branches_url":"https://api.github.com/repos/softdevteam/lrpar/branches{/branch}","tags_url":"https://api.github.com/repos/softdevteam/lrpar/tags","blobs_url":"https://api.github.com/repos/softdevteam/lrpar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/softdevteam/lrpar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/softdevteam/lrpar/git/refs{/sha}","trees_url":"https://api.github.com/repos/softdevteam/lrpar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/softdevteam/lrpar/statuses/{sha}","languages_url":"https://api.github.com/repos/softdevteam/lrpar/languages","stargazers_url":"https://api.github.com/repos/softdevteam/lrpar/stargazers","contributors_url":"https://api.github.com/repos/softdevteam/lrpar/contributors","subscribers_url":"https://api.github.com/repos/softdevteam/lrpar/subscribers","subscription_url":"https://api.github.com/repos/softdevteam/lrpar/subscription","commits_url":"https://api.github.com/repos/softdevteam/lrpar/commits{/sha}","git_commits_url":"https://api.github.com/repos/softdevteam/lrpar/git/commits{/sha}","comments_url":"https://api.github.com/repos/softdevteam/lrpar/comments{/number}","issue_comment_url":"https://api.github.com/repos/softdevteam/lrpar/issues/comments{/number}","contents_url":"https://api.github.com/repos/softdevteam/lrpar/contents/{+path}","compare_url":"https://api.github.com/repos/softdevteam/lrpar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/softdevteam/lrpar/merges","archive_url":"https://api.github.com/repos/softdevteam/lrpar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/softdevteam/lrpar/downloads","issues_url":"https://api.github.com/repos/softdevteam/lrpar/issues{/number}","pulls_url":"https://api.github.com/repos/softdevteam/lrpar/pulls{/number}","milestones_url":"https://api.github.com/repos/softdevteam/lrpar/milestones{/number}","notifications_url":"https://api.github.com/repos/softdevteam/lrpar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/softdevteam/lrpar/labels{/name}","releases_url":"https://api.github.com/repos/softdevteam/lrpar/releases{/id}","created_at":"2015-06-05T13:16:16Z","updated_at":"2015-08-05T14:47:09Z","pushed_at":"2015-08-18T14:56:43Z","git_url":"git://github.com/softdevteam/lrpar.git","ssh_url":"git@github.com:softdevteam/lrpar.git","clone_url":"https://github.com/softdevteam/lrpar.git","svn_url":"https://github.com/softdevteam/lrpar","homepage":"http://soft-dev.org/","size":356,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/19"},"html":{"href":"https://github.com/softdevteam/lrpar/pull/19"},"issue":{"href":"https://api.github.com/repos/softdevteam/lrpar/issues/19"},"comments":{"href":"https://api.github.com/repos/softdevteam/lrpar/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/softdevteam/lrpar/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/softdevteam/lrpar/statuses/98e81f820fbc273900a0ee97b6fc6540497bfd35"}}}}