Previous

Next


12. The NFA Engine

  • NFA stands for "Non-Deterministic Finite Automaton".
  • (PS. Yes, because it's no longer "deterministic", mathematically [apparently] that means that we are not using a "regular" expression anymore! That's why you'll somtimes see them called "nonregular expressions").
  • An NFA regex engine is sometimes called a "regex directed" engine, because this time, it's the regex that controls the way it matches.
  • This is the engine that looks like our simplified example engine - it starts at the first character in the target string, and then it tries to match the regex - and if it fails, it bumps along to the next character, backtracking through the regex when required.
  • Let's look at the same example as last time, but this time with an NFA engine.

Previous

Next

Andrew Hill

For LinuxSA Meeting, 17 April 2001