comparison python/tree.py @ 323:e9fe6988497c

Used burg for generating expressions
author Windel Bouwman
date Thu, 30 Jan 2014 19:03:24 +0100
parents 44f336460c2a
children
comparison
equal deleted inserted replaced
322:44f336460c2a 323:e9fe6988497c
51 self.burm_state(tree) 51 self.burm_state(tree)
52 52
53 def apply_rules(self, tree, goal): 53 def apply_rules(self, tree, goal):
54 rule = tree.state.get_rule(goal) 54 rule = tree.state.get_rule(goal)
55 results = [self.apply_rules(kid_tree, kid_goal) 55 results = [self.apply_rules(kid_tree, kid_goal)
56 for kid_tree, kid_goal in zip(self.kids(tree, rule), self.nts(rule))] 56 for kid_tree, kid_goal in zip(self.kids(tree, rule), self.nts(rule))]
57 self.pat_f[rule](tree, *results) 57 return self.pat_f[rule](tree, *results)