anchor.diff:                      EndingMode = endingMode
                       Nesting = nesting
                   }
  -                i <- i + 8 + nesting.Count
  +                i <- i + nestingCount
   
               groups.MoveToImmutable()
  +
  +        let readProductions (terminals: ImmutableArray<_>) (nonterminals: ImmutableArray<_>) span =
  +            let span = checkHeader span productionsHeader
  +            let prodCount = wantUInt32 span 0 |> int
  +            let prods = ImmutableArray.CreateBuilder(prodCount)
  +
  +            let mutable i = 1
  +            while i < span.Length do
  +                let head = nonterminals.[int <| wantUInt32 span (i + 0)]
  +
  +                let handleLength = int <| wantUInt32 span (i + 1)
  +                i <- i + 2
  +
  +                let handle =
  +                    let handle = ImmutableArray.CreateBuilder(handleLength)
  +                    let span = span.Slice(i)
  +                    for i = 0 to handleLength - 1 do
  +                        let idx = wantUInt32 span (2 * i + 1) |> int
  +                        match wantByte span (2 * i) with
  +                        | 'T'B -> LALRSymbol.Terminal terminals.[idx]
  +                        | 'N'B -> LALRSymbol.Nonterminal nonterminals.[idx]
  +                        | x -> invalidEGTf "Cannot retrieve production handle tag. Got %x" x
  +                        |> handle.Add
  +                    handle.MoveToImmutable()
  +
  +                prods.Add {
  +                    Index = uint32 prods.Count
  +                    Head = head
  +                    Handle = handle
  +                }
  +                i <- i + 2 * handleLength
  +
  +            prods.MoveToImmutable()
   
   /// Functions to write a grammar to EGTneo files.
   module EGTNeoWriter =
   
       open EGTWriter
  +    open System.Buffers
   
       module private Implementation =
   
  
positive.code:             indexOf "Start symbol" nonterminals startSymbol
              |> writeSingleValued w startSymbolHeader
  
          let writeGroups w noiseSymbols (groups: ImmutableArray<Group>) =
              let arr = ResizeArray()
  
  
negative.code: 
              for i = 0 to groups.Length - 1 do
                  let group = groups.[i]
  
                  arr.Add <| Entry.String group.Name
                  arr.Add <| Entry.Boolean group.IsTerminal
                  arr.Add <|
  