forked from GitHub/gf-core
"Committed_by_peb"
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/05/17 11:20:25 $
|
-- > CVS $Date: 2005/05/17 13:38:46 $
|
||||||
-- > CVS $Author: peb $
|
-- > CVS $Author: peb $
|
||||||
-- > CVS $Revision: 1.10 $
|
-- > CVS $Revision: 1.11 $
|
||||||
--
|
--
|
||||||
-- All conversions from GFC
|
-- All conversions from GFC
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@@ -46,10 +46,12 @@ gfc2mcfg2cfg opts = \g -> let e = g2e g in trace2 "Options" (show opts) (e2m e,
|
|||||||
Just cat -> flip removeErasing [identC cat]
|
Just cat -> flip removeErasing [identC cat]
|
||||||
Nothing -> flip removeErasing []
|
Nothing -> flip removeErasing []
|
||||||
g2e = case getOptVal opts gfcConversion of
|
g2e = case getOptVal opts gfcConversion of
|
||||||
Just "strict" -> simple2mcfg_strict . gfc2simple
|
Just "strict" -> simple2mcfg_strict . gfc2simple
|
||||||
Just "finite" -> simple2mcfg_nondet . gfc2finite
|
Just "finite" -> simple2mcfg_nondet . simple2finite . gfc2simple
|
||||||
Just "finite-strict" -> simple2mcfg_strict . gfc2finite
|
Just "singletons" -> simple2mcfg_nondet . removeSingletons . gfc2simple
|
||||||
_ -> simple2mcfg_nondet . gfc2simple
|
Just "finite-singletons" -> simple2mcfg_nondet . removeSingletons . simple2finite . gfc2simple
|
||||||
|
Just "finite-strict" -> simple2mcfg_strict . simple2finite . gfc2simple
|
||||||
|
_ -> simple2mcfg_nondet . gfc2simple
|
||||||
|
|
||||||
gfc2mcfg :: Options -> (CanonGrammar, Ident) -> MGrammar
|
gfc2mcfg :: Options -> (CanonGrammar, Ident) -> MGrammar
|
||||||
gfc2mcfg opts = fst . gfc2mcfg2cfg opts
|
gfc2mcfg opts = fst . gfc2mcfg2cfg opts
|
||||||
@@ -69,9 +71,6 @@ simple2finite = S2Fin.convertGrammar
|
|||||||
removeSingletons :: SGrammar -> SGrammar
|
removeSingletons :: SGrammar -> SGrammar
|
||||||
removeSingletons = RemSing.convertGrammar
|
removeSingletons = RemSing.convertGrammar
|
||||||
|
|
||||||
gfc2finite :: (CanonGrammar, Ident) -> SGrammar
|
|
||||||
gfc2finite = removeSingletons . simple2finite . gfc2simple
|
|
||||||
|
|
||||||
simple2mcfg_nondet :: SGrammar -> EGrammar
|
simple2mcfg_nondet :: SGrammar -> EGrammar
|
||||||
simple2mcfg_nondet = S2M.convertGrammarNondet
|
simple2mcfg_nondet = S2M.convertGrammarNondet
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
-- Stability : (stable)
|
-- Stability : (stable)
|
||||||
-- Portability : (portable)
|
-- Portability : (portable)
|
||||||
--
|
--
|
||||||
-- > CVS $Date: 2005/05/17 12:37:17 $
|
-- > CVS $Date: 2005/05/17 13:38:46 $
|
||||||
-- > CVS $Author: aarne $
|
-- > CVS $Author: peb $
|
||||||
-- > CVS $Revision: 1.35 $
|
-- > CVS $Revision: 1.36 $
|
||||||
--
|
--
|
||||||
-- The datatype of shell commands and the list of their options.
|
-- The datatype of shell commands and the list of their options.
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@@ -138,7 +138,7 @@ testValidFlag st co f x = case f of
|
|||||||
"filter" -> testInc customStringCommand
|
"filter" -> testInc customStringCommand
|
||||||
"length" -> testN
|
"length" -> testN
|
||||||
"optimize"-> testIn $ words "parametrize values all share none"
|
"optimize"-> testIn $ words "parametrize values all share none"
|
||||||
"conversion" -> testIn $ words "strict nondet finite finite-strict"
|
"conversion" -> testIn $ words "strict nondet finite singletons finite-strict finite-singletons"
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
where
|
where
|
||||||
testInc ci =
|
testInc ci =
|
||||||
|
|||||||
Reference in New Issue
Block a user