forked from GitHub/gf-core
resource examples in tutorial
This commit is contained in:
13
doc/tutorial/arithm/Arithm.gf
Normal file
13
doc/tutorial/arithm/Arithm.gf
Normal file
@@ -0,0 +1,13 @@
|
||||
abstract Arithm = {
|
||||
|
||||
cat
|
||||
Prop ;
|
||||
Nat ;
|
||||
|
||||
fun
|
||||
Zero : Nat ;
|
||||
Succ : Nat -> Nat ;
|
||||
Even : Nat -> Prop ;
|
||||
And : Prop -> Prop -> Prop ;
|
||||
|
||||
}
|
||||
27
doc/tutorial/arithm/ArithmEng.gf
Normal file
27
doc/tutorial/arithm/ArithmEng.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
concrete ArithmEng of Arithm = ArithmI with
|
||||
(Lang = LangEng),
|
||||
(Lex = LexEng) ;
|
||||
|
||||
{-
|
||||
|
||||
concrete ArithmEng of Arithm = open LangEng, ParadigmsEng in {
|
||||
|
||||
lincat
|
||||
Prop = S ;
|
||||
Nat = NP ;
|
||||
|
||||
lin
|
||||
Zero =
|
||||
UsePN (regPN "zero" nonhuman) ;
|
||||
Succ n =
|
||||
DetCN (DetSg (SgQuant DefArt) NoOrd) (ComplN2 (regN2 "successor") n) ;
|
||||
Even n =
|
||||
UseCl TPres ASimul PPos
|
||||
(PredVP n (UseComp (CompAP (PositA (regA "even"))))) ;
|
||||
And x y =
|
||||
ConjS and_Conj (BaseS x y) ;
|
||||
|
||||
}
|
||||
-}
|
||||
20
doc/tutorial/arithm/ArithmI.gf
Normal file
20
doc/tutorial/arithm/ArithmI.gf
Normal file
@@ -0,0 +1,20 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
incomplete concrete ArithmI of Arithm = open Lang, Lex in {
|
||||
|
||||
lincat
|
||||
Prop = S ;
|
||||
Nat = NP ;
|
||||
|
||||
lin
|
||||
Zero =
|
||||
UsePN zero_PN ;
|
||||
Succ n =
|
||||
DetCN (DetSg (SgQuant DefArt) NoOrd) (ComplN2 successor_N2 n) ;
|
||||
Even n =
|
||||
UseCl TPres ASimul PPos
|
||||
(PredVP n (UseComp (CompAP (PositA even_A)))) ;
|
||||
And x y =
|
||||
ConjS and_Conj (BaseS x y) ;
|
||||
|
||||
}
|
||||
29
doc/tutorial/arithm/ArithmSwe.gf
Normal file
29
doc/tutorial/arithm/ArithmSwe.gf
Normal file
@@ -0,0 +1,29 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
|
||||
concrete ArithmSwe of Arithm = ArithmI with
|
||||
(Lang = LangSwe),
|
||||
(Lex = LexSwe) ;
|
||||
|
||||
{-
|
||||
concrete ArithmSwe of Arithm = open LangSwe, ParadigmsSwe in {
|
||||
|
||||
lincat
|
||||
Prop = S ;
|
||||
Nat = NP ;
|
||||
|
||||
lin
|
||||
Zero =
|
||||
UsePN (regPN "noll" neutrum) ;
|
||||
Succ n =
|
||||
DetCN (DetSg (SgQuant DefArt) NoOrd)
|
||||
(ComplN2 (mkN2 (mk2N "efterföljare" "efterföljare")
|
||||
(mkPreposition "till")) n) ;
|
||||
Even n =
|
||||
UseCl TPres ASimul PPos
|
||||
(PredVP n (UseComp (CompAP (PositA (regA "jämn"))))) ;
|
||||
And x y =
|
||||
ConjS and_Conj (BaseS x y) ;
|
||||
|
||||
}
|
||||
-}
|
||||
6
doc/tutorial/arithm/Lex.gf
Normal file
6
doc/tutorial/arithm/Lex.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
abstract Lex = Cat ** {
|
||||
fun
|
||||
zero_PN : PN ;
|
||||
successor_N2 : N2 ;
|
||||
even_A : A ;
|
||||
}
|
||||
6
doc/tutorial/arithm/LexEng.gf
Normal file
6
doc/tutorial/arithm/LexEng.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
concrete LexEng of Lex = CatEng ** open ParadigmsEng in {
|
||||
lin
|
||||
zero_PN = regPN "zero" nonhuman ;
|
||||
successor_N2 = regN2 "successor" ;
|
||||
even_A = regA "even" ;
|
||||
}
|
||||
8
doc/tutorial/arithm/LexSwe.gf
Normal file
8
doc/tutorial/arithm/LexSwe.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
concrete LexSwe of Lex = CatSwe ** open ParadigmsSwe in {
|
||||
lin
|
||||
zero_PN = regPN "noll" neutrum ;
|
||||
successor_N2 =
|
||||
mkN2 (mk2N "efterföljare" "efterföljare") (mkPreposition "till") ;
|
||||
even_A = regA "jämn" ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user