summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-04-19 08:47:04 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-04-19 08:47:04 +0200
commit43d32703f5ec3c4541895de345884ae82a2df220 (patch)
tree204f06cd2455d37739b045bea1f42cca8b2bea3d /bin
parent666b73d0d9eed9f6ccd49ea43c8211d0f4160305 (diff)
add dfa-to-dot
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dfa-to-dot.py13
1 files changed, 13 insertions, 0 deletions
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:])