3 ms·
Personally I don't find NFA/DFA helpful with learning regular expressions. To a newcomer, even a naive implementation of NFA/DFA doesn't make sense. Consider t
by irahul 15y ago
Personally I don't find NFA/DFA helpful with learning regular expressions.
To a newcomer, even a naive implementation of NFA/DFA doesn't make sense. Consider this small gist https://gist.github.com/1414061 https://gist.github.com/1414061
I have a feeling a newcomer will come out none the wiser even if he were shown this. And this is just a naive implementation - no nfa to dfa conversions, inefficient implementation etc.
I would root for state diagrams though. Generally diagrams help people see patterns mere text doesn't.