summaryrefslogtreecommitdiff
path: root/next-lib
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-10-06 15:27:14 +0000
committeraarne <aarne@cs.chalmers.se>2008-10-06 15:27:14 +0000
commitab1420510859c3534d9ba7ff1e2ecbf3e317bc6c (patch)
tree332728bfb845ae63ad0cef6dd68ee42711d9f109 /next-lib
parente765b97fc483d5e737794a0aa90890ab2a1b2028 (diff)
next-lib now compiles webalt ; removed subdir mathematical/ for simplicity
Diffstat (limited to 'next-lib')
-rw-r--r--next-lib/src/Make.hs7
-rw-r--r--next-lib/src/abstract/Compatibility.gf9
-rw-r--r--next-lib/src/api/CombinatorsCat.gf2
-rw-r--r--next-lib/src/api/CombinatorsSpa.gf2
-rw-r--r--next-lib/src/api/ConstructorsCat.gf2
-rw-r--r--next-lib/src/api/Symbolic.gf18
-rw-r--r--next-lib/src/api/SymbolicCat.gf2
-rw-r--r--next-lib/src/api/SymbolicSpa.gf2
-rw-r--r--next-lib/src/api/SyntaxCat.gf5
-rw-r--r--next-lib/src/api/SyntaxSpa.gf2
-rw-r--r--next-lib/src/catalan/CompatibilityCat.gf11
-rw-r--r--next-lib/src/catalan/SymbolCat.gf2
-rw-r--r--next-lib/src/danish/SymbolDan.gf2
-rw-r--r--next-lib/src/english/CompatibilityCat.gf11
-rw-r--r--next-lib/src/english/CompatibilityEng.gf11
-rw-r--r--next-lib/src/english/SymbolEng.gf2
-rw-r--r--next-lib/src/finnish/CompatibilityFin.gf11
-rw-r--r--next-lib/src/finnish/SymbolFin.gf4
-rw-r--r--next-lib/src/french/CompatibilityFre.gf11
-rw-r--r--next-lib/src/french/SymbolFre.gf2
-rw-r--r--next-lib/src/german/SymbolGer.gf2
-rw-r--r--next-lib/src/italian/CompatibilityIta.gf11
-rw-r--r--next-lib/src/italian/SymbolIta.gf2
-rw-r--r--next-lib/src/norwegian/SymbolNor.gf2
-rw-r--r--next-lib/src/spanish/CompatibilitySpa.gf11
-rw-r--r--next-lib/src/spanish/SymbolSpa.gf2
-rw-r--r--next-lib/src/swedish/CompatibilitySwe.gf11
-rw-r--r--next-lib/src/swedish/SymbolSwe.gf2
-rw-r--r--next-lib/src/tmp/CompatibilityEng.gf11
29 files changed, 157 insertions, 15 deletions
diff --git a/next-lib/src/Make.hs b/next-lib/src/Make.hs
index 8a597b707..df85d5a4a 100644
--- a/next-lib/src/Make.hs
+++ b/next-lib/src/Make.hs
@@ -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"
diff --git a/next-lib/src/abstract/Compatibility.gf b/next-lib/src/abstract/Compatibility.gf
new file mode 100644
index 000000000..a4af7d4f5
--- /dev/null
+++ b/next-lib/src/abstract/Compatibility.gf
@@ -0,0 +1,9 @@
+abstract Compatibility = Cat ** {
+
+-- from Noun 19/4/2008
+
+fun
+ NumInt : Int -> Num ; -- 57
+ OrdInt : Int -> Ord ; -- 57
+
+}
diff --git a/next-lib/src/api/CombinatorsCat.gf b/next-lib/src/api/CombinatorsCat.gf
index 91b9d6beb..473f5bd9b 100644
--- a/next-lib/src/api/CombinatorsCat.gf
+++ b/next-lib/src/api/CombinatorsCat.gf
@@ -1,4 +1,4 @@
---# -path=.:alltenses:prelude
+--# -path=.:alltenses
resource CombinatorsCat = Combinators with
(Cat = CatCat),
diff --git a/next-lib/src/api/CombinatorsSpa.gf b/next-lib/src/api/CombinatorsSpa.gf
index ece2b7b79..778c0fb3e 100644
--- a/next-lib/src/api/CombinatorsSpa.gf
+++ b/next-lib/src/api/CombinatorsSpa.gf
@@ -1,4 +1,4 @@
---# -path=.:alltenses:prelude
+--# -path=.:alltenses
resource CombinatorsSpa = Combinators with
(Cat = CatSpa),
diff --git a/next-lib/src/api/ConstructorsCat.gf b/next-lib/src/api/ConstructorsCat.gf
index 4efd5bad4..656b2573e 100644
--- a/next-lib/src/api/ConstructorsCat.gf
+++ b/next-lib/src/api/ConstructorsCat.gf
@@ -1,3 +1,3 @@
---# -path=.:alltenses:prelude
+--# -path=.:alltenses
resource ConstructorsCat = Constructors with (Grammar = GrammarCat) ;
diff --git a/next-lib/src/api/Symbolic.gf b/next-lib/src/api/Symbolic.gf
index 6ce8478b9..732839e1c 100644
--- a/next-lib/src/api/Symbolic.gf
+++ b/next-lib/src/api/Symbolic.gf
@@ -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 = <>} ;
diff --git a/next-lib/src/api/SymbolicCat.gf b/next-lib/src/api/SymbolicCat.gf
index 4c19a02bc..f0a1b59e3 100644
--- a/next-lib/src/api/SymbolicCat.gf
+++ b/next-lib/src/api/SymbolicCat.gf
@@ -2,4 +2,4 @@
resource SymbolicCat = Symbolic with
(Symbol = SymbolCat),
- (Syntax = SyntaxCat) ;
+ (Grammar = GrammarCat) ;
diff --git a/next-lib/src/api/SymbolicSpa.gf b/next-lib/src/api/SymbolicSpa.gf
index ae44431f5..f284075d7 100644
--- a/next-lib/src/api/SymbolicSpa.gf
+++ b/next-lib/src/api/SymbolicSpa.gf
@@ -1,4 +1,4 @@
---# -path=.:present:mathematical:prelude
+--# -path=.:present:prelude
resource SymbolicSpa = Symbolic with
(Symbol = SymbolSpa),
diff --git a/next-lib/src/api/SyntaxCat.gf b/next-lib/src/api/SyntaxCat.gf
index 73ff4829c..e9223be44 100644
--- a/next-lib/src/api/SyntaxCat.gf
+++ b/next-lib/src/api/SyntaxCat.gf
@@ -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 ;
diff --git a/next-lib/src/api/SyntaxSpa.gf b/next-lib/src/api/SyntaxSpa.gf
index 40315b430..6c36175d7 100644
--- a/next-lib/src/api/SyntaxSpa.gf
+++ b/next-lib/src/api/SyntaxSpa.gf
@@ -1,4 +1,4 @@
---# -path=.:alltenses:prelude
+--# -path=.:alltenses
instance SyntaxSpa of Syntax =
ConstructorsSpa, CatSpa, StructuralSpa, CombinatorsSpa ;
diff --git a/next-lib/src/catalan/CompatibilityCat.gf b/next-lib/src/catalan/CompatibilityCat.gf
new file mode 100644
index 000000000..e12287c45
--- /dev/null
+++ b/next-lib/src/catalan/CompatibilityCat.gf
@@ -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 ++ "."} ; ---
+
+}
diff --git a/next-lib/src/catalan/SymbolCat.gf b/next-lib/src/catalan/SymbolCat.gf
index 09faff744..55ebeeadc 100644
--- a/next-lib/src/catalan/SymbolCat.gf
+++ b/next-lib/src/catalan/SymbolCat.gf
@@ -1,2 +1,4 @@
+--# -path=.:romance:abstract:common
+
concrete SymbolCat of Symbol = CatCat ** SymbolRomance with
(ResRomance = ResCat) ;
diff --git a/next-lib/src/danish/SymbolDan.gf b/next-lib/src/danish/SymbolDan.gf
index ef1e73c82..610f94306 100644
--- a/next-lib/src/danish/SymbolDan.gf
+++ b/next-lib/src/danish/SymbolDan.gf
@@ -1,2 +1,4 @@
+--# -path=.:scandinavian:abstract:common
+
concrete SymbolDan of Symbol = CatDan ** SymbolScand with
(ResScand = ResDan) ;
diff --git a/next-lib/src/english/CompatibilityCat.gf b/next-lib/src/english/CompatibilityCat.gf
new file mode 100644
index 000000000..e12287c45
--- /dev/null
+++ b/next-lib/src/english/CompatibilityCat.gf
@@ -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 ++ "."} ; ---
+
+}
diff --git a/next-lib/src/english/CompatibilityEng.gf b/next-lib/src/english/CompatibilityEng.gf
new file mode 100644
index 000000000..28ede2a17
--- /dev/null
+++ b/next-lib/src/english/CompatibilityEng.gf
@@ -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"} ;
+
+}
diff --git a/next-lib/src/english/SymbolEng.gf b/next-lib/src/english/SymbolEng.gf
index 488c3fbdd..6092902c9 100644
--- a/next-lib/src/english/SymbolEng.gf
+++ b/next-lib/src/english/SymbolEng.gf
@@ -1,3 +1,5 @@
+--# -path=.:abstract:common
+
concrete SymbolEng of Symbol = CatEng ** open Prelude, ResEng in {
lin
diff --git a/next-lib/src/finnish/CompatibilityFin.gf b/next-lib/src/finnish/CompatibilityFin.gf
new file mode 100644
index 000000000..a615f2eed
--- /dev/null
+++ b/next-lib/src/finnish/CompatibilityFin.gf
@@ -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 ++ "."} ;
+
+}
diff --git a/next-lib/src/finnish/SymbolFin.gf b/next-lib/src/finnish/SymbolFin.gf
index 922b19dcb..9ceac2105 100644
--- a/next-lib/src/finnish/SymbolFin.gf
+++ b/next-lib/src/finnish/SymbolFin.gf
@@ -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
diff --git a/next-lib/src/french/CompatibilityFre.gf b/next-lib/src/french/CompatibilityFre.gf
new file mode 100644
index 000000000..89680f533
--- /dev/null
+++ b/next-lib/src/french/CompatibilityFre.gf
@@ -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 ++ "."} ; ---
+
+}
diff --git a/next-lib/src/french/SymbolFre.gf b/next-lib/src/french/SymbolFre.gf
index ab972c039..3e3202f73 100644
--- a/next-lib/src/french/SymbolFre.gf
+++ b/next-lib/src/french/SymbolFre.gf
@@ -1,2 +1,4 @@
+--# -path=.:romance:abstract:common
+
concrete SymbolFre of Symbol = CatFre ** SymbolRomance with
(ResRomance = ResFre) ;
diff --git a/next-lib/src/german/SymbolGer.gf b/next-lib/src/german/SymbolGer.gf
index 38516d74a..c2e6b2a1d 100644
--- a/next-lib/src/german/SymbolGer.gf
+++ b/next-lib/src/german/SymbolGer.gf
@@ -1,3 +1,5 @@
+--# -path=.:abstract:common
+
concrete SymbolGer of Symbol = CatGer ** open Prelude, ResGer in {
lin
diff --git a/next-lib/src/italian/CompatibilityIta.gf b/next-lib/src/italian/CompatibilityIta.gf
new file mode 100644
index 000000000..91446be55
--- /dev/null
+++ b/next-lib/src/italian/CompatibilityIta.gf
@@ -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 ++ "."} ; ---
+
+}
diff --git a/next-lib/src/italian/SymbolIta.gf b/next-lib/src/italian/SymbolIta.gf
index d4e9cbf52..527bb0afb 100644
--- a/next-lib/src/italian/SymbolIta.gf
+++ b/next-lib/src/italian/SymbolIta.gf
@@ -1,2 +1,4 @@
+--# -path=.:romance:abstract:common
+
concrete SymbolIta of Symbol = CatIta ** SymbolRomance with
(ResRomance = ResIta) ;
diff --git a/next-lib/src/norwegian/SymbolNor.gf b/next-lib/src/norwegian/SymbolNor.gf
index 2e446b09b..f7674df55 100644
--- a/next-lib/src/norwegian/SymbolNor.gf
+++ b/next-lib/src/norwegian/SymbolNor.gf
@@ -1,2 +1,4 @@
+--# -path=.:scandinavian:abstract:common
+
concrete SymbolNor of Symbol = CatNor ** SymbolScand with
(ResScand = ResNor) ;
diff --git a/next-lib/src/spanish/CompatibilitySpa.gf b/next-lib/src/spanish/CompatibilitySpa.gf
new file mode 100644
index 000000000..b8af3136b
--- /dev/null
+++ b/next-lib/src/spanish/CompatibilitySpa.gf
@@ -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 ++ "."} ; ---
+
+}
diff --git a/next-lib/src/spanish/SymbolSpa.gf b/next-lib/src/spanish/SymbolSpa.gf
index e56343432..bcc6323e7 100644
--- a/next-lib/src/spanish/SymbolSpa.gf
+++ b/next-lib/src/spanish/SymbolSpa.gf
@@ -1,2 +1,4 @@
+--# -path=.:romance:abstract:common
+
concrete SymbolSpa of Symbol = CatSpa ** SymbolRomance with
(ResRomance = ResSpa) ;
diff --git a/next-lib/src/swedish/CompatibilitySwe.gf b/next-lib/src/swedish/CompatibilitySwe.gf
new file mode 100644
index 000000000..84ab961b3
--- /dev/null
+++ b/next-lib/src/swedish/CompatibilitySwe.gf
@@ -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} ;
+
+}
diff --git a/next-lib/src/swedish/SymbolSwe.gf b/next-lib/src/swedish/SymbolSwe.gf
index b80619c06..0c74baa93 100644
--- a/next-lib/src/swedish/SymbolSwe.gf
+++ b/next-lib/src/swedish/SymbolSwe.gf
@@ -1,2 +1,4 @@
+--# -path=.:scandinavian:abstract:common
+
concrete SymbolSwe of Symbol = CatSwe ** SymbolScand with
(ResScand = ResSwe) ;
diff --git a/next-lib/src/tmp/CompatibilityEng.gf b/next-lib/src/tmp/CompatibilityEng.gf
new file mode 100644
index 000000000..28ede2a17
--- /dev/null
+++ b/next-lib/src/tmp/CompatibilityEng.gf
@@ -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"} ;
+
+}