Previous

Next


10. The DFA Engine

  • DFA stands for "Deterministic Finite Automaton".
  • A DFA regex engine is sometimes called a "text directed" engine because it is the text that is being searched, as opposed to the regex, that directs the matching.
  • The way this works is that the characters in the text being searched are looked at one at a time, in order, and any potential matches in progress, or completed potential matches, are tracked in parallel.
  • Yes, this seems to be completely different to the way I was describing how our simplified regex engine worked in the previous slides - that's because the simplified engine was based on the NFA engine - and we'll get to that shortly.
  • Let's take a look at an example and work through it using the DFA engine.

Previous

Next

Andrew Hill

For LinuxSA Meeting, 17 April 2001