diff options
| author | peb <unknown> | 2005-04-18 13:55:32 +0000 |
|---|---|---|
| committer | peb <unknown> | 2005-04-18 13:55:32 +0000 |
| commit | c1592825c71867711a63293b588fcbc97e52bfc4 (patch) | |
| tree | 5b042471de94431e15f8fda2c6ff9a85bce99cef /src/GF/Parsing/CF.hs | |
| parent | 1323b7406376c72f40b1e561e079f8824f79aabf (diff) | |
"Committed_by_peb"
Diffstat (limited to 'src/GF/Parsing/CF.hs')
| -rw-r--r-- | src/GF/Parsing/CF.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/GF/Parsing/CF.hs b/src/GF/Parsing/CF.hs index 3079a47ec..2be4db52e 100644 --- a/src/GF/Parsing/CF.hs +++ b/src/GF/Parsing/CF.hs @@ -4,9 +4,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/14 18:41:22 $ +-- > CVS $Date: 2005/04/18 14:55:33 $ -- > CVS $Author: peb $ --- > CVS $Revision: 1.1 $ +-- > CVS $Revision: 1.2 $ -- -- Chart parsing of grammars in CF format ----------------------------------------------------------------------------- @@ -32,19 +32,18 @@ parse :: String -> CF.CF -> Category -> CF.CFParser parse = buildParser . P.parseCF buildParser :: P.CFParser Category Name Token -> CF.CF -> Category -> CF.CFParser -buildParser parser cf start tokens = trace "ParseCF" $ - (parseResults, parseInformation) +buildParser parser cf start tokens = (parseResults, parseInformation) where parseInformation = prtSep "\n" trees parseResults = [ (tree2cfTree t, []) | t <- trees ] theInput = input tokens - edges = tracePrt "#edges" (prt.length) $ + edges = tracePrt "Parsing.CF - nr. edges" (prt.length) $ parser pInf [start] theInput - chart = tracePrt "#chart" (prt . map (length.snd) . aAssocs) $ + chart = tracePrt "Parsing.CF - size of chart" (prt . map (length.snd) . aAssocs) $ grammar2chart $ map addCategory edges - forests = tracePrt "#forests" (prt.length) $ + forests = tracePrt "Parsing.CF - nr. forests" (prt.length) $ chart2forests chart (const False) [ uncurry Edge (inputBounds theInput) start ] - trees = tracePrt "#trees" (prt.length) $ + trees = tracePrt "Parsing.CF - nr. trees" (prt.length) $ concatMap forest2trees forests pInf = P.buildCFPInfo $ cf2grammar cf (nubsort tokens) |
