{"action":"created","comment":{"url":"https://api.github.com/repos/antlr/antlr4/pulls/comments/31870029","id":31870029,"diff_hunk":"@@ -29,6 +29,13 @@\n  */\n package org.antlr.v4.runtime;\n \n+import java.util.ArrayList;","path":"runtime/Java/src/org/antlr/v4/runtime/Parser.java","position":4,"original_position":4,"commit_id":"e17fd409ad922b47382793f6a0a73e580c71b89e","original_commit_id":"e17fd409ad922b47382793f6a0a73e580c71b89e","user":{"login":"sharwell","id":1408396,"avatar_url":"https://avatars.githubusercontent.com/u/1408396?v=3","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"body":":bulb: Your code formatting settings are moving things around. You can prevent these types of changes from appearing in a pull request by reviewing each file of a commit prior to committing it, and undoing any changes which aren't clearly part of the change you are working on.","created_at":"2015-06-06T17:46:23Z","updated_at":"2015-06-06T17:46:23Z","html_url":"https://github.com/antlr/antlr4/pull/888#discussion_r31870029","pull_request_url":"https://api.github.com/repos/antlr/antlr4/pulls/888","_links":{"self":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/comments/31870029"},"html":{"href":"https://github.com/antlr/antlr4/pull/888#discussion_r31870029"},"pull_request":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/888"}}},"pull_request":{"url":"https://api.github.com/repos/antlr/antlr4/pulls/888","id":37037717,"html_url":"https://github.com/antlr/antlr4/pull/888","diff_url":"https://github.com/antlr/antlr4/pull/888.diff","patch_url":"https://github.com/antlr/antlr4/pull/888.patch","issue_url":"https://api.github.com/repos/antlr/antlr4/issues/888","number":888,"state":"open","locked":false,"title":"Report an end position when reporting syntax errors","user":{"login":"michaelpj","id":1699466,"avatar_url":"https://avatars.githubusercontent.com/u/1699466?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpj","html_url":"https://github.com/michaelpj","followers_url":"https://api.github.com/users/michaelpj/followers","following_url":"https://api.github.com/users/michaelpj/following{/other_user}","gists_url":"https://api.github.com/users/michaelpj/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpj/subscriptions","organizations_url":"https://api.github.com/users/michaelpj/orgs","repos_url":"https://api.github.com/users/michaelpj/repos","events_url":"https://api.github.com/users/michaelpj/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpj/received_events","type":"User","site_admin":false},"body":"Clients often want to report a span position for errors, rather than just a point position. Currently, an end position can be reconstructed from the token length for parser errors, but lexer errors do not have tokens attached. Nonetheless, we do know the ending index of the error, and it is helpful to report it.\r\n\r\nFor comparison, what I'm currently doing is using a regex to match the `token error at '...'` error message, pull the offending text out, and use the length of that. That's both slow and fragile, so something like this seems like a better approach.\r\n\r\nThis changes the interface of `ANTLRErrorListener`, so potentially breaks people's subclasses. Ideally, it would be nice to do this without changing the interface, but I don't see an obvious way to do that.","created_at":"2015-06-05T14:42:39Z","updated_at":"2015-06-06T17:46:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82d0370f4ac3dd869358ecac2bbc7ae37fb3552b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/antlr/antlr4/pulls/888/commits","review_comments_url":"https://api.github.com/repos/antlr/antlr4/pulls/888/comments","review_comment_url":"https://api.github.com/repos/antlr/antlr4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antlr/antlr4/issues/888/comments","statuses_url":"https://api.github.com/repos/antlr/antlr4/statuses/e17fd409ad922b47382793f6a0a73e580c71b89e","head":{"label":"michaelpj:error-spans","ref":"error-spans","sha":"e17fd409ad922b47382793f6a0a73e580c71b89e","user":{"login":"michaelpj","id":1699466,"avatar_url":"https://avatars.githubusercontent.com/u/1699466?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpj","html_url":"https://github.com/michaelpj","followers_url":"https://api.github.com/users/michaelpj/followers","following_url":"https://api.github.com/users/michaelpj/following{/other_user}","gists_url":"https://api.github.com/users/michaelpj/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpj/subscriptions","organizations_url":"https://api.github.com/users/michaelpj/orgs","repos_url":"https://api.github.com/users/michaelpj/repos","events_url":"https://api.github.com/users/michaelpj/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpj/received_events","type":"User","site_admin":false},"repo":{"id":25202619,"name":"antlr4","full_name":"michaelpj/antlr4","owner":{"login":"michaelpj","id":1699466,"avatar_url":"https://avatars.githubusercontent.com/u/1699466?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelpj","html_url":"https://github.com/michaelpj","followers_url":"https://api.github.com/users/michaelpj/followers","following_url":"https://api.github.com/users/michaelpj/following{/other_user}","gists_url":"https://api.github.com/users/michaelpj/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelpj/subscriptions","organizations_url":"https://api.github.com/users/michaelpj/orgs","repos_url":"https://api.github.com/users/michaelpj/repos","events_url":"https://api.github.com/users/michaelpj/events{/privacy}","received_events_url":"https://api.github.com/users/michaelpj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/michaelpj/antlr4","description":"ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.","fork":true,"url":"https://api.github.com/repos/michaelpj/antlr4","forks_url":"https://api.github.com/repos/michaelpj/antlr4/forks","keys_url":"https://api.github.com/repos/michaelpj/antlr4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaelpj/antlr4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaelpj/antlr4/teams","hooks_url":"https://api.github.com/repos/michaelpj/antlr4/hooks","issue_events_url":"https://api.github.com/repos/michaelpj/antlr4/issues/events{/number}","events_url":"https://api.github.com/repos/michaelpj/antlr4/events","assignees_url":"https://api.github.com/repos/michaelpj/antlr4/assignees{/user}","branches_url":"https://api.github.com/repos/michaelpj/antlr4/branches{/branch}","tags_url":"https://api.github.com/repos/michaelpj/antlr4/tags","blobs_url":"https://api.github.com/repos/michaelpj/antlr4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaelpj/antlr4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaelpj/antlr4/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaelpj/antlr4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaelpj/antlr4/statuses/{sha}","languages_url":"https://api.github.com/repos/michaelpj/antlr4/languages","stargazers_url":"https://api.github.com/repos/michaelpj/antlr4/stargazers","contributors_url":"https://api.github.com/repos/michaelpj/antlr4/contributors","subscribers_url":"https://api.github.com/repos/michaelpj/antlr4/subscribers","subscription_url":"https://api.github.com/repos/michaelpj/antlr4/subscription","commits_url":"https://api.github.com/repos/michaelpj/antlr4/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaelpj/antlr4/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaelpj/antlr4/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaelpj/antlr4/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaelpj/antlr4/contents/{+path}","compare_url":"https://api.github.com/repos/michaelpj/antlr4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaelpj/antlr4/merges","archive_url":"https://api.github.com/repos/michaelpj/antlr4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaelpj/antlr4/downloads","issues_url":"https://api.github.com/repos/michaelpj/antlr4/issues{/number}","pulls_url":"https://api.github.com/repos/michaelpj/antlr4/pulls{/number}","milestones_url":"https://api.github.com/repos/michaelpj/antlr4/milestones{/number}","notifications_url":"https://api.github.com/repos/michaelpj/antlr4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaelpj/antlr4/labels{/name}","releases_url":"https://api.github.com/repos/michaelpj/antlr4/releases{/id}","created_at":"2014-10-14T11:10:11Z","updated_at":"2014-10-12T21:06:15Z","pushed_at":"2015-06-05T14:38:53Z","git_url":"git://github.com/michaelpj/antlr4.git","ssh_url":"git@github.com:michaelpj/antlr4.git","clone_url":"https://github.com/michaelpj/antlr4.git","svn_url":"https://github.com/michaelpj/antlr4","homepage":"http://antlr.org","size":19384,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"antlr:master","ref":"master","sha":"2e06ed8360b8df2cbdca1da73b3bd7de589a910f","user":{"login":"antlr","id":80584,"avatar_url":"https://avatars.githubusercontent.com/u/80584?v=3","gravatar_id":"","url":"https://api.github.com/users/antlr","html_url":"https://github.com/antlr","followers_url":"https://api.github.com/users/antlr/followers","following_url":"https://api.github.com/users/antlr/following{/other_user}","gists_url":"https://api.github.com/users/antlr/gists{/gist_id}","starred_url":"https://api.github.com/users/antlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antlr/subscriptions","organizations_url":"https://api.github.com/users/antlr/orgs","repos_url":"https://api.github.com/users/antlr/repos","events_url":"https://api.github.com/users/antlr/events{/privacy}","received_events_url":"https://api.github.com/users/antlr/received_events","type":"Organization","site_admin":false},"repo":{"id":501687,"name":"antlr4","full_name":"antlr/antlr4","owner":{"login":"antlr","id":80584,"avatar_url":"https://avatars.githubusercontent.com/u/80584?v=3","gravatar_id":"","url":"https://api.github.com/users/antlr","html_url":"https://github.com/antlr","followers_url":"https://api.github.com/users/antlr/followers","following_url":"https://api.github.com/users/antlr/following{/other_user}","gists_url":"https://api.github.com/users/antlr/gists{/gist_id}","starred_url":"https://api.github.com/users/antlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antlr/subscriptions","organizations_url":"https://api.github.com/users/antlr/orgs","repos_url":"https://api.github.com/users/antlr/repos","events_url":"https://api.github.com/users/antlr/events{/privacy}","received_events_url":"https://api.github.com/users/antlr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/antlr/antlr4","description":"ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.","fork":false,"url":"https://api.github.com/repos/antlr/antlr4","forks_url":"https://api.github.com/repos/antlr/antlr4/forks","keys_url":"https://api.github.com/repos/antlr/antlr4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antlr/antlr4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antlr/antlr4/teams","hooks_url":"https://api.github.com/repos/antlr/antlr4/hooks","issue_events_url":"https://api.github.com/repos/antlr/antlr4/issues/events{/number}","events_url":"https://api.github.com/repos/antlr/antlr4/events","assignees_url":"https://api.github.com/repos/antlr/antlr4/assignees{/user}","branches_url":"https://api.github.com/repos/antlr/antlr4/branches{/branch}","tags_url":"https://api.github.com/repos/antlr/antlr4/tags","blobs_url":"https://api.github.com/repos/antlr/antlr4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antlr/antlr4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antlr/antlr4/git/refs{/sha}","trees_url":"https://api.github.com/repos/antlr/antlr4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antlr/antlr4/statuses/{sha}","languages_url":"https://api.github.com/repos/antlr/antlr4/languages","stargazers_url":"https://api.github.com/repos/antlr/antlr4/stargazers","contributors_url":"https://api.github.com/repos/antlr/antlr4/contributors","subscribers_url":"https://api.github.com/repos/antlr/antlr4/subscribers","subscription_url":"https://api.github.com/repos/antlr/antlr4/subscription","commits_url":"https://api.github.com/repos/antlr/antlr4/commits{/sha}","git_commits_url":"https://api.github.com/repos/antlr/antlr4/git/commits{/sha}","comments_url":"https://api.github.com/repos/antlr/antlr4/comments{/number}","issue_comment_url":"https://api.github.com/repos/antlr/antlr4/issues/comments{/number}","contents_url":"https://api.github.com/repos/antlr/antlr4/contents/{+path}","compare_url":"https://api.github.com/repos/antlr/antlr4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antlr/antlr4/merges","archive_url":"https://api.github.com/repos/antlr/antlr4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antlr/antlr4/downloads","issues_url":"https://api.github.com/repos/antlr/antlr4/issues{/number}","pulls_url":"https://api.github.com/repos/antlr/antlr4/pulls{/number}","milestones_url":"https://api.github.com/repos/antlr/antlr4/milestones{/number}","notifications_url":"https://api.github.com/repos/antlr/antlr4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antlr/antlr4/labels{/name}","releases_url":"https://api.github.com/repos/antlr/antlr4/releases{/id}","created_at":"2010-02-04T01:36:28Z","updated_at":"2015-06-06T17:39:14Z","pushed_at":"2015-06-06T16:30:22Z","git_url":"git://github.com/antlr/antlr4.git","ssh_url":"git@github.com:antlr/antlr4.git","clone_url":"https://github.com/antlr/antlr4.git","svn_url":"https://github.com/antlr/antlr4","homepage":"http://antlr.org","size":24730,"stargazers_count":804,"watchers_count":804,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"open_issues_count":84,"forks":239,"open_issues":84,"watchers":804,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/888"},"html":{"href":"https://github.com/antlr/antlr4/pull/888"},"issue":{"href":"https://api.github.com/repos/antlr/antlr4/issues/888"},"comments":{"href":"https://api.github.com/repos/antlr/antlr4/issues/888/comments"},"review_comments":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/888/comments"},"review_comment":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antlr/antlr4/pulls/888/commits"},"statuses":{"href":"https://api.github.com/repos/antlr/antlr4/statuses/e17fd409ad922b47382793f6a0a73e580c71b89e"}}}}