diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2006-06-08 21:23:29 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2006-06-08 21:23:29 +0000 |
| commit | 694f6eb984c8f22fe042e210b0671062accba8c7 (patch) | |
| tree | 32faab2fafad6a46a4f2c2b1321dd51634749c1e /src/GF/Parsing/MCFG/Incremental.hs | |
| parent | 98d0af8d73ee56fdb9c64626e173eec0ebbce5e7 (diff) | |
code polishing for the literal category support
Diffstat (limited to 'src/GF/Parsing/MCFG/Incremental.hs')
| -rw-r--r-- | src/GF/Parsing/MCFG/Incremental.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GF/Parsing/MCFG/Incremental.hs b/src/GF/Parsing/MCFG/Incremental.hs index 64a6c759e..bd5b4114d 100644 --- a/src/GF/Parsing/MCFG/Incremental.hs +++ b/src/GF/Parsing/MCFG/Incremental.hs @@ -18,6 +18,7 @@ import Control.Monad (guard) import GF.Data.Utilities (select) import GF.Data.GeneralDeduction +import GF.Data.Assoc import GF.Formalism.GCFG import GF.Formalism.MCFG @@ -34,14 +35,16 @@ import GF.Infra.Print parse :: (Ord n, Ord c, Ord l, Ord t) => MCFParser c n l t parse pinfo starts toks = - [ Abs (cat, found) (zip rhs rrecs) fun | - Final (Abs cat rhs fun) found rrecs <- chartLookup chart Fin ] + accumAssoc groupSyntaxNodes $ + [ ((cat, found), SNode fun (zip rhs rrecs)) | + Final (Abs cat rhs fun) found rrecs <- chartLookup chart Fin ] where chart = process pinfo toks ntoks ntoks = snd (inputBounds toks) -- parseR :: (Ord n, Ord c, Ord l, Ord t) => MCFParser c n l t parseR pinfo starts ntoks = - [ Abs (cat, found) (zip rhs rrecs) fun | + accumAssoc groupSyntaxNodes $ + [ ((cat, found), SNode fun (zip rhs rrecs)) | Final (Abs cat rhs fun) found rrecs <- chartLookup chart Fin ] where chart = processR pinfo ntoks |
