1
0
forked from GitHub/gf-core

some fixes

This commit is contained in:
aarne
2004-06-24 19:08:30 +00:00
parent 22e3bdce02
commit ffd6c23155
4 changed files with 11 additions and 5 deletions

View File

@@ -189,7 +189,7 @@ optLinearizeTree opts0 gr t = case getOptVal opts transferFun of
Just m -> useByTransfer flin g (I.identC m) t Just m -> useByTransfer flin g (I.identC m) t
_ -> flin t _ -> flin t
where where
opts = addOptions (stateOptions gr) opts0 opts = addOptions opts0 (stateOptions gr)
flin = case getOptVal opts markLin of flin = case getOptVal opts markLin of
Just mk Just mk
| mk == markOptXML -> lin markXML | mk == markOptXML -> lin markXML

View File

@@ -557,13 +557,15 @@ transInclude x = case x of
where where
trans f = case f of trans f = case f of
FString s -> s FString s -> s
FIdent (IC s) -> let s' = init s ++ [toLower (last s)] in FIdent (IC s) -> modif s
if elem s' newReservedWords then s' else s
--- unsafe hack ; cf. GetGrammar.oldLexer
FSlash filename -> '/' : trans filename FSlash filename -> '/' : trans filename
FDot filename -> '.' : trans filename FDot filename -> '.' : trans filename
FMinus 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 = newReservedWords =
words $ "abstract concrete interface incomplete " ++ words $ "abstract concrete interface incomplete " ++

View File

@@ -78,6 +78,8 @@ pg, print_grammar: pg
pm, print_multigrammar: pm pm, print_multigrammar: pm
Prints the current multilingual grammar in .gfcm form. Prints the current multilingual grammar in .gfcm form.
(Automatically executes the strip command (s) before doing this.) (Automatically executes the strip command (s) before doing this.)
options:
-utf8 apply UTF8-encoding to the grammar
examples: examples:
pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm

View File

@@ -91,6 +91,8 @@ txtHelpFile =
"\npm, print_multigrammar: pm" ++ "\npm, print_multigrammar: pm" ++
"\n Prints the current multilingual grammar in .gfcm form." ++ "\n Prints the current multilingual grammar in .gfcm form." ++
"\n (Automatically executes the strip command (s) before doing this.)" ++ "\n (Automatically executes the strip command (s) before doing this.)" ++
"\n options:" ++
"\n -utf8 apply UTF8-encoding to the grammar" ++
"\n examples:" ++ "\n examples:" ++
"\n pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm" ++ "\n pm | wf Letter.gfcm -- print the grammar into the file Letter.gfcm" ++
"\n" ++ "\n" ++