diff --git a/next-lib/src/Make.hs b/next-lib/src/Make.hs index 93b92e3dc..e885bd9c9 100644 --- a/next-lib/src/Make.hs +++ b/next-lib/src/Make.hs @@ -10,7 +10,7 @@ import System.Exit -- Make commands for compiling and testing resource grammars. -- usage: runghc Make ((present? OPT?) | (clone FILE))? LANGS? -- where --- - OPT = (lang | api | math | pgf | test | demo | clean) +-- - OPT = (lang | api | math | pgf | test | demo | parse | clean) -- - LANGS has the form e.g. langs=Eng,Fin,Rus -- - clone with a flag file=FILENAME clones the file to the specified languages, -- by replacing the 3-letter language name of the original in both @@ -61,6 +61,9 @@ langsTest = langsLang `except` ["Ara","Bul","Cat","Hin","Rus","Spa","Tha"] -- languages for which to run demo test langsDemo = langsLang `except` ["Ara","Hin","Ina","Tha"] +-- languages for which to compile parsing grammars +langsParse = langs `only` ["Eng"] + -- languages for which langs.pgf is built langsPGF = langsTest `only` ["Eng","Fre","Swe"] @@ -104,6 +107,9 @@ make xx = do ifxx "demo" $ do let ls = optl langsDemo gf (demos "Demo" ls) $ unwords ["demo/Demo" ++ la ++ ".gf" | (_,la) <- ls] + ifxx "parse" $ do + mapM_ (gfc pres [] . parse) (optl langsParse) + copy "parse/*.gfo" dir ifxx "clean" $ do system "rm -f */*.gfo ../alltenses/*.gfo ../present/*.gfo" ifxx "clone" $ do @@ -137,6 +143,7 @@ compat (lla,la) = lla ++ "/Compatibility" ++ la ++ ".gf" symbol (lla,la) = lla ++ "/Symbol" ++ la ++ ".gf" try (lla,la) = "api/Try" ++ la ++ ".gf" symbolic (lla,la) = "api/Symbolic" ++ la ++ ".gf" +parse (lla,la) = "parse/Parse" ++ la ++ ".gf" except ls es = filter (flip notElem es . snd) ls only ls es = filter (flip elem es . snd) ls diff --git a/next-lib/src/Makefile b/next-lib/src/Makefile index dab5a8a00..c32f1bbbb 100644 --- a/next-lib/src/Makefile +++ b/next-lib/src/Makefile @@ -3,7 +3,7 @@ RUNMAKE=$(RUNGHC) Make.hs GF_LIB_PATH=.. -.PHONY: all present alltenses lang api math prelude test demo synopsis link compiled constructX clean +.PHONY: all present alltenses lang api math prelude test demo parse synopsis link compiled constructX clean all: link prelude constructX present alltenses compat @@ -38,6 +38,9 @@ test: demo: $(RUNMAKE) demo +parse: + $(RUNMAKE) parse + synopsis: cd doc ; $(RUNGHC) MkSynopsis ; cd .. diff --git a/next-lib/src/parsing/BigLexEng.gf b/next-lib/src/parse/BigLexEng.gf similarity index 100% rename from next-lib/src/parsing/BigLexEng.gf rename to next-lib/src/parse/BigLexEng.gf diff --git a/next-lib/src/parsing/BigLexEngAbs.gf b/next-lib/src/parse/BigLexEngAbs.gf similarity index 100% rename from next-lib/src/parsing/BigLexEngAbs.gf rename to next-lib/src/parse/BigLexEngAbs.gf diff --git a/next-lib/src/parsing/Parse.gf b/next-lib/src/parse/Parse.gf similarity index 100% rename from next-lib/src/parsing/Parse.gf rename to next-lib/src/parse/Parse.gf diff --git a/next-lib/src/parsing/ParseEng.gf b/next-lib/src/parse/ParseEng.gf similarity index 100% rename from next-lib/src/parsing/ParseEng.gf rename to next-lib/src/parse/ParseEng.gf diff --git a/next-lib/src/parsing/ParseEngAbs.gf b/next-lib/src/parse/ParseEngAbs.gf similarity index 100% rename from next-lib/src/parsing/ParseEngAbs.gf rename to next-lib/src/parse/ParseEngAbs.gf