forked from GitHub/gf-rgl
Update language config with "All" column; fix those marked for notpresent
Also fix bug in boolBit
This commit is contained in:
12
Make.hs
12
Make.hs
@@ -191,7 +191,7 @@ rglCommands =
|
|||||||
summary f langs = unwords (map (drop (length sourceDir + 1) . f) langs)
|
summary f langs = unwords (map (drop (length sourceDir + 1) . f) langs)
|
||||||
-- summary f _ = f (LangInfo "*" "*" Nothing Nothing False False False False)
|
-- summary f _ = f (LangInfo "*" "*" Nothing Nothing False False False False)
|
||||||
|
|
||||||
l mode args = (lang,optml mode (const True) args)
|
l mode args = (lang,optml mode langAll args)
|
||||||
s mode args = (symbol,optml mode langAPI args)
|
s mode args = (symbol,optml mode langAPI args)
|
||||||
c mode args = (compat,optml AllTenses langCompatibility args)
|
c mode args = (compat,optml AllTenses langCompatibility args)
|
||||||
t mode args = (try,optml mode langAPI args)
|
t mode args = (try,optml mode langAPI args)
|
||||||
@@ -310,6 +310,7 @@ data LangInfo = LangInfo
|
|||||||
, langFunctor :: Maybe String -- ^ functor (not used)
|
, langFunctor :: Maybe String -- ^ functor (not used)
|
||||||
, langUnlexer :: Maybe String -- ^ decoding for postprocessing linearizations
|
, langUnlexer :: Maybe String -- ^ decoding for postprocessing linearizations
|
||||||
, langPresent :: Bool
|
, langPresent :: Bool
|
||||||
|
, langAll :: Bool
|
||||||
, langAPI :: Bool
|
, langAPI :: Bool
|
||||||
, langSymbolic :: Bool
|
, langSymbolic :: Bool
|
||||||
, langCompatibility :: Bool
|
, langCompatibility :: Bool
|
||||||
@@ -323,7 +324,7 @@ loadLangs = do
|
|||||||
where
|
where
|
||||||
conffile = "languages.csv"
|
conffile = "languages.csv"
|
||||||
maybeBit bits n = if length bits >= (n+1) && length (bits !! n) > 0 then Just (bits !! n) else Nothing
|
maybeBit bits n = if length bits >= (n+1) && length (bits !! n) > 0 then Just (bits !! n) else Nothing
|
||||||
boolBit bits n def = if length bits >= (n+1) && length (bits !! n) > 0 then (bits !! n == if def then "n" else "y") else def
|
boolBit bits n def = if length bits >= (n+1) && length (bits !! n) > 0 then (if def then bits !! n /= "n" else bits !! n == "y") else def
|
||||||
mkLangInfo s =
|
mkLangInfo s =
|
||||||
let bits = separateBy ',' s in
|
let bits = separateBy ',' s in
|
||||||
if length bits < 2
|
if length bits < 2
|
||||||
@@ -334,9 +335,10 @@ loadLangs = do
|
|||||||
, langFunctor = maybeBit bits 2
|
, langFunctor = maybeBit bits 2
|
||||||
, langUnlexer = maybeBit bits 3
|
, langUnlexer = maybeBit bits 3
|
||||||
, langPresent = boolBit bits 4 False
|
, langPresent = boolBit bits 4 False
|
||||||
, langAPI = boolBit bits 5 True
|
, langAll = boolBit bits 5 True
|
||||||
, langSymbolic = boolBit bits 6 True
|
, langAPI = boolBit bits 6 True
|
||||||
, langCompatibility = boolBit bits 7 False
|
, langSymbolic = boolBit bits 7 True
|
||||||
|
, langCompatibility = boolBit bits 8 False
|
||||||
}
|
}
|
||||||
|
|
||||||
-- | Separate a string on a character
|
-- | Separate a string on a character
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Description of columns:
|
|||||||
- Functor: (not used)
|
- Functor: (not used)
|
||||||
- Unlexer
|
- Unlexer
|
||||||
- Present: languages that have notpresent marked
|
- Present: languages that have notpresent marked
|
||||||
|
- All: languages for which to compile All
|
||||||
- API: languages for which to compile Try
|
- API: languages for which to compile Try
|
||||||
- Symbolic: languages for which to compile Symbolic
|
- Symbolic: languages for which to compile Symbolic
|
||||||
- Compatibility: languages for which Compatibility exists
|
- Compatibility: languages for which Compatibility exists
|
||||||
|
|||||||
@@ -1,46 +1,45 @@
|
|||||||
Code,Directory,Functor,Unlexer,Present,API,Symbolic,Compatibility
|
Code,Directory,Functor,Unlexer,Present,All,API,Symbolic,Compatibility
|
||||||
Afr,afrikaans,,,y,,n,
|
Afr,afrikaans,,,,,,n,
|
||||||
Amh,amharic,,,,n,n,
|
Amh,amharic,,,,,n,n,
|
||||||
Ara,arabic,,,,n,n,
|
Ara,arabic,,,,,n,n,
|
||||||
Eus,basque,,,,,,
|
Eus,basque,,,,,,,
|
||||||
Bul,bulgarian,,,y,,,y
|
Bul,bulgarian,,,y,,,,
|
||||||
Cat,catalan,Romance,,y,,,y
|
Cat,catalan,Romance,,y,,,,y
|
||||||
Chi,chinese,,,y,,,
|
Chi,chinese,,,,,,,
|
||||||
Dan,danish,Scand,,y,,,
|
Dan,danish,Scand,,y,,,,
|
||||||
Dut,dutch,,,y,,,
|
Dut,dutch,,,y,,,,
|
||||||
Eng,english,,,y,,,y
|
Eng,english,,,y,,,,y
|
||||||
Est,estonian,,,y,,,
|
Est,estonian,,,,,,,
|
||||||
Fin,finnish,,,y,,,y
|
Fin,finnish,,,y,,,,y
|
||||||
Fre,french,Romance,,y,,,y
|
Fre,french,Romance,,y,,,,y
|
||||||
Grc,ancient_greek,,,y,n,n,
|
Grc,ancient_greek,,,y,,n,n,
|
||||||
Gre,greek,,,y,,,
|
Gre,greek,,,,,,,
|
||||||
Heb,hebrew,,,,n,n,
|
Heb,hebrew,,,,,n,n,
|
||||||
Hin,hindi,Hindustani,to_devanagari,y,,,
|
Hin,hindi,Hindustani,to_devanagari,y,,,,
|
||||||
Hun,hungarian,,,y,,,
|
Hun,hungarian,,,y,n,n,n,
|
||||||
Ger,german,,,,,,
|
Ger,german,,,,,,,
|
||||||
Ice,icelandic,,,y,,n,
|
Ice,icelandic,,,,,,n,
|
||||||
Ina,interlingua,,,y,n,n,
|
Ina,interlingua,,,y,,n,n,
|
||||||
Ita,italian,Romance,,y,,,y
|
Ita,italian,Romance,,y,,,,y
|
||||||
Jpn,japanese,,,y,,,
|
Jpn,japanese,,,,,,,
|
||||||
Lat,latin,,,y,n,n,
|
Lat,latin,,,y,,n,n,
|
||||||
Lav,latvian,,,,,,y
|
Lav,latvian,,,,,,,y
|
||||||
Mlt,maltese,,,,,,
|
Mlt,maltese,,,,,,,
|
||||||
Mon,mongolian,,,y,,n,
|
Mon,mongolian,,,,,,n,
|
||||||
Nep,nepali,,,y,,n,
|
Nep,nepali,,,,,,n,
|
||||||
Nor,norwegian,Scand,,y,,,
|
Nor,norwegian,Scand,,y,,,,
|
||||||
Nno,nynorsk,,,y,,,
|
Nno,nynorsk,,,y,,,,
|
||||||
Pes,persian,,,y,,,
|
Pes,persian,,,,,,,
|
||||||
Pol,polish,,,,,,
|
Pol,polish,,,,,,,
|
||||||
Por,portuguese,Romance,,y,,,y
|
Por,portuguese,Romance,,y,,,,y
|
||||||
Pnb,punjabi,,,y,,,
|
Pnb,punjabi,,,y,,,,
|
||||||
Ron,romanian,,,y,,,
|
Ron,romanian,,,y,,,,
|
||||||
Rus,russian,,,y,,,
|
Rus,russian,,,y,,,,
|
||||||
Snd,sindhi,,,y,,,
|
Snd,sindhi,,,,,,,
|
||||||
Spa,spanish,Romance,,y,,,y
|
Spa,spanish,Romance,,y,,,,y
|
||||||
Swa,swahili,,,,,,y
|
Swa,swahili,,,,n,n,n,y
|
||||||
Swe,swedish,Scand,,y,,,y
|
Swe,swedish,Scand,,y,,,,y
|
||||||
Tel,telugu,,,y,,,
|
Tel,telugu,,,y,n,n,n,
|
||||||
Tha,thai,,to_thai,y,,,
|
Tha,thai,,to_thai,,,,,
|
||||||
Tur,turkish,,,,n,n,
|
Tur,turkish,,,,,n,n,
|
||||||
Urd,urdu,Hindustani,,y,,,
|
Urd,urdu,Hindustani,,,,,,
|
||||||
Vot,votic,,,,,,
|
|
||||||
|
Reference in New Issue
Block a user