summaryrefslogtreecommitdiff
path: root/examples/morpho/EngReal.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-08-15 12:41:04 +0000
committeraarne <aarne@cs.chalmers.se>2008-08-15 12:41:04 +0000
commitba78322409e2086a83c03b7b32e84940a24030b0 (patch)
tree87b13411a8d6db544461eef201f4e02207ac0ff1 /examples/morpho/EngReal.gf
parent0475ef3414cff410b826c9f06e6c7043625972fa (diff)
examples of morphological synthesis/analysis as top-level grammars
Diffstat (limited to 'examples/morpho/EngReal.gf')
-rw-r--r--examples/morpho/EngReal.gf31
1 files changed, 31 insertions, 0 deletions
diff --git a/examples/morpho/EngReal.gf b/examples/morpho/EngReal.gf
new file mode 100644
index 000000000..b28f1e0eb
--- /dev/null
+++ b/examples/morpho/EngReal.gf
@@ -0,0 +1,31 @@
+--# -path=.:alltenses
+
+concrete EngReal of Eng = IrregEng ** open (R = ResEng) in {
+
+lincat
+ Display = Str ;
+ Word = R.VForm => Str ;
+ Form = {s : Str ; v : R.VForm} ;
+
+lin
+
+-- select the forms to display (here all forms)
+
+ DAll w = w ! R.VInf ++ w ! R.VPres ++ w ! R.VPast ++ w ! R.VPPart ++ w ! R.VPresPart ;
+
+-- this code should be generated automatically
+
+ DForm w f = w ! f.v ++ f.s ;
+
+ VInf = vf R.VInf ;
+ VPres = vf R.VPres ;
+ VPast = vf R.VPast ;
+ VPPart = vf R.VPPart ;
+ VPresPart = vf R.VPresPart ;
+
+ WVerb v = v.s ;
+
+oper
+ vf : R.VForm -> {s : Str ; v : R.VForm} = \f -> {s = [] ; v = f} ; ---
+
+}