anchor.diff:                      if options.Unicode then
                           unicodeTransitionVectorElements (
                               compiledRule,
  -                            Int32WithMeasure ruleDfaStateId,
  -                            Int32WithMeasure baseDfaStateId,
  +                            tag ruleDfaStateId,
  +                            tag baseDfaStateId,
                               indentingWriter)
                       else
                           asciiTransitionVectorElements (
                               compiledRule,
  -                            Int32WithMeasure ruleDfaStateId,
  -                            Int32WithMeasure baseDfaStateId,
  +                            tag ruleDfaStateId,
  +                            tag baseDfaStateId,
                               indentingWriter)
   
                       // Emit the closing bracket of the transition vector for this state,
  
positive.code:             ||> Map.fold (fun combinedDfaStateCount _ compiledRule ->
                  combinedDfaStateCount + compiledRule.Dfa.Transitions.VertexCount)
  
          /// The set of all valid input characters.
          let allValidInputChars =
              // OPTIMIZE : This could be determined on-the-fly while compiling the DFA
              // so we don't have to perform a costly additional computation here.
              (CharSet.empty, compiledRules)
              ||> Map.fold (fun allValidInputChars _ compiledRule ->
                  (allValidInputChars, compiledRule.Dfa.Transitions.AdjacencyMap)
                  ||> HashMap.fold (fun allValidInputChars _ edgeSet ->
                      CharSet.union allValidInputChars edgeSet))
  
          /// The maximum character value accepted by the combined DFA.
          let maxCharValue = CharSet.maxElement allValidInputChars
  
          // Emit the 'let' binding for the fslex "Tables" object.
          "/// Interprets the transition and action tables of the lexer automaton."
  
negative.code: 
                  // If no transition edge was found for this character, return the
                  // sentinel value to indicate there's no transition.
                  defaultArg targetStateId (tag <| int sentinelValue)
  
              // Emit the state number of the transition target.
              sprintf "%uus; " (Checked.uint16 targetStateId)
              |> indentingWriter.Write
  
          //
          let unicodeCategoryTransitions, unicodeCharTransitions =
              ((Map.empty, Map.empty), UnicodeCharSet.byCategory)
              ||> Map.fold (fun (categoryTransitions, charTransitions) category categoryChars ->
                  // If there is a transition out of this DFA state for *most* characters in this
                  // Unicode category and all of those transitions go to the same state, we can compress
                  // the lexer table by emitting a transition for the Unicode category itself instead
                  // of the individual characters.
                  // If we do emit a transition for the category, we also need to emit an individual edge
                  // for each character which transitions to a different DFA state than the one used by
                  // the whole category (or the sentinel value to indicate no transition for that character).
  
                  /// The DFA states targeted by transitions labeled with characters from this Unicode class.
                  let weightedTransitionTargets =
                      (Map.empty, categoryChars)
                      ||> CharSet.fold (fun weightedTransitionTargets c ->
                          let target = Map.tryFind c outTransitions
                          match Map.tryFind target weightedTransitionTargets with
                          | None ->
                              Map.add target 1 weightedTransitionTargets
                          | Some weight ->
                              Map.add target (weight + 1) weightedTransitionTargets)
  
                  /// The DFA state targeted by the greatest number of edges labeled with
                  /// characters from this Unicode category.
                  let categoryTarget =
                      // TODO : Simplify this to use the Map.maxKeyBy function from ExtCore.
                      (None, weightedTransitionTargets)
                      ||> Map.fold (fun categoryTarget target weight ->
                          match categoryTarget with
                          | None ->
                              Some (target, weight)
                          | Some (_, maxWeight) ->
                              if weight > maxWeight then
                                  Some (target, weight)
                              else categoryTarget)
                      // Discard the intermediate values from the fold.
                      |> Option.get
                      |> fst
  
                  // Add the DFA state targeted by the greatest number of edges labeled with
                  // characters in this Unicode category to the category-transition-target map.
                  let categoryTransitions = Map.add category categoryTarget categoryTransitions
                  
                  // Add individual character transitions for any character which targets a different state
                  // (or does not label a transition from this state).
                  let charTransitions =
                      (charTransitions, categoryChars)
                      ||> CharSet.fold (fun charTransitions c ->
                          // Filter out ASCII characters -- we've already emitted transitions for them.
                          if int c < 128 then
                              charTransitions
                          else
                              let target = Map.tryFind c outTransitions
                              if target = categoryTarget then
                                  charTransitions
                              else
                                  Map.add c target charTransitions)
  
                  // Pass the category and character transition maps to the next iteration.
                  categoryTransitions, charTransitions)
  
          // Emit entries for specific Unicode elements.
          unicodeCharTransitions
  