summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-05-08 11:38:41 +0000
committerhallgren <hallgren@chalmers.se>2014-05-08 11:38:41 +0000
commit8d9816ee988da6b12d590cba89fa1764ab66b0bf (patch)
treeb59e5e7e7ec66b7afff345a0e8ee7fdecb457e73 /src
parent58d0cdc94370003ca710de59e527a0a21637f6f1 (diff)
PGF web api, command c-wordforword: re-enable parsing of individual words
The space leak in the Haskell binding to the C parser has been fixed.
Diffstat (limited to 'src')
-rw-r--r--src/server/PGFService.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/PGFService.hs b/src/server/PGFService.hs
index e6c229106..3441554ec 100644
--- a/src/server/PGFService.hs
+++ b/src/server/PGFService.hs
@@ -200,15 +200,12 @@ cpgfMain command (t,(pgf,pc)) =
parse_word w =
maybe (Left ("["++w++"]")) Right $
- msum [{-parse1 w,parse1 ow,-}morph w,morph ow]
- -- omit parsing for now, to avoid space leaks
+ msum [parse1 w,parse1 ow,morph w,morph ow]
where
ow = if w==lw then capitInit w else lw
lw = uncapitInit w
-{-
parse1 = either (const Nothing) (fmap fst . listToMaybe) .
C.parse concr cat
--}
morph w = listToMaybe
[t | (f,a,p)<-C.lookupMorpho concr w,
t<-maybeToList (C.readExpr f)]