mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
some fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 " ++
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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" ++
|
||||
|
||||
Reference in New Issue
Block a user