Skip to content

Commit

Permalink
Added and removed some debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0b committed Apr 15, 2012
1 parent 80a95d6 commit d937d79
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion jupyLR/stack.py
Expand Up @@ -5,7 +5,7 @@


def printlist(l, pfx):
print pfx + ('\n' + pfx).join(map(str, l))
print pfx + '\n ' + '\n '.join(map(str, l))


class stack_item(object):
Expand Down Expand Up @@ -95,6 +95,10 @@ def reduce(self, node, ruleidx):
def merge(self):
merged_s = {}
self.previously_active = self.active[:self.count_active]
#printlist(list(p
# for sis in self.active[self.count_active:]
# for p in self.rec_all_pathes(sis)),
# "before merge: ")
for node in self.active[self.count_active:]:
state = node.data
if state in merged_s:
Expand All @@ -103,6 +107,10 @@ def merge(self):
merged_s[state] = node
self.active = merged_s.values()
self.count_active = len(self.active)
#printlist(list(p
# for sis in self.active
# for p in self.rec_all_pathes(sis)),
# "after merge: ")

def dump(self):
print "GSS HAS", self.count_active, "ACTIVE STATES"
Expand Down

0 comments on commit d937d79

Please sign in to comment.