From 6b6f5d5d1538719d6722e2cf2bb017c7701f259e Mon Sep 17 00:00:00 2001 From: Kia <kia@special-circumstanc.es> Date: Sat, 30 May 2020 19:39:49 -0600 Subject: [PATCH] improve prettyprinting tree --- python_arborist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_arborist.py b/python_arborist.py index b79f33e..00ccc6f 100644 --- a/python_arborist.py +++ b/python_arborist.py @@ -265,7 +265,7 @@ class TreeNode: return str(self.language_element) + str(self.subnodes) -def walk_the_tree(tree, level = 0): +def walk_the_tree(tree, level = 1): if tree == None: return @@ -298,7 +298,7 @@ if __name__ == '__main__': init_data = [OPENPAREN, 0xE101, ADDOP, OPENPAREN, OPENPAREN, 0XE102,CLOSEPAREN, CLOSEPAREN, ADDOP, 0XE103, CLOSEPAREN, MULTOP, 0XE104, ENDOFPARSE] - + with m.Switch(nine.input_memory_addr): for addr,data in enumerate(init_data): with m.Case(addr): -- GitLab