From eb6bbb26f131ca7ffd07c451ddc2fe12b78a7f0e Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 8 Dec 2010 12:40:46 +0000 Subject: [PATCH] Punjabi api files --- lib/src/api/CombinatorsPnb.gf | 6 ++++++ lib/src/api/ConstructorsPnb.gf | 3 +++ lib/src/api/SyntaxPnb.gf | 5 +++++ lib/src/api/TryPnb.gf | 22 ++++++++++++++++++++++ lib/src/hindustani/RelativeHindustani.gf | 4 ++-- lib/src/punjabi/RelativePnb.gf | 4 ++-- 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 lib/src/api/CombinatorsPnb.gf create mode 100644 lib/src/api/ConstructorsPnb.gf create mode 100644 lib/src/api/SyntaxPnb.gf create mode 100644 lib/src/api/TryPnb.gf diff --git a/lib/src/api/CombinatorsPnb.gf b/lib/src/api/CombinatorsPnb.gf new file mode 100644 index 000000000..30d748c8d --- /dev/null +++ b/lib/src/api/CombinatorsPnb.gf @@ -0,0 +1,6 @@ +--# -path=.:alltenses:prelude + +resource CombinatorsPnb = Combinators with + (Cat = CatPnb), + (Structural = StructuralPnb), + (Constructors = ConstructorsPnb) ; diff --git a/lib/src/api/ConstructorsPnb.gf b/lib/src/api/ConstructorsPnb.gf new file mode 100644 index 000000000..131629da2 --- /dev/null +++ b/lib/src/api/ConstructorsPnb.gf @@ -0,0 +1,3 @@ +--# -path=.:alltenses:prelude + +resource ConstructorsPnb = Constructors with (Grammar = GrammarPnb) ; diff --git a/lib/src/api/SyntaxPnb.gf b/lib/src/api/SyntaxPnb.gf new file mode 100644 index 000000000..5d69c38c1 --- /dev/null +++ b/lib/src/api/SyntaxPnb.gf @@ -0,0 +1,5 @@ +--# -path=.:./alltenses:../prelude + +instance SyntaxPnb of Syntax = + ConstructorsPnb, CatPnb, StructuralPnb, CombinatorsPnb ; + diff --git a/lib/src/api/TryPnb.gf b/lib/src/api/TryPnb.gf new file mode 100644 index 000000000..95ce378b8 --- /dev/null +++ b/lib/src/api/TryPnb.gf @@ -0,0 +1,22 @@ +--# -path=.:alltenses:prelude + +resource TryPnb = SyntaxPnb - [mkAdN] , LexiconPnb, ParadigmsPnb - [mkAdv,mkDet,mkIP,mkAdN] ** + open (P = ParadigmsPnb) in { + +oper + + mkAdv = overload SyntaxPnb { + mkAdv : Str -> Adv = P.mkAdv ; + } ; + + mkAdN = overload { + mkAdN : CAdv -> AdN = SyntaxPnb.mkAdN ; +--- mkAdN : Str -> AdN = P.mkAdN ; + } ; + +-- mkOrd = overload SyntaxPnb { +-- mkOrd : A -> Ord = SyntaxPnb.OrdSuperl ; +-- } ; + + +} diff --git a/lib/src/hindustani/RelativeHindustani.gf b/lib/src/hindustani/RelativeHindustani.gf index cd6e98f4a..16d6596fa 100644 --- a/lib/src/hindustani/RelativeHindustani.gf +++ b/lib/src/hindustani/RelativeHindustani.gf @@ -16,7 +16,7 @@ incomplete concrete RelativeHindustani of Relative = c = Dir } ; -{- RelVP rp vp = { + RelVP rp vp = { s = \\t,p,o,ag => let agr = case rp.a of { @@ -41,7 +41,7 @@ incomplete concrete RelativeHindustani of Relative = -- }; c = Dir } ; --} + FunRP p np rp = { s = \\n,c => rp.s ! n ! c ++ np.s ! NPC c ++ p.s ! Masc ; a = RAg np.a diff --git a/lib/src/punjabi/RelativePnb.gf b/lib/src/punjabi/RelativePnb.gf index ed0ae1937..47073fad5 100644 --- a/lib/src/punjabi/RelativePnb.gf +++ b/lib/src/punjabi/RelativePnb.gf @@ -15,7 +15,7 @@ concrete RelativePnb of Relative = CatPnb ** open ResPnb in { } ; -- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes - {- RelVP rp vp = { + RelVP rp vp = { s = \\t,p,o,ag => let agr = case rp.a of { @@ -45,7 +45,7 @@ concrete RelativePnb of Relative = CatPnb ** open ResPnb in { -- }; c = Dir } ; --} + FunRP p np rp = { s = \\n,c => rp.s ! n ! c ++ np.s ! NPC c ++ p.s ; a = RAg np.a