forked from GitHub/gf-core
overload res doc examples, part 2
This commit is contained in:
12
doc/tutorial/music/Music.gf
Normal file
12
doc/tutorial/music/Music.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
abstract Music = {
|
||||||
|
|
||||||
|
flags startcat=Kind ;
|
||||||
|
|
||||||
|
cat
|
||||||
|
Kind ;
|
||||||
|
Property ;
|
||||||
|
fun
|
||||||
|
PropKind : Kind -> Property -> Kind ;
|
||||||
|
Song : Kind ;
|
||||||
|
American : Property ;
|
||||||
|
}
|
||||||
7
doc/tutorial/music/MusicEng.gf
Normal file
7
doc/tutorial/music/MusicEng.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
--# -path=.:present:api:prelude
|
||||||
|
|
||||||
|
concrete MusicEng of Music = MusicEng0 - [PropKind] **
|
||||||
|
open SyntaxEng in {
|
||||||
|
lin
|
||||||
|
PropKind k p = mkCN k (mkRS (mkRCl which_RP (mkVP p))) ;
|
||||||
|
}
|
||||||
3
doc/tutorial/music/MusicEng0.gf
Normal file
3
doc/tutorial/music/MusicEng0.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
concrete MusicEng0 of Music = MusicI with
|
||||||
|
(Syntax = SyntaxEng),
|
||||||
|
(MusicLex = MusicLexEng) ;
|
||||||
5
doc/tutorial/music/MusicFin.gf
Normal file
5
doc/tutorial/music/MusicFin.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
--# -path=.:present:prelude
|
||||||
|
|
||||||
|
concrete MusicFin of Music = MusicI with
|
||||||
|
(Syntax = SyntaxFin),
|
||||||
|
(MusicLex = MusicLexFin) ;
|
||||||
6
doc/tutorial/music/MusicFre.gf
Normal file
6
doc/tutorial/music/MusicFre.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:present:prelude
|
||||||
|
|
||||||
|
|
||||||
|
concrete MusicFre of Music = MusicI with
|
||||||
|
(Syntax = SyntaxFre),
|
||||||
|
(MusicLex = MusicLexFre) ;
|
||||||
6
doc/tutorial/music/MusicGer.gf
Normal file
6
doc/tutorial/music/MusicGer.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:present:api:prelude
|
||||||
|
|
||||||
|
concrete MusicGer of Music = MusicI with
|
||||||
|
(Syntax = SyntaxGer),
|
||||||
|
(MusicLex = MusicLexGer) ;
|
||||||
|
|
||||||
9
doc/tutorial/music/MusicI.gf
Normal file
9
doc/tutorial/music/MusicI.gf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
incomplete concrete MusicI of Music = open Syntax, MusicLex in {
|
||||||
|
lincat
|
||||||
|
Kind = CN ;
|
||||||
|
Property = AP ;
|
||||||
|
lin
|
||||||
|
PropKind k p = mkCN p k ;
|
||||||
|
Song = mkCN song_N ;
|
||||||
|
American = mkAP american_A ;
|
||||||
|
}
|
||||||
5
doc/tutorial/music/MusicLex.gf
Normal file
5
doc/tutorial/music/MusicLex.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
abstract MusicLex = Cat ** {
|
||||||
|
fun
|
||||||
|
song_N : N ;
|
||||||
|
american_A : A ;
|
||||||
|
}
|
||||||
5
doc/tutorial/music/MusicLexEng.gf
Normal file
5
doc/tutorial/music/MusicLexEng.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
concrete MusicLexEng of MusicLex = CatEng ** open ParadigmsEng in {
|
||||||
|
lin
|
||||||
|
song_N = mkN "song" "songs" ;
|
||||||
|
american_A = mkA "American" ;
|
||||||
|
}
|
||||||
7
doc/tutorial/music/MusicLexFin.gf
Normal file
7
doc/tutorial/music/MusicLexFin.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
concrete MusicLexFin of MusicLex =
|
||||||
|
CatFin ** open ParadigmsFin in {
|
||||||
|
lin
|
||||||
|
song_N = regN "kappale" ; ---- mkN
|
||||||
|
american_A = regA "amerikkalainen" ; ---- mkA
|
||||||
|
}
|
||||||
|
|
||||||
6
doc/tutorial/music/MusicLexFre.gf
Normal file
6
doc/tutorial/music/MusicLexFre.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
concrete MusicLexFre of MusicLex = CatFre ** open ParadigmsFre in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
song_N = mkN "chanson" feminine ;
|
||||||
|
american_A = mkA "américain" ;
|
||||||
|
}
|
||||||
6
doc/tutorial/music/MusicLexGer.gf
Normal file
6
doc/tutorial/music/MusicLexGer.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
concrete MusicLexGer of MusicLex =
|
||||||
|
CatGer ** open ParadigmsGer in {
|
||||||
|
lin
|
||||||
|
song_N = mkN "Lied" "Lieder" neuter ;
|
||||||
|
american_A = mkA "amerikanisch" ;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user