summaryrefslogtreecommitdiff
path: root/old-examples/tutorial/semantics/BaseI.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-25 16:54:35 +0000
commite9e80fc389365e24d4300d7d5390c7d833a96c50 (patch)
treef0b58473adaa670bd8fc52ada419d8cad470ee03 /old-examples/tutorial/semantics/BaseI.gf
parentb96b36f43de3e2f8b58d5f539daa6f6d47f25870 (diff)
changed names of resource-1.3; added a note on homepage on release
Diffstat (limited to 'old-examples/tutorial/semantics/BaseI.gf')
-rw-r--r--old-examples/tutorial/semantics/BaseI.gf70
1 files changed, 70 insertions, 0 deletions
diff --git a/old-examples/tutorial/semantics/BaseI.gf b/old-examples/tutorial/semantics/BaseI.gf
new file mode 100644
index 000000000..ec967e443
--- /dev/null
+++ b/old-examples/tutorial/semantics/BaseI.gf
@@ -0,0 +1,70 @@
+incomplete concrete BaseI of Base =
+ open Syntax, (G = Grammar), Symbolic, LexBase in {
+
+flags lexer=literals ; unlexer=text ;
+
+lincat
+ Question = G.Phr ;
+ Answer = G.Phr ;
+ S = G.Cl ;
+ NP = G.NP ;
+ PN = G.NP ;
+ CN = G.CN ;
+ AP = G.AP ;
+ A2 = G.A2 ;
+ Conj = G.Conj ;
+ ListPN = G.ListNP ;
+
+lin
+ PredAP = mkCl ;
+
+ ComplA2 = mkAP ;
+
+ ModCN = mkCN ;
+
+ ConjAP = mkAP ;
+ ConjNP = mkNP ;
+
+ UsePN p = p ;
+ Every = mkNP every_Det ;
+ Some = mkNP someSg_Det ;
+
+ And = and_Conj ;
+ Or = or_Conj ;
+
+ UseInt i = symb i ;
+
+ Number = mkCN number_N ;
+
+ Even = mkAP even_A ;
+ Odd = mkAP odd_A ;
+ Prime = mkAP prime_A ;
+ Equal = equal_A2 ;
+ Greater = greater_A2 ;
+ Smaller = smaller_A2 ;
+ Divisible = divisible_A2 ;
+
+ Sum = prefix sum_N2 ;
+ Product = prefix product_N2 ;
+ GCD nps = mkNP (mkDet (mkQuantSg defQuant) (mkOrd great_A))
+ (mkCN common_A (mkCN divisor_N2 (mkNP and_Conj nps))) ;
+
+ WhatIs np = mkPhr (mkQS (mkQCl whatSg_IP (mkVP np))) ;
+ WhichAre cn ap = mkPhr (mkQS (mkQCl (mkIP whichPl_IDet cn) (mkVP ap))) ;
+ QuestS s = mkPhr (mkQS (mkQCl s)) ;
+
+ Yes = yes_Phr ;
+ No = no_Phr ;
+
+ Value np = mkPhr (mkUtt np) ;
+ Many list = mkNP and_Conj list ;
+ None = none_NP ;
+
+ BasePN = G.BaseNP ;
+ ConsPN = G.ConsNP ;
+
+oper
+ prefix : G.N2 -> G.ListNP -> G.NP = \n2,nps ->
+ mkNP defSgDet (mkCN n2 (mkNP and_Conj nps)) ;
+
+}