random gen to fill given term

This commit is contained in:
aarne
2004-04-30 11:28:35 +00:00
parent 93b9023303
commit 926ac1b1e5
8 changed files with 23 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ import qualified AbsGFC as C
import GFC
import MkGFC (trExp) ----
import CMacros
import MMacros (refreshMetas)
import Linear
import Str
import CF
@@ -68,7 +69,7 @@ tokens2trms opts sg cn parser as = do
_ -> do
(ts1,ss) <- checkErr $ mapErr postParse ts0
if null ts1 then raise ss else return ()
ts2 <- mapM (checkErr . (annotate gr) . trExp) ts1 ----
ts2 <- mapM (checkErr . annotate gr . refreshMetas [] . trExp) ts1 ----
if forgive then return ts2 else do
let tsss = [(t, allLinsOfTree gr cn t) | t <- ts2]
ps = [t | (t,ss) <- tsss,

View File

@@ -29,7 +29,7 @@ mkCFTok s = case s of
mkCFTokVar :: String -> CFTok
mkCFTokVar s = case s of
'?':_:_ -> tM s
'?':_:_ -> tM s --- "?" --- compat with prCF
'x':'_':_ -> tV s
'x':[] -> tV s
'$':xs@(_:_) -> if last s == '$' then tV (init xs) else tS s