6 Back to DFAs

Alright, so what does Vi has anything to do with DFAs? The search patterns recognized by vi are called “regular expressions”. One can prove that for each regular expression, there exists at least one DFA M that recognizes the language generated by the regular expression.

Whoa!

Although not strictly necessary, we can include ε in Σ. This makes it possible to make a transition even when there is no input symbol. This makes it possible make “connector” states for components in a DFA. Note that once a state has an ε transition, it cannot have any other (outgoing) transitions in a DFA.

Furthermore, it is also convenient to make assumptions about the un-stated transitions. Unless otherwise stated, u S,σ Σ −{ε} : T(u,σ) = s. This means that unless otherwise stated, all transitions goes back to the start state of the entire machine (not start state of a component machine).

 6.1 Regex to DFA (work in progress)
  6.1.1 Single literal symbol
  6.1.2 Sequence
  6.1.3 Alternatives
  6.1.4 Getting rid of epsilon transitions
  6.1.5 Any number of
  6.1.6 At least one of
  6.1.7 Getting rid of “unget” transitions