constructor(dfa) {
    this.stateTable = dfa.stateTable;
    this.accepting = dfa.accepting;
    this.tags = dfa.tags;
  }
A StateMachine represents a deterministic finite automaton.
It can perform matches over a sequence of values, similar to a regular expression.