diff --git a/src/GF/API.hs b/src/GF/API.hs index 0a1f2ee1a..2d23da0f6 100644 --- a/src/GF/API.hs +++ b/src/GF/API.hs @@ -189,7 +189,7 @@ optLinearizeTree opts0 gr t = case getOptVal opts transferFun of Just m -> useByTransfer flin g (I.identC m) t _ -> flin t where - opts = addOptions (stateOptions gr) opts0 + opts = addOptions opts0 (stateOptions gr) flin = case getOptVal opts markLin of Just mk | mk == markOptXML -> lin markXML diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 6d2d8dd3d..33e8f9356 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -557,13 +557,15 @@ transInclude x = case x of where trans f = case f of FString s -> s - FIdent (IC s) -> let s' = init s ++ [toLower (last s)] in - if elem s' newReservedWords then s' else s - --- unsafe hack ; cf. GetGrammar.oldLexer + FIdent (IC s) -> modif s FSlash filename -> '/' : trans filename FDot filename -> '.' : trans filename FMinus filename -> '-' : trans filename - FAddId (IC s) filename -> s ++ trans filename + FAddId (IC s) filename -> modif s ++ trans filename + modif s = let s' = init s ++ [toLower (last s)] in + if elem s' newReservedWords then s' else s + --- unsafe hack ; cf. GetGrammar.oldLexer + newReservedWords = words $ "abstract concrete interface incomplete " ++ diff --git a/src/HelpFile b/src/HelpFile index 36fe237f5..4ef71dafe 100644 --- a/src/HelpFile +++ b/src/HelpFile @@ -78,6 +78,8 @@ pg, print_grammar: pg pm, print_multigrammar: pm Prints the current multilingual grammar in .gfcm form. (Automatically executes the strip command (s) before doing this.) + options: + -utf8 apply UTF8-encoding to the grammar examples: pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm diff --git a/src/HelpFile.hs b/src/HelpFile.hs index 4b18a67b4..500427121 100644 --- a/src/HelpFile.hs +++ b/src/HelpFile.hs @@ -91,6 +91,8 @@ txtHelpFile = "\npm, print_multigrammar: pm" ++ "\n Prints the current multilingual grammar in .gfcm form." ++ "\n (Automatically executes the strip command (s) before doing this.)" ++ + "\n options:" ++ + "\n -utf8 apply UTF8-encoding to the grammar" ++ "\n examples:" ++ "\n pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm" ++ "\n" ++