From e4abff772556ebee68a7e3b2cbe4fd413a5e845e Mon Sep 17 00:00:00 2001 From: Thomas Hallgren Date: Tue, 22 Jan 2019 17:16:32 +0100 Subject: 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). --- src/compiler/GF/Compile/ConcreteToHaskell.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/compiler/GF/Compile/ConcreteToHaskell.hs') diff --git a/src/compiler/GF/Compile/ConcreteToHaskell.hs b/src/compiler/GF/Compile/ConcreteToHaskell.hs index ad4775697..fc5c689fc 100644 --- a/src/compiler/GF/Compile/ConcreteToHaskell.hs +++ b/src/compiler/GF/Compile/ConcreteToHaskell.hs @@ -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. -- cgit v1.2.3