let restore n = try match Symtab.lookup n s.symtab with | Symtab.State(t) -> s.current <- t | _ -> raise Not_found with Not_found -> raise (Invalid_argument "Not a state name")