diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-17 21:35:36 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-17 21:35:36 +0000 |
| commit | 9b362ff231efbd43ffb4f1c6285c41a34caf3777 (patch) | |
| tree | 73b226f21f4910081ca2f02b481bc6c39c7c5c7a /src/runtime/haskell/PGF/Binary.hs | |
| parent | af13bae2dfb9adaa7c4aa273961fc09cc7ba1b7a (diff) | |
PGF is now real synchronous PMCFG
Diffstat (limited to 'src/runtime/haskell/PGF/Binary.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/Binary.hs | 47 |
1 files changed, 17 insertions, 30 deletions
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"
|
