summaryrefslogtreecommitdiff
path: root/src/GF/Data/IncrementalDeduction.hs
diff options
context:
space:
mode:
authorpeb <unknown>2005-05-09 08:25:56 +0000
committerpeb <unknown>2005-05-09 08:25:56 +0000
commit2b059b811db03a53e8e0f8ec1a655e507851a995 (patch)
tree467ad9a1849bf454b22d5b2a457d09f8247041e6 /src/GF/Data/IncrementalDeduction.hs
parent01696e4f86fa156d079f2febaf103fbe229ffdb1 (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Data/IncrementalDeduction.hs')
-rw-r--r--src/GF/Data/IncrementalDeduction.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/GF/Data/IncrementalDeduction.hs b/src/GF/Data/IncrementalDeduction.hs
index 1cf810c0e..d119610c1 100644
--- a/src/GF/Data/IncrementalDeduction.hs
+++ b/src/GF/Data/IncrementalDeduction.hs
@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/21 16:22:03 $
--- > CVS $Author: bringert $
--- > CVS $Revision: 1.2 $
+-- > CVS $Date: 2005/05/09 09:28:44 $
+-- > CVS $Author: peb $
+-- > CVS $Revision: 1.3 $
--
-- Implementation of /incremental/ deductive parsing,
-- i.e. parsing one word at the time.
@@ -18,7 +18,7 @@ module GF.Data.IncrementalDeduction
-- * Functions
chartLookup,
buildChart,
- chartList
+ chartList, chartKeys
) where
import Data.Array
@@ -45,6 +45,8 @@ chartList :: (Ord item, Ord key) =>
-- the position and the item
-> [edge]
+chartKeys :: (Ord item, Ord key) => IncrementalChart item key -> Int -> [key]
+
type IncrementalChart item key = Array Int (Assoc key (SList item))
----------
@@ -61,4 +63,5 @@ chartList chart combine = [ combine k item |
(k, state) <- assocs chart,
item <- concatMap snd $ aAssocs state ]
+chartKeys chart k = aElems (chart ! k)