anchor.diff:    <|> ((a (Resword "if")) .>>. preterm .>>. a (Resword "then") .>>. preterm .>>. a (Resword "else") .>>. preterm |>> lmk_ite)
     <|> ((a (Resword "[")) .>>. elistof preterm (a (Resword ";")) "term" .>>. a (Resword "]") |>> (pmk_list << snd << fst))
     <|> ((a (Resword "{")) .>>.
  -     (elistof nocommapreterm (a (Ident ",")) "term" .>>.  a (Resword "}") |>> lmk_setenum
  -      <|> preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "}") |>> lmk_setabs
  -      <|> preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "}") |>> lmk_setcompr) |>> snd)
  +        (elistof nocommapreterm (a (Ident ",")) "term" .>>.  a (Resword "}") |>> lmk_setenum
  +          <|> preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "}") |>> lmk_setabs
  +          <|> preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "|") .>>. preterm .>>. a (Resword "}") |>> lmk_setcompr) |>> snd)
     <|> ((a (Resword "match")) .>>. preterm .>>. a (Resword "with") .>>. clauses |>> (fun (((_,e),_),c) -> Combp(Combp(Varp("_MATCH",dpty),e),c)))
     <|> ((a (Resword "function")) .>>. clauses |>> (fun (_,c) -> Combp(Varp("_FUNCTION",dpty),c)))
     <|> ((a (Ident "#")) .>>. identifier .>>. possibly (a (Resword ".") .>>. identifier |>> snd) |>> lmk_decimal)
  
positive.code:   let rec pfrees ptm acc =
      match ptm with
        Varp(v,pty) ->
          if v = "" & pty = dpty then acc
          elif can get_const_type v || can num_of_string v || exists (fun (w,_) -> v = w) (!the_interface) then acc
          else insert ptm acc
      | Constp(_,_) -> acc
  
negative.code:     | _ -> failwith "lex:unrecognized OCaml-style escape in string"
    let stringchar =
        some (fun i -> i <> "\\" && i <> "\"")
        <|> (a "\\" .>>. escapecode |>> snd)
    let string = a "\"" .>>. many stringchar .>>. a "\"" |>> (fun ((_,s),_) -> "\""^implode s^"\"")
    let rawtoken = (string <|> some isbra <|> septok <|> ident) |>> (fun x -> Ident x)
    let simptoken = many (some isspace) .>>. rawtoken |>> (reserve << snd)
    let rec tokens i =
      try let (t,rst) = simptoken i
          if t = !comment_token then
            (many (fun i -> if i <> [] && hd i <> "\n" then 1,tl i
                            else raise Noparse) .>>. tokens |>> snd) rst
          else
            let toks,rst1 = tokens rst
            t::toks,rst1
      with Noparse -> [],i
    fst << (tokens .>>. many (some isspace) .>>. finished |>> (fst << fst))
  
  (* ------------------------------------------------------------------------- *)
  