code: func (b *AutomatonBuilder) finish() *Automaton {
  	// fmt.Printf("LA.Builder.finish: count=%v\n", len(b.transitions)/4)
  	// fmt.Println("finish pending")
  	util.NewInPlaceMergeSorter(srcMinMaxDestSorter(b.transitions)).Sort(0, len(b.transitions)/4)
  	for upto := 0; upto < len(b.transitions); upto += 4 {
  		b.a.addTransitionRange(
  			b.transitions[upto],
  			b.transitions[upto+1],
  			b.transitions[upto+2],
  			b.transitions[upto+3],
  		)
  	}
  
  	b.a.finishState()
  	return b.a
  }
docs: /* Compiles all added states and transitions into a new Automaton and returns it. */