mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-15 15:59:32 -06:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user