summaryrefslogtreecommitdiff
path: root/src/GF/Parsing/CFG/Incremental.hs
diff options
context:
space:
mode:
authorpeb <unknown>2005-04-18 13:55:32 +0000
committerpeb <unknown>2005-04-18 13:55:32 +0000
commitc1592825c71867711a63293b588fcbc97e52bfc4 (patch)
tree5b042471de94431e15f8fda2c6ff9a85bce99cef /src/GF/Parsing/CFG/Incremental.hs
parent1323b7406376c72f40b1e561e079f8824f79aabf (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Parsing/CFG/Incremental.hs')
-rw-r--r--src/GF/Parsing/CFG/Incremental.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/GF/Parsing/CFG/Incremental.hs b/src/GF/Parsing/CFG/Incremental.hs
index e934b48c5..54aaf3b6d 100644
--- a/src/GF/Parsing/CFG/Incremental.hs
+++ b/src/GF/Parsing/CFG/Incremental.hs
@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/16 05:40:49 $
+-- > CVS $Date: 2005/04/18 14:55:33 $
-- > CVS $Author: peb $
--- > CVS $Revision: 1.2 $
+-- > CVS $Revision: 1.3 $
--
-- Incremental chart parsing for CFG
-----------------------------------------------------------------------------
@@ -34,7 +34,8 @@ type Strategy = ((Bool, Bool), (Bool, Bool))
parse :: (Ord n, Ord c, Ord t) => Strategy -> CFParser c n t
parse strategy grammar start = extract .
- tracePrt "#internal chart" (prt . length . flip chartList const) .
+ tracePrt "Parsing.CFG.Incremental - size of internal chart"
+ (prt . length . flip chartList const) .
process strategy grammar start
extract :: (Ord n, Ord c, Ord t) =>
@@ -54,10 +55,10 @@ extract finalChart = [ CFRule (Edge j k cat) daughters name |
process :: (Ord n, Ord c, Ord t) =>
Strategy -> CFPInfo c n t -> [c] -> Input t -> IChart c n t
process ((isPredictBU, isPredictTD), (isFilterBU, isFilterTD)) grammar start input
- = trace2 "CFParserIncremental" ((if isPredictBU then "BU-predict " else "") ++
- (if isPredictTD then "TD-predict " else "") ++
- (if isFilterBU then "BU-filter " else "") ++
- (if isFilterTD then "TD-filter " else "")) $
+ = trace2 "Parsing.CFG.Incremental - strategy" ((if isPredictBU then "BU-predict " else "") ++
+ (if isPredictTD then "TD-predict " else "") ++
+ (if isFilterBU then "BU-filter " else "") ++
+ (if isFilterTD then "TD-filter " else "")) $
finalChart
where finalChart = buildChart keyof rules axioms $ inputBounds input