mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Cleaned up names and paths in toy0 grammars.
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
-- grammar from Chapter 2 of the Regulus book
|
||||
flags startcat=NP ;
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ; Noun ; Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
|
||||
|
||||
15
examples/regulus/toy0/example-based/Toy0.gf
Normal file
15
examples/regulus/toy0/example-based/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
6
examples/regulus/toy0/example-based/Toy0Ger.gf
Normal file
6
examples/regulus/toy0/example-based/Toy0Ger.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Ger of Toy0 = Toy0I with
|
||||
(Grammar = GrammarGer),
|
||||
(Lexicon = LexiconGer) ;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
--# -path=..:present:prelude
|
||||
|
||||
concrete Toy0GerE of Toy0 = Toy0IE with
|
||||
(Grammar = GrammarGer),
|
||||
(Lexicon = LexiconGer) ;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--# -resource=present/LangEng.gfc
|
||||
--# -path=..:present:prelude
|
||||
--# -path=.:present:prelude
|
||||
|
||||
-- to compile: gf -examples Toy0IE.gfe
|
||||
-- to compile: gf -examples Toy0I.gfe
|
||||
|
||||
incomplete concrete Toy0IE of Toy0 = open Grammar, Lexicon in {
|
||||
incomplete concrete Toy0I of Toy0 = open Grammar, Lexicon in {
|
||||
|
||||
lincat
|
||||
Spec = Det ;
|
||||
15
examples/regulus/toy0/no-functor/Toy0.gf
Normal file
15
examples/regulus/toy0/no-functor/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=..:present:api:prelude
|
||||
--# -path=.:present:api:prelude
|
||||
concrete Toy0Eng of Toy0 =
|
||||
open SyntaxEng, ParadigmsEng in {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--# -path=..:present:prelude
|
||||
--# -path=.:present:prelude
|
||||
|
||||
concrete Toy0Fin0 of Toy0 = open SyntaxFin, ParadigmsFin in {
|
||||
concrete Toy0Fin of Toy0 = open SyntaxFin, ParadigmsFin in {
|
||||
|
||||
lincat
|
||||
Spec = Det ;
|
||||
15
examples/regulus/toy0/no-resource/Toy0.gf
Normal file
15
examples/regulus/toy0/no-resource/Toy0.gf
Normal file
@@ -0,0 +1,15 @@
|
||||
-- toy0 grammar from Chapter 2 of the Regulus book
|
||||
abstract Toy0 = {
|
||||
|
||||
flags startcat=NP ;
|
||||
|
||||
cat
|
||||
NP ;
|
||||
Noun ;
|
||||
Spec ;
|
||||
|
||||
fun
|
||||
SpecNoun : Spec -> Noun -> NP ;
|
||||
One, Two : Spec ;
|
||||
Felis, Canis : Noun ;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
--# -path=..
|
||||
concrete Toy0Eng of Toy0 = {
|
||||
|
||||
param
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
--# -path=..
|
||||
concrete Toy0Fre of Toy0 = {
|
||||
|
||||
param
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
--# -path=..
|
||||
concrete Toy0Ger of Toy0 = {
|
||||
|
||||
param
|
||||
@@ -8,10 +7,9 @@ param
|
||||
lincat
|
||||
Spec = {s : Gender => Str ; n : Number} ;
|
||||
Noun = {s : Number => Str ; g : Gender} ;
|
||||
MAIN,NP = {s : Str} ;
|
||||
NP = {s : Str} ;
|
||||
|
||||
lin
|
||||
Main np = np ;
|
||||
SpecNoun spec noun = {s = spec.s ! noun.g ++ noun.s ! spec.n} ;
|
||||
|
||||
One = {s = table {Fem => "eine" ; _ => "ein"} ; n = Sg} ;
|
||||
|
||||
Reference in New Issue
Block a user