summaryrefslogtreecommitdiff
path: root/old-examples/regulus/toy0/no-resource/Toy0Eng.gf
diff options
context:
space:
mode:
Diffstat (limited to 'old-examples/regulus/toy0/no-resource/Toy0Eng.gf')
-rw-r--r--old-examples/regulus/toy0/no-resource/Toy0Eng.gf27
1 files changed, 27 insertions, 0 deletions
diff --git a/old-examples/regulus/toy0/no-resource/Toy0Eng.gf b/old-examples/regulus/toy0/no-resource/Toy0Eng.gf
new file mode 100644
index 000000000..977fb09c5
--- /dev/null
+++ b/old-examples/regulus/toy0/no-resource/Toy0Eng.gf
@@ -0,0 +1,27 @@
+concrete Toy0Eng of Toy0 = {
+
+param
+ Number = Sg | Pl ;
+
+lincat
+ Spec = {s : Str ; n : Number} ;
+ Noun = {s : Number => Str} ;
+ NP = {s : Str} ;
+
+lin
+ SpecNoun spec noun = {s = spec.s ++ noun.s ! spec.n} ;
+
+ One = {s = "one" ; n = Sg} ;
+ Two = {s = "two" ; n = Pl} ;
+
+ Felis = regNoun "cat" ;
+ Canis = regNoun "dog" ;
+
+oper
+ regNoun : Str -> {s : Number => Str} = \s -> {
+ s = table {
+ Sg => s ;
+ Pl => s + "s"
+ }
+ } ;
+}