mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
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"
|
default_gfc = "../../bin/gfc"
|
||||||
|
|
||||||
presApiPath = "-path=api:present"
|
presApiPath = "-path=api:present"
|
||||||
|
presSymbolPath = "-path=.:abstract:present:common:romance:scandinavian" ----
|
||||||
|
|
||||||
-- the languages have long directory names and short ISO codes (3 letters)
|
-- the languages have long directory names and short ISO codes (3 letters)
|
||||||
-- we also give the decodings for postprocessing linearizations, as long as grammars
|
-- we also give the decodings for postprocessing linearizations, as long as grammars
|
||||||
@@ -84,7 +85,11 @@ make xx = do
|
|||||||
|
|
||||||
ifx "lang" $ do
|
ifx "lang" $ do
|
||||||
mapM_ (gfc pres [] . lang) (optl langsLang)
|
mapM_ (gfc pres [] . lang) (optl langsLang)
|
||||||
|
mapM_ (gfc pres presSymbolPath . symbol) (optl langsAPI)
|
||||||
copy "*/*.gfo" dir
|
copy "*/*.gfo" dir
|
||||||
|
ifx "compat" $ do
|
||||||
|
mapM_ (gfc pres [] . compat) (optl langsCompat)
|
||||||
|
copy "*/Compatibility*.gfo" dir
|
||||||
ifx "api" $ do
|
ifx "api" $ do
|
||||||
mapM_ (gfc pres presApiPath . try) (optl langsAPI)
|
mapM_ (gfc pres presApiPath . try) (optl langsAPI)
|
||||||
mapM_ (gfc pres presApiPath . symbolic) (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"
|
" | ps -to_html | wf -file=resdemo.html"
|
||||||
|
|
||||||
lang (lla,la) = lla ++ "/All" ++ la ++ ".gf"
|
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"
|
try (lla,la) = "api/Try" ++ la ++ ".gf"
|
||||||
symbolic (lla,la) = "api/Symbolic" ++ 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
|
resource CombinatorsCat = Combinators with
|
||||||
(Cat = CatCat),
|
(Cat = CatCat),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:alltenses:prelude
|
--# -path=.:alltenses
|
||||||
|
|
||||||
resource CombinatorsSpa = Combinators with
|
resource CombinatorsSpa = Combinators with
|
||||||
(Cat = CatSpa),
|
(Cat = CatSpa),
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
--# -path=.:alltenses:prelude
|
--# -path=.:alltenses
|
||||||
|
|
||||||
resource ConstructorsCat = Constructors with (Grammar = GrammarCat) ;
|
resource ConstructorsCat = Constructors with (Grammar = GrammarCat) ;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
--1 Symbolic: Noun Phrases with mathematical symbols
|
--1 Symbolic: Noun Phrases with mathematical symbols
|
||||||
|
|
||||||
incomplete resource Symbolic = open Symbol, Grammar in {
|
incomplete resource Symbolic = open Symbol, Grammar, PredefCnc in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
symb : overload {
|
symb : overload {
|
||||||
symb : Str -> NP ; -- x
|
symb : Str -> NP ; -- x
|
||||||
symb : Integer -> NP ; -- 23
|
symb : Int -> NP ; -- 23
|
||||||
symb : Float -> NP ; -- 0.99
|
symb : Float -> NP ; -- 0.99
|
||||||
symb : N -> Digits -> NP ; -- level 4
|
symb : N -> Digits -> NP ; -- level 4
|
||||||
symb : N -> Card -> NP ; -- level four
|
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 -> N -> Card -> NP ; -- the number four
|
||||||
symb : Det -> CN -> Card -> NP ; -- the even number four
|
symb : Det -> CN -> Card -> NP ; -- the even number four
|
||||||
symb : Det -> N -> Str -> Str -> NP ; -- the levels i and j
|
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 ;
|
mkSymb : Str -> Symb ;
|
||||||
@@ -25,9 +28,9 @@ incomplete resource Symbolic = open Symbol, Grammar in {
|
|||||||
symb = overload {
|
symb = overload {
|
||||||
symb : Str -> NP
|
symb : Str -> NP
|
||||||
= \s -> UsePN (SymbPN (mkSymb s)) ;
|
= \s -> UsePN (SymbPN (mkSymb s)) ;
|
||||||
symb : Integer -> NP
|
symb : Int -> NP
|
||||||
= \i -> UsePN (IntPN i) ;
|
= \i -> UsePN (IntPN i) ;
|
||||||
symb : Floating -> NP
|
symb : Float -> NP
|
||||||
= \i -> UsePN (FloatPN i) ;
|
= \i -> UsePN (FloatPN i) ;
|
||||||
symb : N -> Digits -> NP
|
symb : N -> Digits -> NP
|
||||||
= \c,i -> CNNumNP (UseN c) (NumDigits i) ;
|
= \c,i -> CNNumNP (UseN c) (NumDigits i) ;
|
||||||
@@ -42,7 +45,10 @@ incomplete resource Symbolic = open Symbol, Grammar in {
|
|||||||
symb : Det -> N -> Str -> Str -> NP
|
symb : Det -> N -> Str -> Str -> NP
|
||||||
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
= \c,n,x,y -> CNSymbNP c (UseN n) (BaseSymb (mkSymb x) (mkSymb y)) ;
|
||||||
symb : Det -> CN -> [Symb] -> NP
|
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 = <>} ;
|
mkSymb : Str -> Symb = \s -> {s = s ; lock_Symb = <>} ;
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
resource SymbolicCat = Symbolic with
|
resource SymbolicCat = Symbolic with
|
||||||
(Symbol = SymbolCat),
|
(Symbol = SymbolCat),
|
||||||
(Syntax = SyntaxCat) ;
|
(Grammar = GrammarCat) ;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:present:mathematical:prelude
|
--# -path=.:present:prelude
|
||||||
|
|
||||||
resource SymbolicSpa = Symbolic with
|
resource SymbolicSpa = Symbolic with
|
||||||
(Symbol = SymbolSpa),
|
(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 =
|
instance SyntaxSpa of Syntax =
|
||||||
ConstructorsSpa, CatSpa, StructuralSpa, CombinatorsSpa ;
|
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
|
concrete SymbolCat of Symbol = CatCat ** SymbolRomance with
|
||||||
(ResRomance = ResCat) ;
|
(ResRomance = ResCat) ;
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
--# -path=.:scandinavian:abstract:common
|
||||||
|
|
||||||
concrete SymbolDan of Symbol = CatDan ** SymbolScand with
|
concrete SymbolDan of Symbol = CatDan ** SymbolScand with
|
||||||
(ResScand = ResDan) ;
|
(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 {
|
concrete SymbolEng of Symbol = CatEng ** open Prelude, ResEng in {
|
||||||
|
|
||||||
lin
|
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 {
|
concrete SymbolFin of Symbol = CatFin ** open Prelude, NounFin, ResFin in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -25,7 +27,7 @@ lin
|
|||||||
SymbS sy = sy ;
|
SymbS sy = sy ;
|
||||||
|
|
||||||
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
|
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
|
||||||
SymbOrd n = {s = \\_,_ => n.s ++ "."} ;
|
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
||||||
|
|
||||||
lincat
|
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
|
concrete SymbolFre of Symbol = CatFre ** SymbolRomance with
|
||||||
(ResRomance = ResFre) ;
|
(ResRomance = ResFre) ;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--# -path=.:abstract:common
|
||||||
|
|
||||||
concrete SymbolGer of Symbol = CatGer ** open Prelude, ResGer in {
|
concrete SymbolGer of Symbol = CatGer ** open Prelude, ResGer in {
|
||||||
|
|
||||||
lin
|
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
|
concrete SymbolIta of Symbol = CatIta ** SymbolRomance with
|
||||||
(ResRomance = ResIta) ;
|
(ResRomance = ResIta) ;
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
--# -path=.:scandinavian:abstract:common
|
||||||
|
|
||||||
concrete SymbolNor of Symbol = CatNor ** SymbolScand with
|
concrete SymbolNor of Symbol = CatNor ** SymbolScand with
|
||||||
(ResScand = ResNor) ;
|
(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
|
concrete SymbolSpa of Symbol = CatSpa ** SymbolRomance with
|
||||||
(ResRomance = ResSpa) ;
|
(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
|
concrete SymbolSwe of Symbol = CatSwe ** SymbolScand with
|
||||||
(ResScand = ResSwe) ;
|
(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