I\'m trying to use antlr4 version 4.4 and the python2 runtime. The grammar is from the antlr4 book, page 6, file: Hello.g4:
grammar Hello;
It looks like you took the wrong toStringStree function.
toStringStree
Take a look at the java docs.
This explains the error message "object does not support indexing". The function you chose expects a list of rule names and not the parser.