diff options
| author | aarne <unknown> | 2003-11-14 12:36:23 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-11-14 12:36:23 +0000 |
| commit | 5a7d6e542d7fc0c01bec9163e4be732ac1c6d217 (patch) | |
| tree | 7e7899236393081209aa494b391d3409d087fcc3 /src/GF/Source/SourceToGrammar.hs | |
| parent | 37384dbe06913a0352d4459050c1382874a45a62 (diff) | |
New unicodings.
New unicodings.
Module with works.
Better compilation of old GF.
Diffstat (limited to 'src/GF/Source/SourceToGrammar.hs')
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 53681104c..17e1819ca 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -12,6 +12,7 @@ import AbsGF import PrintGF import RemoveLiT --- for bw compat import Operations +import Option import Monad import Char @@ -482,8 +483,8 @@ transDDecl x = case x of -- to deal with the old format, sort judgements in three modules, forming -- their names from a given string, e.g. file name or overriding user-given string -transOldGrammar :: OldGrammar -> String -> Err G.SourceGrammar -transOldGrammar x name = case x of +transOldGrammar :: Options -> FilePath -> OldGrammar -> Err G.SourceGrammar +transOldGrammar opts name0 x = case x of OldGr includes topdefs -> do --- includes must be collected separately let moddefs = sortTopDefs topdefs g1 <- transGrammar $ Gr moddefs @@ -515,9 +516,10 @@ transOldGrammar x name = case x of ne = NoExt q = CMCompl - absName = identC topic - resName = identC ("Res" ++ lang) - cncName = identC lang + name = maybe name0 (++ ".gf") $ getOptVal opts useName + absName = identC $ maybe topic id $ getOptVal opts useAbsName + resName = identC $ maybe ("Res" ++ lang) id $ getOptVal opts useResName + cncName = identC $ maybe lang id $ getOptVal opts useCncName (beg,rest) = span (/='.') name (topic,lang) = case rest of -- to avoid overwriting old files |
