summaryrefslogtreecommitdiff
path: root/src/GF/Source/SourceToGrammar.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-06-24 19:08:30 +0000
committeraarne <unknown>2004-06-24 19:08:30 +0000
commitffd6c23155026b758eaf40abe7e43331b958f979 (patch)
treed4c779bf829ecb2aeddddb79acbce4e8dc26b6db /src/GF/Source/SourceToGrammar.hs
parent22e3bdce0251ce840a440a2c04c8c229d4c74947 (diff)
some fixes
Diffstat (limited to 'src/GF/Source/SourceToGrammar.hs')
-rw-r--r--src/GF/Source/SourceToGrammar.hs10
1 files changed, 6 insertions, 4 deletions
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 " ++