{"action":"created","comment":{"url":"https://api.github.com/repos/mqnc/c-sick/pulls/comments/208096577","pull_request_review_id":143837768,"id":208096577,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODA5NjU3Nw==","diff_hunk":"@@ -6,142 +6,96 @@\n #include \"stringutils.h\"\n #include \"peglib.h\"\n \n-#define DEBUG_PARSER\n+#define DEBUG_PARSER // display each step of the parsing process\n #define DEBUG_STRLEN 40 // display that many chars of the parsing text in debug output\n \n using namespace peg;\n using namespace std;\n \n-// main\n-int Main(vector<string> args)\n-{\n \n-\t// check arguments\n-\tif(args.size()<3){\n-\t\tcout << \"usage: \" << args[0] << \" parser.lua file\" << endl\n-\t\t\t<< \"\\tRead the grammar and reduction rules from parser.lua and\" << endl\n-\t\t\t<< \"\\tparse the given file.\" << endl;\n-\t\treturn EXIT_FAILURE;\n-\t}\n+void registerReductionRule(parser *pegParser, lua_State *L, const string& rule, const string& funcName){","path":"src/main.cpp","position":22,"original_position":22,"commit_id":"88ecc586a1c086c87f2737a01255c09354ea99f3","original_commit_id":"88ecc586a1c086c87f2737a01255c09354ea99f3","user":{"login":"jkuebart","id":24879979,"node_id":"MDQ6VXNlcjI0ODc5OTc5","avatar_url":"https://avatars1.githubusercontent.com/u/24879979?v=4","gravatar_id":"","url":"https://api.github.com/users/jkuebart","html_url":"https://github.com/jkuebart","followers_url":"https://api.github.com/users/jkuebart/followers","following_url":"https://api.github.com/users/jkuebart/following{/other_user}","gists_url":"https://api.github.com/users/jkuebart/gists{/gist_id}","starred_url":"https://api.github.com/users/jkuebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkuebart/subscriptions","organizations_url":"https://api.github.com/users/jkuebart/orgs","repos_url":"https://api.github.com/users/jkuebart/repos","events_url":"https://api.github.com/users/jkuebart/events{/privacy}","received_events_url":"https://api.github.com/users/jkuebart/received_events","type":"User","site_admin":false},"body":"Passing by pointer or reference is independent of being »a heap thing«. Just call `registerReductionRule(*pegParser, …)`.","created_at":"2018-08-07T04:37:01Z","updated_at":"2018-08-07T04:37:01Z","html_url":"https://github.com/mqnc/c-sick/pull/10#discussion_r208096577","pull_request_url":"https://api.github.com/repos/mqnc/c-sick/pulls/10","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/comments/208096577"},"html":{"href":"https://github.com/mqnc/c-sick/pull/10#discussion_r208096577"},"pull_request":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/10"}},"in_reply_to_id":208013386},"pull_request":{"url":"https://api.github.com/repos/mqnc/c-sick/pulls/10","id":206501797,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NTAxNzk3","html_url":"https://github.com/mqnc/c-sick/pull/10","diff_url":"https://github.com/mqnc/c-sick/pull/10.diff","patch_url":"https://github.com/mqnc/c-sick/pull/10.patch","issue_url":"https://api.github.com/repos/mqnc/c-sick/issues/10","number":10,"state":"open","locked":false,"title":"Parser as lib","user":{"login":"jkuebart","id":24879979,"node_id":"MDQ6VXNlcjI0ODc5OTc5","avatar_url":"https://avatars1.githubusercontent.com/u/24879979?v=4","gravatar_id":"","url":"https://api.github.com/users/jkuebart","html_url":"https://github.com/jkuebart","followers_url":"https://api.github.com/users/jkuebart/followers","following_url":"https://api.github.com/users/jkuebart/following{/other_user}","gists_url":"https://api.github.com/users/jkuebart/gists{/gist_id}","starred_url":"https://api.github.com/users/jkuebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkuebart/subscriptions","organizations_url":"https://api.github.com/users/jkuebart/orgs","repos_url":"https://api.github.com/users/jkuebart/repos","events_url":"https://api.github.com/users/jkuebart/events{/privacy}","received_events_url":"https://api.github.com/users/jkuebart/received_events","type":"User","site_admin":false},"body":"Note: I only created this PR in order to be able to comment the changes.","created_at":"2018-08-06T20:02:14Z","updated_at":"2018-08-07T04:37:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c57071283b04dc6a01cfa95c026c5a340b07fdf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mqnc/c-sick/pulls/10/commits","review_comments_url":"https://api.github.com/repos/mqnc/c-sick/pulls/10/comments","review_comment_url":"https://api.github.com/repos/mqnc/c-sick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mqnc/c-sick/issues/10/comments","statuses_url":"https://api.github.com/repos/mqnc/c-sick/statuses/88ecc586a1c086c87f2737a01255c09354ea99f3","head":{"label":"mqnc:parser_as_lib","ref":"parser_as_lib","sha":"88ecc586a1c086c87f2737a01255c09354ea99f3","user":{"login":"mqnc","id":12005608,"node_id":"MDQ6VXNlcjEyMDA1NjA4","avatar_url":"https://avatars1.githubusercontent.com/u/12005608?v=4","gravatar_id":"","url":"https://api.github.com/users/mqnc","html_url":"https://github.com/mqnc","followers_url":"https://api.github.com/users/mqnc/followers","following_url":"https://api.github.com/users/mqnc/following{/other_user}","gists_url":"https://api.github.com/users/mqnc/gists{/gist_id}","starred_url":"https://api.github.com/users/mqnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqnc/subscriptions","organizations_url":"https://api.github.com/users/mqnc/orgs","repos_url":"https://api.github.com/users/mqnc/repos","events_url":"https://api.github.com/users/mqnc/events{/privacy}","received_events_url":"https://api.github.com/users/mqnc/received_events","type":"User","site_admin":false},"repo":{"id":141716128,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3MTYxMjg=","name":"c-sick","full_name":"mqnc/c-sick","owner":{"login":"mqnc","id":12005608,"node_id":"MDQ6VXNlcjEyMDA1NjA4","avatar_url":"https://avatars1.githubusercontent.com/u/12005608?v=4","gravatar_id":"","url":"https://api.github.com/users/mqnc","html_url":"https://github.com/mqnc","followers_url":"https://api.github.com/users/mqnc/followers","following_url":"https://api.github.com/users/mqnc/following{/other_user}","gists_url":"https://api.github.com/users/mqnc/gists{/gist_id}","starred_url":"https://api.github.com/users/mqnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqnc/subscriptions","organizations_url":"https://api.github.com/users/mqnc/orgs","repos_url":"https://api.github.com/users/mqnc/repos","events_url":"https://api.github.com/users/mqnc/events{/privacy}","received_events_url":"https://api.github.com/users/mqnc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mqnc/c-sick","description":"Usable programming language on top of C++","fork":false,"url":"https://api.github.com/repos/mqnc/c-sick","forks_url":"https://api.github.com/repos/mqnc/c-sick/forks","keys_url":"https://api.github.com/repos/mqnc/c-sick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mqnc/c-sick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mqnc/c-sick/teams","hooks_url":"https://api.github.com/repos/mqnc/c-sick/hooks","issue_events_url":"https://api.github.com/repos/mqnc/c-sick/issues/events{/number}","events_url":"https://api.github.com/repos/mqnc/c-sick/events","assignees_url":"https://api.github.com/repos/mqnc/c-sick/assignees{/user}","branches_url":"https://api.github.com/repos/mqnc/c-sick/branches{/branch}","tags_url":"https://api.github.com/repos/mqnc/c-sick/tags","blobs_url":"https://api.github.com/repos/mqnc/c-sick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mqnc/c-sick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mqnc/c-sick/git/refs{/sha}","trees_url":"https://api.github.com/repos/mqnc/c-sick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mqnc/c-sick/statuses/{sha}","languages_url":"https://api.github.com/repos/mqnc/c-sick/languages","stargazers_url":"https://api.github.com/repos/mqnc/c-sick/stargazers","contributors_url":"https://api.github.com/repos/mqnc/c-sick/contributors","subscribers_url":"https://api.github.com/repos/mqnc/c-sick/subscribers","subscription_url":"https://api.github.com/repos/mqnc/c-sick/subscription","commits_url":"https://api.github.com/repos/mqnc/c-sick/commits{/sha}","git_commits_url":"https://api.github.com/repos/mqnc/c-sick/git/commits{/sha}","comments_url":"https://api.github.com/repos/mqnc/c-sick/comments{/number}","issue_comment_url":"https://api.github.com/repos/mqnc/c-sick/issues/comments{/number}","contents_url":"https://api.github.com/repos/mqnc/c-sick/contents/{+path}","compare_url":"https://api.github.com/repos/mqnc/c-sick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mqnc/c-sick/merges","archive_url":"https://api.github.com/repos/mqnc/c-sick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mqnc/c-sick/downloads","issues_url":"https://api.github.com/repos/mqnc/c-sick/issues{/number}","pulls_url":"https://api.github.com/repos/mqnc/c-sick/pulls{/number}","milestones_url":"https://api.github.com/repos/mqnc/c-sick/milestones{/number}","notifications_url":"https://api.github.com/repos/mqnc/c-sick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mqnc/c-sick/labels{/name}","releases_url":"https://api.github.com/repos/mqnc/c-sick/releases{/id}","deployments_url":"https://api.github.com/repos/mqnc/c-sick/deployments","created_at":"2018-07-20T13:34:48Z","updated_at":"2018-08-05T19:29:21Z","pushed_at":"2018-08-06T20:02:15Z","git_url":"git://github.com/mqnc/c-sick.git","ssh_url":"git@github.com:mqnc/c-sick.git","clone_url":"https://github.com/mqnc/c-sick.git","svn_url":"https://github.com/mqnc/c-sick","homepage":null,"size":917,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"mqnc:lua-value","ref":"lua-value","sha":"919d6b1da982a20d2f397d43b06bda54e278c243","user":{"login":"mqnc","id":12005608,"node_id":"MDQ6VXNlcjEyMDA1NjA4","avatar_url":"https://avatars1.githubusercontent.com/u/12005608?v=4","gravatar_id":"","url":"https://api.github.com/users/mqnc","html_url":"https://github.com/mqnc","followers_url":"https://api.github.com/users/mqnc/followers","following_url":"https://api.github.com/users/mqnc/following{/other_user}","gists_url":"https://api.github.com/users/mqnc/gists{/gist_id}","starred_url":"https://api.github.com/users/mqnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqnc/subscriptions","organizations_url":"https://api.github.com/users/mqnc/orgs","repos_url":"https://api.github.com/users/mqnc/repos","events_url":"https://api.github.com/users/mqnc/events{/privacy}","received_events_url":"https://api.github.com/users/mqnc/received_events","type":"User","site_admin":false},"repo":{"id":141716128,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3MTYxMjg=","name":"c-sick","full_name":"mqnc/c-sick","owner":{"login":"mqnc","id":12005608,"node_id":"MDQ6VXNlcjEyMDA1NjA4","avatar_url":"https://avatars1.githubusercontent.com/u/12005608?v=4","gravatar_id":"","url":"https://api.github.com/users/mqnc","html_url":"https://github.com/mqnc","followers_url":"https://api.github.com/users/mqnc/followers","following_url":"https://api.github.com/users/mqnc/following{/other_user}","gists_url":"https://api.github.com/users/mqnc/gists{/gist_id}","starred_url":"https://api.github.com/users/mqnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqnc/subscriptions","organizations_url":"https://api.github.com/users/mqnc/orgs","repos_url":"https://api.github.com/users/mqnc/repos","events_url":"https://api.github.com/users/mqnc/events{/privacy}","received_events_url":"https://api.github.com/users/mqnc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mqnc/c-sick","description":"Usable programming language on top of C++","fork":false,"url":"https://api.github.com/repos/mqnc/c-sick","forks_url":"https://api.github.com/repos/mqnc/c-sick/forks","keys_url":"https://api.github.com/repos/mqnc/c-sick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mqnc/c-sick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mqnc/c-sick/teams","hooks_url":"https://api.github.com/repos/mqnc/c-sick/hooks","issue_events_url":"https://api.github.com/repos/mqnc/c-sick/issues/events{/number}","events_url":"https://api.github.com/repos/mqnc/c-sick/events","assignees_url":"https://api.github.com/repos/mqnc/c-sick/assignees{/user}","branches_url":"https://api.github.com/repos/mqnc/c-sick/branches{/branch}","tags_url":"https://api.github.com/repos/mqnc/c-sick/tags","blobs_url":"https://api.github.com/repos/mqnc/c-sick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mqnc/c-sick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mqnc/c-sick/git/refs{/sha}","trees_url":"https://api.github.com/repos/mqnc/c-sick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mqnc/c-sick/statuses/{sha}","languages_url":"https://api.github.com/repos/mqnc/c-sick/languages","stargazers_url":"https://api.github.com/repos/mqnc/c-sick/stargazers","contributors_url":"https://api.github.com/repos/mqnc/c-sick/contributors","subscribers_url":"https://api.github.com/repos/mqnc/c-sick/subscribers","subscription_url":"https://api.github.com/repos/mqnc/c-sick/subscription","commits_url":"https://api.github.com/repos/mqnc/c-sick/commits{/sha}","git_commits_url":"https://api.github.com/repos/mqnc/c-sick/git/commits{/sha}","comments_url":"https://api.github.com/repos/mqnc/c-sick/comments{/number}","issue_comment_url":"https://api.github.com/repos/mqnc/c-sick/issues/comments{/number}","contents_url":"https://api.github.com/repos/mqnc/c-sick/contents/{+path}","compare_url":"https://api.github.com/repos/mqnc/c-sick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mqnc/c-sick/merges","archive_url":"https://api.github.com/repos/mqnc/c-sick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mqnc/c-sick/downloads","issues_url":"https://api.github.com/repos/mqnc/c-sick/issues{/number}","pulls_url":"https://api.github.com/repos/mqnc/c-sick/pulls{/number}","milestones_url":"https://api.github.com/repos/mqnc/c-sick/milestones{/number}","notifications_url":"https://api.github.com/repos/mqnc/c-sick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mqnc/c-sick/labels{/name}","releases_url":"https://api.github.com/repos/mqnc/c-sick/releases{/id}","deployments_url":"https://api.github.com/repos/mqnc/c-sick/deployments","created_at":"2018-07-20T13:34:48Z","updated_at":"2018-08-05T19:29:21Z","pushed_at":"2018-08-06T20:02:15Z","git_url":"git://github.com/mqnc/c-sick.git","ssh_url":"git@github.com:mqnc/c-sick.git","clone_url":"https://github.com/mqnc/c-sick.git","svn_url":"https://github.com/mqnc/c-sick","homepage":null,"size":917,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/10"},"html":{"href":"https://github.com/mqnc/c-sick/pull/10"},"issue":{"href":"https://api.github.com/repos/mqnc/c-sick/issues/10"},"comments":{"href":"https://api.github.com/repos/mqnc/c-sick/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mqnc/c-sick/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/mqnc/c-sick/statuses/88ecc586a1c086c87f2737a01255c09354ea99f3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jkuebart"}}