diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2013-12-10 10:43:13 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2013-12-10 10:43:13 +0000 |
| commit | 87fffffbdf41eaf0f269bd65d8380b80d899bec8 (patch) | |
| tree | 4f7978256da871aff44790bd6cd6309d5fe138f2 /src/runtime/haskell/PGF | |
| parent | 2dda42e4d9ccba0223d4f3c78ab64af2213810b9 (diff) | |
option --split-pgf replaces option --mk-index. This splits the PGF into one file for the abstract and one more for each concrete syntax. This is a preparation for being able to load only specific languages from the whole grammar.
Diffstat (limited to 'src/runtime/haskell/PGF')
| -rw-r--r-- | src/runtime/haskell/PGF/Binary.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Binary.hs b/src/runtime/haskell/PGF/Binary.hs index bf30e4506..becf5b9de 100644 --- a/src/runtime/haskell/PGF/Binary.hs +++ b/src/runtime/haskell/PGF/Binary.hs @@ -49,7 +49,15 @@ instance Binary Abstr where , cats=fmap (\(x,y,z) -> (x,y,z,0)) cats
, code=BS.empty
})
-
+
+putSplitAbs :: PGF -> Put
+putSplitAbs pgf = do
+ putWord16be pgfMajorVersion
+ putWord16be pgfMinorVersion
+ put (Map.insert (mkCId "index") (LStr "true") (gflags pgf))
+ put (absname pgf, abstract pgf)
+ put [(name,cflags cnc) | (name,cnc) <- Map.toList (concretes pgf)]
+
instance Binary Concr where
put cnc = do put (cflags cnc)
put (printnames cnc)
|
