summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sotoudeh <matthew@masot.net>2024-03-19 11:25:03 -0700
committerMatthew Sotoudeh <matthew@masot.net>2024-03-19 11:25:03 -0700
commit5214650e55e52e652f256316e2937274495fd35b (patch)
tree95dfc0d66e271b828054b71ac70b9154e6033035
parenta55ef8495f79d297c5fbf74c47c3243b3caf68d1 (diff)
add a simplified version of the regex
-rw-r--r--examples/simpler_correct.regex1
-rw-r--r--nfa.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/examples/simpler_correct.regex b/examples/simpler_correct.regex
new file mode 100644
index 0000000..99b8458
--- /dev/null
+++ b/examples/simpler_correct.regex
@@ -0,0 +1 @@
+(S*)((c(S*)c)|(h(S*)h)|(p(S*)p))
diff --git a/nfa.py b/nfa.py
index aba0a50..73e3733 100644
--- a/nfa.py
+++ b/nfa.py
@@ -119,4 +119,4 @@ class NFA:
for state, transitions in self.transitions.items():
print(state, state in self.start_set, state in self.accepting)
for k, vs in transitions.items():
- print("\t", state, "[", k, "]", "->", vs)
+ print("\t", k, "->", vs)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback