function DFST = dfsa2dfst_r1(DFSA,c1,c2) % converts a DFSA to a DFST that replaces 1 char (c1) by another char (c2) % DFST = dfsa2dfst_r1(DFSA,'@','@') creates the identity map on L(DFSA) DFST.ALFin = DFSA.ALF; DFST.ALFou = ['@' DFSA.ALF]; DFST.Q = DFSA.Q; DFST.q0 = DFSA.q0; DFST.F = DFSA.F; DFST = init_dfstd(DFST); for q=DFSA.Q for s=DFSA.ALF if (s==c1) t = c2; else t = s; end p = dfsa_delta(DFSA,q,s); DFST = set_dfstd(DFST,q,s,p,t); end end return