{"action":"closed","issue":{"url":"https://api.github.com/repos/antlr/antlr4/issues/802","labels_url":"https://api.github.com/repos/antlr/antlr4/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/antlr/antlr4/issues/802/comments","events_url":"https://api.github.com/repos/antlr/antlr4/issues/802/events","html_url":"https://github.com/antlr/antlr4/issues/802","id":55325613,"number":802,"title":"enterXXX for alt label never gets called","user":{"login":"martint","id":14387,"avatar_url":"https://avatars.githubusercontent.com/u/14387?v=3","gravatar_id":"","url":"https://api.github.com/users/martint","html_url":"https://github.com/martint","followers_url":"https://api.github.com/users/martint/followers","following_url":"https://api.github.com/users/martint/following{/other_user}","gists_url":"https://api.github.com/users/martint/gists{/gist_id}","starred_url":"https://api.github.com/users/martint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martint/subscriptions","organizations_url":"https://api.github.com/users/martint/orgs","repos_url":"https://api.github.com/users/martint/repos","events_url":"https://api.github.com/users/martint/events{/privacy}","received_events_url":"https://api.github.com/users/martint/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/antlr/antlr4/labels/comp:runtime","name":"comp:runtime","color":"ededed"},{"url":"https://api.github.com/repos/antlr/antlr4/labels/parsers","name":"parsers","color":"ededed"},{"url":"https://api.github.com/repos/antlr/antlr4/labels/type:improvement","name":"type:improvement","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/antlr/antlr4/milestones/12","html_url":"https://github.com/antlr/antlr4/milestones/4.5.1","labels_url":"https://api.github.com/repos/antlr/antlr4/milestones/12/labels","id":979762,"number":12,"title":"4.5.1","description":null,"creator":{"login":"parrt","id":178777,"avatar_url":"https://avatars.githubusercontent.com/u/178777?v=3","gravatar_id":"","url":"https://api.github.com/users/parrt","html_url":"https://github.com/parrt","followers_url":"https://api.github.com/users/parrt/followers","following_url":"https://api.github.com/users/parrt/following{/other_user}","gists_url":"https://api.github.com/users/parrt/gists{/gist_id}","starred_url":"https://api.github.com/users/parrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parrt/subscriptions","organizations_url":"https://api.github.com/users/parrt/orgs","repos_url":"https://api.github.com/users/parrt/repos","events_url":"https://api.github.com/users/parrt/events{/privacy}","received_events_url":"https://api.github.com/users/parrt/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":28,"state":"open","created_at":"2015-02-14T22:00:01Z","updated_at":"2015-05-20T01:11:31Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-01-23T20:00:53Z","updated_at":"2015-05-20T01:11:31Z","closed_at":"2015-05-20T01:11:31Z","body":"The test case below prints:\r\n\r\n```\r\nexiting alt1\r\n```\r\n\r\nbut I'd expect it to print:\r\n\r\n```\r\nentering alt1\r\nexiting alt1\r\n```\r\n\r\n```\r\ngrammar Test;\r\n\r\na\r\n    : 'b'   #alt1\r\n    | 'c'   #alt2\r\n    ;\r\n```\r\n\r\n```java\r\nimport org.antlr.v4.runtime.ANTLRInputStream;\r\nimport org.antlr.v4.runtime.CommonTokenStream;\r\nimport org.antlr.v4.runtime.misc.NotNull;\r\n\r\npublic class Main\r\n{\r\n    public static void main(String[] args)\r\n    {\r\n        TestParser parser = new TestParser(new CommonTokenStream(new TestLexer(new ANTLRInputStream(\"b\"))));\r\n\r\n        parser.addParseListener(new TestBaseListener() {\r\n            @Override\r\n            public void enterAlt1(@NotNull TestParser.Alt1Context ctx)\r\n            {\r\n                System.out.println(\"entering alt1\");\r\n            }\r\n\r\n            @Override\r\n            public void exitAlt1(@NotNull TestParser.Alt1Context ctx)\r\n            {\r\n                System.out.println(\"exiting alt1\");\r\n            }\r\n        });\r\n\r\n        parser.a();\r\n    }\r\n}\r\n```"}}