forked from GitHub/gf-core
next-lib now compiles webalt ; removed subdir mathematical/ for simplicity
This commit is contained in:
@@ -22,6 +22,7 @@ import System.Exit
|
||||
default_gfc = "../../bin/gfc"
|
||||
|
||||
presApiPath = "-path=api:present"
|
||||
presSymbolPath = "-path=.:abstract:present:common:romance:scandinavian" ----
|
||||
|
||||
-- the languages have long directory names and short ISO codes (3 letters)
|
||||
-- we also give the decodings for postprocessing linearizations, as long as grammars
|
||||
@@ -84,7 +85,11 @@ make xx = do
|
||||
|
||||
ifx "lang" $ do
|
||||
mapM_ (gfc pres [] . lang) (optl langsLang)
|
||||
mapM_ (gfc pres presSymbolPath . symbol) (optl langsAPI)
|
||||
copy "*/*.gfo" dir
|
||||
ifx "compat" $ do
|
||||
mapM_ (gfc pres [] . compat) (optl langsCompat)
|
||||
copy "*/Compatibility*.gfo" dir
|
||||
ifx "api" $ do
|
||||
mapM_ (gfc pres presApiPath . try) (optl langsAPI)
|
||||
mapM_ (gfc pres presApiPath . symbolic) (optl langsAPI)
|
||||
@@ -128,6 +133,8 @@ demos abstr ls = "gr -number=100 | l -treebank " ++ unlexer abstr ls ++
|
||||
" | ps -to_html | wf -file=resdemo.html"
|
||||
|
||||
lang (lla,la) = lla ++ "/All" ++ la ++ ".gf"
|
||||
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"
|
||||
|
||||
|
||||
9
next-lib/src/abstract/Compatibility.gf
Normal file
9
next-lib/src/abstract/Compatibility.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
abstract Compatibility = Cat ** {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
fun
|
||||
NumInt : Int -> Num ; -- 57
|
||||
OrdInt : Int -> Ord ; -- 57
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource CombinatorsCat = Combinators with
|
||||
(Cat = CatCat),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource CombinatorsSpa = Combinators with
|
||||
(Cat = CatSpa),
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:alltenses
|
||||
|
||||
resource ConstructorsCat = Constructors with (Grammar = GrammarCat) ;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--1 Symbolic: Noun Phrases with mathematical symbols
|
||||
|
||||
incomplete resource Symbolic = open Symbol, Grammar in {
|
||||
incomplete resource Symbolic = open Symbol, Grammar, PredefCnc in {
|
||||
|
||||
oper
|
||||
symb : overload {
|
||||
symb : Str -> NP ; -- x
|
||||
symb : Integer -> NP ; -- 23
|
||||
symb : Int -> NP ; -- 23
|
||||
symb : Float -> NP ; -- 0.99
|
||||
symb : N -> Digits -> NP ; -- level 4
|
||||
symb : N -> Card -> NP ; -- level four
|
||||
@@ -13,7 +13,10 @@ incomplete resource Symbolic = open Symbol, Grammar in {
|
||||
symb : Det -> N -> Card -> NP ; -- the number four
|
||||
symb : Det -> CN -> Card -> NP ; -- the even number four
|
||||
symb : Det -> N -> Str -> Str -> NP ; -- the levels i and j
|
||||
symb : Det -> CN -> [Symb] -> NP -- the basic levels i, j, and k
|
||||
symb : Det -> CN -> [Symb] -> NP ; -- the basic levels i, j, and k
|
||||
symb : Symb -> S ; -- A
|
||||
symb : Symb -> Card ; -- n
|
||||
symb : Symb -> Ord -- n'th
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb ;
|
||||
@@ -25,9 +28,9 @@ incomplete resource Symbolic = open Symbol, Grammar in {
|
||||
symb = overload {
|
||||
symb : Str -> NP
|
||||
= \s -> UsePN (SymbPN (mkSymb s)) ;
|
||||
symb : Integer -> NP
|
||||
symb : Int -> NP
|
||||
= \i -> UsePN (IntPN i) ;
|
||||
symb : Floating -> NP
|
||||
symb : Float -> NP
|
||||
= \i -> UsePN (FloatPN i) ;
|
||||
symb : N -> Digits -> NP
|
||||
= \c,i -> CNNumNP (UseN c) (NumDigits i) ;
|
||||
@@ -42,7 +45,10 @@ incomplete resource Symbolic = open Symbol, Grammar in {
|
||||
symb : Det -> N -> Str -> Str -> NP
|
||||
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
||||
symb : Det -> CN -> [Symb] -> NP
|
||||
= CNSymbNP
|
||||
= CNSymbNP ;
|
||||
symb : Symb -> S = SymbS ;
|
||||
symb : Symb -> Card = SymbNum ;
|
||||
symb : Symb -> Ord = SymbOrd
|
||||
} ;
|
||||
|
||||
mkSymb : Str -> Symb = \s -> {s = s ; lock_Symb = <>} ;
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
resource SymbolicCat = Symbolic with
|
||||
(Symbol = SymbolCat),
|
||||
(Syntax = SyntaxCat) ;
|
||||
(Grammar = GrammarCat) ;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
--# -path=.:present:prelude
|
||||
|
||||
resource SymbolicSpa = Symbolic with
|
||||
(Symbol = SymbolSpa),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:alltenses
|
||||
|
||||
instance SyntaxCat of Syntax = ConstructorsCat, CatCat, StructuralCat, CombinatorsCat ;
|
||||
instance SyntaxCat of Syntax =
|
||||
ConstructorsCat, CatCat, StructuralCat, CombinatorsCat ;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:alltenses
|
||||
|
||||
instance SyntaxSpa of Syntax =
|
||||
ConstructorsSpa, CatSpa, StructuralSpa, CombinatorsSpa ;
|
||||
|
||||
11
next-lib/src/catalan/CompatibilityCat.gf
Normal file
11
next-lib/src/catalan/CompatibilityCat.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../romance:../abstract:../common
|
||||
|
||||
concrete CompatibilityCat of Compatibility = CatCat ** open Prelude, CommonRomance in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:romance:abstract:common
|
||||
|
||||
concrete SymbolCat of Symbol = CatCat ** SymbolRomance with
|
||||
(ResRomance = ResCat) ;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:scandinavian:abstract:common
|
||||
|
||||
concrete SymbolDan of Symbol = CatDan ** SymbolScand with
|
||||
(ResScand = ResDan) ;
|
||||
|
||||
11
next-lib/src/english/CompatibilityCat.gf
Normal file
11
next-lib/src/english/CompatibilityCat.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../romance:../abstract:../common
|
||||
|
||||
concrete CompatibilityCat of Compatibility = CatCat ** open Prelude, CommonRomance in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
}
|
||||
11
next-lib/src/english/CompatibilityEng.gf
Normal file
11
next-lib/src/english/CompatibilityEng.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete CompatibilityEng of Compatibility = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = n.s ; n = Pl ; hasCard = True} ;
|
||||
OrdInt n = {s = n.s ++ "th"} ;
|
||||
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
--# -path=.:abstract:common
|
||||
|
||||
concrete SymbolEng of Symbol = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
lin
|
||||
|
||||
11
next-lib/src/finnish/CompatibilityFin.gf
Normal file
11
next-lib/src/finnish/CompatibilityFin.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete CompatibilityFin of Compatibility = CatFin ** open Prelude, ResFin in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ;
|
||||
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
--# -path=.:abstract:common
|
||||
|
||||
concrete SymbolFin of Symbol = CatFin ** open Prelude, NounFin, ResFin in {
|
||||
|
||||
lin
|
||||
@@ -25,7 +27,7 @@ lin
|
||||
SymbS sy = sy ;
|
||||
|
||||
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
|
||||
SymbOrd n = {s = \\_,_ => n.s ++ "."} ;
|
||||
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
||||
|
||||
lincat
|
||||
|
||||
|
||||
11
next-lib/src/french/CompatibilityFre.gf
Normal file
11
next-lib/src/french/CompatibilityFre.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../romance:../abstract:../common
|
||||
|
||||
concrete CompatibilityFre of Compatibility = CatFre ** open Prelude, CommonRomance in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:romance:abstract:common
|
||||
|
||||
concrete SymbolFre of Symbol = CatFre ** SymbolRomance with
|
||||
(ResRomance = ResFre) ;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
--# -path=.:abstract:common
|
||||
|
||||
concrete SymbolGer of Symbol = CatGer ** open Prelude, ResGer in {
|
||||
|
||||
lin
|
||||
|
||||
11
next-lib/src/italian/CompatibilityIta.gf
Normal file
11
next-lib/src/italian/CompatibilityIta.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../romance:../abstract:../common
|
||||
|
||||
concrete CompatibilityIta of Compatibility = CatIta ** open Prelude, CommonRomance in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:romance:abstract:common
|
||||
|
||||
concrete SymbolIta of Symbol = CatIta ** SymbolRomance with
|
||||
(ResRomance = ResIta) ;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:scandinavian:abstract:common
|
||||
|
||||
concrete SymbolNor of Symbol = CatNor ** SymbolScand with
|
||||
(ResScand = ResNor) ;
|
||||
|
||||
11
next-lib/src/spanish/CompatibilitySpa.gf
Normal file
11
next-lib/src/spanish/CompatibilitySpa.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../romance:../abstract:../common
|
||||
|
||||
concrete CompatibilitySpa of Compatibility = CatSpa ** open Prelude, CommonRomance in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:romance:abstract:common
|
||||
|
||||
concrete SymbolSpa of Symbol = CatSpa ** SymbolRomance with
|
||||
(ResRomance = ResSpa) ;
|
||||
|
||||
11
next-lib/src/swedish/CompatibilitySwe.gf
Normal file
11
next-lib/src/swedish/CompatibilitySwe.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../scandinavian:../abstract:../common
|
||||
|
||||
concrete CompatibilitySwe of Compatibility = CatSwe ** open Prelude, CommonScand in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = \\_ => n.s ; isDet = True ; n = Pl} ;
|
||||
OrdInt n = {s = n.s ++ ":e" ; isDet = True} ;
|
||||
|
||||
}
|
||||
@@ -1,2 +1,4 @@
|
||||
--# -path=.:scandinavian:abstract:common
|
||||
|
||||
concrete SymbolSwe of Symbol = CatSwe ** SymbolScand with
|
||||
(ResScand = ResSwe) ;
|
||||
|
||||
11
next-lib/src/tmp/CompatibilityEng.gf
Normal file
11
next-lib/src/tmp/CompatibilityEng.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete CompatibilityEng of Compatibility = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
-- from Noun 19/4/2008
|
||||
|
||||
lin
|
||||
NumInt n = {s = n.s ; n = Pl ; hasCard = True} ;
|
||||
OrdInt n = {s = n.s ++ "th"} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user