Obtain the transition table from a dense DFA #1223
-
As the title says ... is there any way to obtain the internal transition table from a dense DFA? I'd like to use the DFA to compute the min and max length of a string matching the regex. With access to the transition table, my initial assumption would be that this is pretty straightforward when interpreting the transition table as the adjacency matrix of a graph:
Thanks for any help 🙏🏼 |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Aug 19, 2024
Replies: 1 comment 4 replies
-
Yup! You can use the |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
borchero
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yup! You can use the
Automaton
trait. You should only needAutomaton::start_state
,Automaton::next_state
andAutomaton::next_eoi_state
.