summaryrefslogtreecommitdiff
path: root/src/GF/Parsing/MCFG/Active.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2006-06-08 21:23:29 +0000
committerkr.angelov <kr.angelov@gmail.com>2006-06-08 21:23:29 +0000
commit694f6eb984c8f22fe042e210b0671062accba8c7 (patch)
tree32faab2fafad6a46a4f2c2b1321dd51634749c1e /src/GF/Parsing/MCFG/Active.hs
parent98d0af8d73ee56fdb9c64626e173eec0ebbce5e7 (diff)
code polishing for the literal category support
Diffstat (limited to 'src/GF/Parsing/MCFG/Active.hs')
-rw-r--r--src/GF/Parsing/MCFG/Active.hs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/GF/Parsing/MCFG/Active.hs b/src/GF/Parsing/MCFG/Active.hs
index 5ccd43398..c6e9c6b06 100644
--- a/src/GF/Parsing/MCFG/Active.hs
+++ b/src/GF/Parsing/MCFG/Active.hs
@@ -34,18 +34,16 @@ import GF.Infra.Print
parse :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t
parse strategy pinfo starts toks =
- trace2 "MCFG.Active - strategy" (if isBU strategy then "BU"
- else if isTD strategy then "TD" else "None") $
- [ 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 strategy pinfo starts toks
-- parseR :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t
parseR strategy pinfo starts =
- trace2 "MCFG.Active Range - strategy" (if isBU strategy then "BU"
- else if isTD strategy then "TD" else "None") $
- [ 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 = processR strategy pinfo starts
process :: (Ord n, Ord c, Ord l, Ord t) =>