def main(argv): input = FileStream(argv[1]) lexer = MyLexer(input) stream = CommonTokenStream(lexer) parser = MyParser(stream) tree = parser.file() # Replace "file" with the name of the start rule print(tree.toStringTree(recog=parser))