From 43d32703f5ec3c4541895de345884ae82a2df220 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 19 Apr 2021 08:47:04 +0200 Subject: add dfa-to-dot --- bin/dfa-to-dot.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/dfa-to-dot.py (limited to 'bin/dfa-to-dot.py') diff --git a/bin/dfa-to-dot.py b/bin/dfa-to-dot.py new file mode 100755 index 0000000..837f833 --- /dev/null +++ b/bin/dfa-to-dot.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +from dfatool.automata import PTA +import sys + + +def main(filename): + pta = PTA.from_file(filename) + print(pta.to_dot()) + + +if __name__ == "__main__": + main(*sys.argv[1:]) -- cgit v1.2.3