summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command/Importing.hs
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2010-11-30 14:50:24 +0000
committeraarne <aarne@chalmers.se>2010-11-30 14:50:24 +0000
commit752a7b803062b17e675b3617fae4ae08d809c60b (patch)
treef86e25f706f02ad5a6b1ad4d27ac29c762af0c7f /src/compiler/GF/Command/Importing.hs
parent667e7e67d3b9f4808fab3d46a83e110e61b1edec (diff)
format .gfm for multiple modules in the same file; includes lines with ;-separated words
Diffstat (limited to 'src/compiler/GF/Command/Importing.hs')
-rw-r--r--src/compiler/GF/Command/Importing.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/GF/Command/Importing.hs b/src/compiler/GF/Command/Importing.hs
index 80f3833ee..3d05868b1 100644
--- a/src/compiler/GF/Command/Importing.hs
+++ b/src/compiler/GF/Command/Importing.hs
@@ -4,6 +4,7 @@ import PGF
import PGF.Data
import GF.Compile
+import GF.Compile.Multi (readMulti)
import GF.Grammar (identC, SourceGrammar) -- for cc command
import GF.Grammar.CF
import GF.Grammar.EBNF
@@ -20,8 +21,12 @@ importGrammar :: PGF -> Options -> [FilePath] -> IO PGF
importGrammar pgf0 _ [] = return pgf0
importGrammar pgf0 opts files =
case takeExtensions (last files) of
- ".cf" -> importCF opts files getCF
+ ".cf" -> importCF opts files getCF
".ebnf" -> importCF opts files getEBNF
+ ".gfm" -> do
+ ascss <- mapM readMulti files
+ let cs = concatMap snd ascss
+ importGrammar pgf0 opts cs
s | elem s [".gf",".gfo"] -> do
res <- appIOE $ compileToPGF opts files
case res of