getting started on Scots

This commit is contained in:
Krasimir Angelov
2025-09-07 08:19:10 +02:00
parent 141074bec3
commit 35a6456524
30 changed files with 310 additions and 0 deletions

15
src/api/CombinatorsSco.gf Normal file
View File

@@ -0,0 +1,15 @@
--# -path=.:alltenses:prelude
resource CombinatorsSco = Combinators - [ appCN, appCNc ] with
(Cat = CatSco),
(Structural = StructuralSco),
(Noun = NounSco),
(Constructors = ConstructorsSco) **
{
oper
appCN : CN -> NP -> NP
= \cn,x -> mkNP the_Art (PossNP cn x) ;
appCNc : CN -> [NP] -> NP
= \cn,xs -> let np : NP = mkNP and_Conj xs
in mkNP the_Art (PossNP cn np) ;
}

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsSco = Constructors with (Grammar = GrammarSco) ;

5
src/api/SymbolicSco.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../english:../common:../abstract:../prelude
resource SymbolicSco = Symbolic with
(Symbol = SymbolSco),
(Grammar = GrammarSco) ;

5
src/api/SyntaxSco.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
instance SyntaxSco of Syntax =
ConstructorsSco, CatSco, StructuralSco, CombinatorsSco ;

22
src/api/TrySco.gf Normal file
View File

@@ -0,0 +1,22 @@
--# -path=.:../english:../common:../abstract:../prelude
resource TrySco = SyntaxSco-[mkAdN], LexiconSco, ParadigmsSco - [mkAdv,mkAdN,mkOrd,mkQuant,mkVoc] **
open (P = ParadigmsEng) in {
oper
mkAdv = overload SyntaxSco {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxSco.mkAdN ;
mkAdN : Str -> AdN = P.mkAdN ;
} ;
mkOrd = overload SyntaxSco {
mkOrd : Str -> Ord = P.mkOrd ;
} ;
}