{"action":"created","issue":{"url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/4","labels_url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/4/comments","events_url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/4/events","html_url":"https://github.com/rpgleparser/rpgleparser/issues/4","id":62450813,"number":4,"title":"When using the generated base listener many tokens are terminal nodes rather than typed","user":{"login":"TheEricWilson","id":9723207,"avatar_url":"https://avatars.githubusercontent.com/u/9723207?v=3","gravatar_id":"","url":"https://api.github.com/users/TheEricWilson","html_url":"https://github.com/TheEricWilson","followers_url":"https://api.github.com/users/TheEricWilson/followers","following_url":"https://api.github.com/users/TheEricWilson/following{/other_user}","gists_url":"https://api.github.com/users/TheEricWilson/gists{/gist_id}","starred_url":"https://api.github.com/users/TheEricWilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheEricWilson/subscriptions","organizations_url":"https://api.github.com/users/TheEricWilson/orgs","repos_url":"https://api.github.com/users/TheEricWilson/repos","events_url":"https://api.github.com/users/TheEricWilson/events{/privacy}","received_events_url":"https://api.github.com/users/TheEricWilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-17T16:37:09Z","updated_at":"2015-03-18T22:32:15Z","closed_at":null,"body":"My intended use of this is to use the listener and get the \"parts of speech\" labeling for each token rather than doing it by token position. For example it is essential to be able to know the result indicators whether be in the Hi or Lo or Eq positions. What is in Factor1, Factor 2, and Result.... What is the opcode...\r\n\r\nRight now as things are being parsed I would have to do a lot of error prone coding to decide which ordinal position in the token stream is what. \r\n\r\nI have made a modification to my POM to create a jar which I reference in a separate project for the Listener stuff."},"comment":{"url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/comments/83210232","html_url":"https://github.com/rpgleparser/rpgleparser/issues/4#issuecomment-83210232","issue_url":"https://api.github.com/repos/rpgleparser/rpgleparser/issues/4","id":83210232,"user":{"login":"DavidGregory084","id":2992938,"avatar_url":"https://avatars.githubusercontent.com/u/2992938?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidGregory084","html_url":"https://github.com/DavidGregory084","followers_url":"https://api.github.com/users/DavidGregory084/followers","following_url":"https://api.github.com/users/DavidGregory084/following{/other_user}","gists_url":"https://api.github.com/users/DavidGregory084/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidGregory084/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidGregory084/subscriptions","organizations_url":"https://api.github.com/users/DavidGregory084/orgs","repos_url":"https://api.github.com/users/DavidGregory084/repos","events_url":"https://api.github.com/users/DavidGregory084/events{/privacy}","received_events_url":"https://api.github.com/users/DavidGregory084/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T22:32:15Z","updated_at":"2015-03-18T22:32:15Z","body":"Hi all, sorry for being late to the party; I kind of neglected `showParseTree` because it's not used in any of the tests - it probably should be able to accept some indication of the context of the input like you say!\r\nYou're absolutely right: I collapsed `pad280` and `pad280Free` into `padSourceLines` and then hid usages inside the `expect...` assertion methods - maybe I should change the second parameter to `isFreeSnippet` rather than `isSnippet` as this should make it a little clearer to use.\r\nYou can get access to the token names as in the snippet below:\r\n\r\n```java\r\nANTLRInputStream input = new ANTLRInputStream(inputString);\r\nRpgLexer lexer = new RpgLexer(input);\r\nVocabulary vocabulary = lexer.getVocabulary();\r\nCommonToken token; // A token from a ParseTree object\r\nString displayName = vocabulary.getDisplayName(token.getType())\r\n```"}}