Commit e49cebde authored by Igor Dejanovic's avatar Igor Dejanovic

A note in examples for .dot files creation in debug mode.

parent bf1de23c
......@@ -129,6 +129,9 @@ def main(debug=False, file_name=None):
if __name__ == "__main__":
# First parameter is bibtex file
if len(sys.argv) > 1:
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
entries = main(debug=True, file_name=sys.argv[1])
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(entries)
......
......@@ -121,5 +121,8 @@ def main(debug=False):
print("{} = {}".format(input_expr, result))
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
......@@ -60,5 +60,8 @@ def main(debug=False):
print("{} = {}".format(input_expr, result))
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
......@@ -34,5 +34,8 @@ def main(debug=False):
parse_tree = parser.parse(test_data)
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
......@@ -88,5 +88,8 @@ def main(debug=False):
parse_tree = parser.parse(testdata)
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
......@@ -64,6 +64,9 @@ def main(debug=False):
# ParserPEG will use ParserPython to parse peg_grammar definition and
# create parser_model for parsing PEG based grammars
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
parser = ParserPEG(peg_grammar, 'peggrammar', debug=debug)
# Now we will use created parser to parse the same peg_grammar used for
......
......@@ -114,5 +114,8 @@ def main(debug=False):
print("position = ", result)
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
......@@ -72,5 +72,8 @@ def main(debug=False):
return parser.getASG(sem_actions=semantic_actions)
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
print("position = ", main(debug=True))
......@@ -50,5 +50,8 @@ def main(debug=False):
if __name__ == "__main__":
# In debug mode dot (graphviz) files for parser model
# and parse tree will be created for visualization.
# Checkout current folder for .dot files.
main(debug=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment