From 9b362ff231efbd43ffb4f1c6285c41a34caf3777 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 17 Jan 2010 21:35:36 +0000 Subject: PGF is now real synchronous PMCFG --- src/runtime/haskell/PGF/Binary.hs | 47 ++++++++++++++------------------------- 1 file changed, 17 insertions(+), 30 deletions(-) (limited to 'src/runtime/haskell/PGF/Binary.hs') diff --git a/src/runtime/haskell/PGF/Binary.hs b/src/runtime/haskell/PGF/Binary.hs index a9a6a78dc..66caef1da 100644 --- a/src/runtime/haskell/PGF/Binary.hs +++ b/src/runtime/haskell/PGF/Binary.hs @@ -51,24 +51,24 @@ instance Binary Abstr where }) instance Binary Concr where - put cnc = put ( cflags cnc, lins cnc, opers cnc - , lincats cnc, lindefs cnc - , printnames cnc, paramlincats cnc - , parser cnc + put cnc = put ( cflags cnc, printnames cnc + , functions cnc, sequences cnc + , productions cnc + , totalCats cnc, startCats cnc ) - get = do cflags <- get - lins <- get - opers <- get - lincats <- get - lindefs <- get - printnames <- get - paramlincats <- get - parser <- get - return (Concr{ cflags=cflags, lins=lins, opers=opers - , lincats=lincats, lindefs=lindefs - , printnames=printnames - , paramlincats=paramlincats - , parser=parser + get = do cflags <- get + printnames <- get + functions <- get + sequences <- get + productions <- get + totalCats <- get + startCats <- get + return (Concr{ cflags=cflags, printnames=printnames + , functions=functions,sequences=sequences + , productions = productions + , pproductions = IntMap.empty + , lproductions = Map.empty + , totalCats=totalCats,startCats=startCats }) instance Binary Alternative where @@ -186,17 +186,4 @@ instance Binary Production where 1 -> liftM FCoerce get _ -> decodingError -instance Binary ParserInfo where - put p = put (functions p, sequences p, productions p, totalCats p, startCats p) - get = do functions <- get - sequences <- get - productions <- get - totalCats <- get - startCats <- get - return (ParserInfo{functions=functions,sequences=sequences - ,productions = productions - ,pproductions = IntMap.empty - ,lproductions = Map.empty - ,totalCats=totalCats,startCats=startCats}) - decodingError = fail "This PGF file was compiled with different version of GF" -- cgit v1.2.3