Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:timtadh/pyflow
Browse files Browse the repository at this point in the history
Conflicts:

	AST.dot
	gram.py
	gram.pyc
	visualize.py
  • Loading branch information
Stephen Johnson committed Dec 12, 2008
2 parents e90699e + a0a70ae commit de8c509
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 412 deletions.
518 changes: 259 additions & 259 deletions AST.dot

Large diffs are not rendered by default.

Binary file added AST.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion gram.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def __init__(self, children=[], symbol=''):
for index,child in enumerate(self.children):
if child.__class__ != Node:
self.children[index] = Node(symbol='"'+str(child)+'"')
self.children[index].graph_color = "#8888ff"
self.children[index].graph_color = "#6666aa"
self.symbol = symbol

def traverse(self, node, i=0):
Expand Down
Binary file modified gram.pyc
Binary file not shown.
302 changes: 151 additions & 151 deletions parsetab.py

Large diffs are not rendered by default.

Binary file modified parsetab.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion visualize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import gram
import subprocess

header_string = "digraph %s {\n node [shape=box];\n"
subgraph_prefix = " {\n rank=same; \n"
Expand Down Expand Up @@ -67,4 +68,5 @@ def ast_dot(root, path, name="AST"):
f.close()
top = c_parser.parse(data)
ast_dot(top, "AST.dot")
#dot -Tpdf AST.dot -o AST.pdf -v
print "Running dot..."
popen_obj = subprocess.Popen(["dot", "-Tpdf", "AST.dot", "-o", "AST.pdf"])

0 comments on commit de8c509

Please sign in to comment.