anchor.diff:      //
       Transitions : LexerDfaGraph;
       /// Final (accepting) DFA states.
  +    // OPTIMIZE : Use the TagSet type from ExtCore.
       FinalStates : Set<DfaStateId>;
       /// Maps regular vectors to the DFA state representing them.
       RegularVectorToDfaState : Map<RegularVector, DfaStateId>;
       /// Maps a DFA state to the regular vector it represents.
  +    // OPTIMIZE : Use the TagMap type from ExtCore.
       DfaStateToRegularVector : Map<DfaStateId, RegularVector>;
   }
   
  
positive.code:     Transitions : LexerDfaGraph;
      /// For each accepting state of the DFA, specifies the
      /// index of the rule-clause accepted by the state.
      RuleClauseAcceptedByState : Map<DfaStateId, RuleClauseIndex>;
      /// The initial state of the DFA.
      InitialState : DfaStateId;
  
negative.code: 
  //
  let private getAlphabet regex =
      let rec getAlphabet regex =
          Cps.cont {
          match regex with
          | Regex.Any
          | Regex.Epsilon ->
              return CharSet.empty
  
          | Regex.CharacterSet charSet ->
              return charSet
  
          | Regex.Negate r
          | Regex.Star r ->
              return! getAlphabet r
  
          | Regex.And (r, s)
          | Regex.Concat (r, s)
          | Regex.Or (r, s) ->
              let! rAlphabet = getAlphabet r
              let! sAlphabet = getAlphabet s
              return CharSet.union rAlphabet sAlphabet
          }
  
      getAlphabet regex id
  
  // This is necessary for fslex-compatibility.
  // In the future, it will be moved into the fslex-compatibility backend.
  let private rewriteNegatedCharSets universe regex =
      let rec rewriteNegatedCharSets regex =
          Cps.cont {
          match regex with
          | Regex.Negate (Regex.CharacterSet charSet) ->
              return
                  charSet
                  |> CharSet.difference universe
                  |> Regex.CharacterSet
  
          | Regex.Any
          | Regex.Epsilon
          | Regex.CharacterSet _
              as regex ->
              return regex
  
          | Regex.Negate r ->
              let! r = rewriteNegatedCharSets r
              return Regex.Negate r
  
          | Regex.Star r ->
              let! r = rewriteNegatedCharSets r
              return Regex.Star r
  
          | Regex.And (r, s) ->
              let! r = rewriteNegatedCharSets r
              let! s = rewriteNegatedCharSets s
              return Regex.And (r, s)
  
          | Regex.Concat (r, s) ->
              let! r = rewriteNegatedCharSets r
              let! s = rewriteNegatedCharSets s
              return Regex.Concat (r, s)
  
          | Regex.Or (r, s) ->
              let! r = rewriteNegatedCharSets r
              let! s = rewriteNegatedCharSets s
              return Regex.Or (r, s)
          }
  
      rewriteNegatedCharSets regex id
  
  