1
0
forked from GitHub/gf-core

strict BinTree

This commit is contained in:
aarne
2004-05-26 08:33:27 +00:00
parent ba74c109cd
commit 2945d9bcb8
3 changed files with 11 additions and 8 deletions

View File

@@ -179,7 +179,7 @@ updatePerhapsHard old p1 p2 = case (p1,p2) of
-- binary search trees
data BinTree a = NT | BT a (BinTree a) (BinTree a) deriving (Show,Read)
data BinTree a = NT | BT a !(BinTree a) !(BinTree a) deriving (Show,Read)
isInBinTree :: (Ord a) => a -> BinTree a -> Bool
isInBinTree x tree = case tree of

View File

@@ -40,7 +40,8 @@ import ChartParser -- or some other CF Parser
-- grammar conversions -- peb 19/4-04
-- see also customGrammarPrinter
import ConvertGrammar
import qualified ConvertGrammar as CG
import TestConversions (prRaw)
import MoreCustom -- either small/ or big/. The one in Small is empty.
@@ -169,13 +170,15 @@ customGrammarPrinter =
-}
-- add your own grammar printers here
-- grammar conversions, (peb)
{-
,(strCI "gfc_show", show . grammar2canon . stateGrammarST)
,(strCI "gfc_raw", prRaw . stateGrammarST)
,(strCI "tnf", prCanon . convertCanonToTNF . stateGrammarST)
,(strCI "mcfg", prMCFG . convertCanonToMCFG . stateGrammarST)
,(strCI "mcfg_cf", prCF . convertCanonToCF . stateGrammarST)
,(strCI "mcfg_canon", prCanon . convertCanonToMCFG . stateGrammarST)
,(strCI "mcfg_raw", prRaw . convertCanonToMCFG . stateGrammarST)
,(strCI "tnf", prCanon . CG.convertCanonToTNF . stateGrammarST)
,(strCI "mcfg", CG.prMCFG . CG.convertCanonToMCFG . stateGrammarST)
,(strCI "mcfg_cf", prCF . CG.convertCanonToCFG . stateGrammarST)
,(strCI "mcfg_canon", prCanon . CG.convertCanonToMCFG . stateGrammarST)
,(strCI "mcfg_raw", prRaw . CG.convertCanonToMCFG . stateGrammarST)
-}
--- also include printing via grammar2syntax!
]
++ moreCustomGrammarPrinter

View File

@@ -1 +1 @@
module Today where today = "Fri May 21 18:10:31 CEST 2004"
module Today where today = "Wed May 26 10:26:30 CEST 2004"