mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 08:32:50 -06:00
Add FoodsFre, fails because pre is not implemented
Also an unhandled Projection case
This commit is contained in:
@@ -8,7 +8,7 @@ import qualified Data.List as L
|
||||
import qualified Data.Map as Map
|
||||
import Text.Printf (printf)
|
||||
import System.Directory (listDirectory)
|
||||
import System.FilePath ((</>), (<.>), takeBaseName, takeExtension)
|
||||
import System.FilePath ((</>), (<.>), takeBaseName, takeExtension, dropExtension)
|
||||
|
||||
dir :: FilePath
|
||||
dir = "testsuite" </> "lpgf"
|
||||
@@ -20,12 +20,19 @@ main = do
|
||||
doGrammar "Params"
|
||||
doGrammar "Walking"
|
||||
doGrammar "Foods"
|
||||
-- doGrammar' "Foods" ["Fre"]
|
||||
|
||||
doGrammar :: String -> IO ()
|
||||
doGrammar gname = do
|
||||
doGrammar gname = doGrammar' gname []
|
||||
|
||||
doGrammar' :: String -> [String] -> IO ()
|
||||
doGrammar' gname cncs = do
|
||||
-- Collect concrete modules
|
||||
mods <- map (dir </>)
|
||||
. filter (\p -> gname `L.isPrefixOf` takeBaseName p && takeExtension p == ".gf")
|
||||
. filter (\p -> gname `L.isPrefixOf` takeBaseName p
|
||||
&& takeExtension p == ".gf"
|
||||
&& null cncs || any (`L.isSuffixOf` dropExtension p) cncs
|
||||
)
|
||||
<$> listDirectory dir
|
||||
|
||||
-- Compile LPGF
|
||||
|
||||
Reference in New Issue
Block a user