diff --git a/tools/python/jwutils/algo/ShuntingYard.py b/tools/python/jwutils/algo/ShuntingYard.py index dc20e6e..f2c23d9 100644 --- a/tools/python/jwutils/algo/ShuntingYard.py +++ b/tools/python/jwutils/algo/ShuntingYard.py @@ -171,11 +171,12 @@ class ShuntingYard(object): # export table.append( (v, action, outq, (s[0] for s in stack), note) ) v = note = '' if self.do_debug: - maxcolwidths = [len(max(x, key=len)) for x in zip(*table)] + maxcolwidths = [len(max(x, key=len)) for x in [zip(*table)]] + caller = get_caller_pos() row = table[0] - print(' '.join('{cell:^{width}}'.format(width=width, cell=cell) for (width, cell) in zip(maxcolwidths, row))) + slog(DEBUG, ' '.join('{cell:^{width}}'.format(width=width, cell=cell) for (width, cell) in zip(maxcolwidths, row))) for row in table[1:]: - print(' '.join('{cell:<{width}}'.format(width=width, cell=cell) for (width, cell) in zip(maxcolwidths, row))) + slog(DEBUG, ' '.join('{cell:<{width}}'.format(width=width, cell=cell) for (width, cell) in zip(maxcolwidths, row))) return table[-1][2] def infix_to_postfix_orig(self, infix):