mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-03 00:02:50 -06:00
brute force parsing method in RunGFCC
This commit is contained in:
@@ -33,6 +33,10 @@ treat grammar s = case words s of
|
||||
"gr":cat:n:_ -> do
|
||||
gen <- newStdGen
|
||||
mapM_ prlins $ take (read n) $ generateRandom gen grammar (CId cat)
|
||||
"p":cat:ws -> do
|
||||
case parse grammar (CId cat) ws of
|
||||
t:_ -> prlins t
|
||||
_ -> putStrLn "no parse found"
|
||||
_ -> lins $ readExp s
|
||||
where
|
||||
lins t = mapM_ (lin t) $ cncnames grammar
|
||||
|
||||
Reference in New Issue
Block a user