tunnelvisionlabs/antlr4

Provide more readable result for org.antlr.v4.runtime.TokenStream#getText(java.lang.Object, java.lang.Object)

Closed this issue · 2 comments

Hi Sam(@sharwell),

   When I develop the new parser Parrot for Groovy programming language, 

I find the text of tokens generated by antlr4 are a bit hard to read and ambiguous, e.g.

class X {a b

As you see, a and b are concatenated without any separators:

Unexpected input: 'ab' at line: 1, column: 12

Currently org.antlr.v4.runtime.TokenStream#getText(java.lang.Object, java.lang.Object) is used.
Could you please provide more readable getText method? (e.g. remaining text of the hidden channel tokens) Or give me some hints to implement it by myself? Thanks in advance!

Hi Sam( @sharwell ) , could you set aside some time to have a look at the issue? Thanks in advance.

I find a workaround for the issue: daniellansun/groovy-parser@b80ed68

Thanks all the same for your long time support :)