anchor.diff:      let s = {lastList=0;c=c;out=out;out1=out1}
       s
   
  -type Ptrlist= State option list 
  -
  +type RewriteState=
  +    | State_out1 of State
  +    | State_out of State
   (*
    * A partially built NFA without the matching state filled in.
    * Frag.start points at the start state.
  
positive.code:         out:Ptrlist
      }
  *)
  type Frag(start:State, out:Ptrlist)=
      member val start=start
      member val out=out with get,set
  
  (* Initialize Frag struct. *)
  let frag(start:State, out:Ptrlist)=
      let n=new Frag(start=start, out=out)
      n
  
  (* Create singleton list containing just outp. *)
  let list1 (outp:State option) : Ptrlist= 
      [outp]
  (* Patch the list of states at out to point to start. *)
  let patch (list : Ptrlist, s: State) : Ptrlist =
      let l = list |> List.length
      [ for i in 1 .. l ->Some s ]
  
  (* Join the two lists l1 and l2, returning the combination. *)
  let append(l1:Ptrlist, l2:Ptrlist) :Ptrlist=
      l1 @ l2
  
  (*
   * Convert postfix regular expression to NFA.
  
negative.code:         | '.' -> //catenate 
              let e2 = pop()
              let e1 = pop()
              patch(e1.out, e2.start)
              push(frag(e1.start, e2.out))
          | '|' -> //alternate
              let e2 = pop()
  