mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
More work on the canonica_gf export
+ Abstract syntax now is converted directly from the Grammar and not via PGF, so you can use `gf -batch -no-pmcfg -f canonical_gf ...`, to export to canonical_gf while skipping PMCFG and PGF file generation completely. + Flags that are normally copied to PGF files are now included in the caninical_gf output as well (in particular the startcat flag).
This commit is contained in:
@@ -18,6 +18,8 @@ import GF.Infra.Ident(Ident,identS,prefixIdent) --,moduleNameS
|
||||
import GF.Infra.Option
|
||||
import GF.Compile.Compute.ConcreteNew(normalForm,resourceValues)
|
||||
import GF.Haskell
|
||||
--import GF.Grammar.Canonical
|
||||
--import GF.Compile.ConcreteToCanonical
|
||||
import Debug.Trace
|
||||
|
||||
-- | Generate Haskell code for the all concrete syntaxes associated with
|
||||
@@ -28,6 +30,9 @@ concretes2haskell opts absname gr =
|
||||
cnc<-allConcretes gr absname,
|
||||
let cncname = render cnc ++ ".hs" :: FilePath
|
||||
Ok cncmod = lookupModule gr cnc
|
||||
{- (_,cnc)<-concretes2canonical opt absname gr,
|
||||
let ModId name = concName cnc
|
||||
cncname = name ++ ".hs" :: FilePath--}
|
||||
]
|
||||
|
||||
-- | Generate Haskell code for the given concrete module.
|
||||
|
||||
Reference in New Issue
Block a user