summaryrefslogtreecommitdiff
path: root/examples/tutorial/old/semantics/BaseI.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-11-11 10:28:32 +0000
committeraarne <aarne@cs.chalmers.se>2008-11-11 10:28:32 +0000
commita5300ad062b82154f3f9533e143ea35515e6c39e (patch)
treea7eddd52596e0d216f17c9c7581d6ea67f9d8879 /examples/tutorial/old/semantics/BaseI.gf
parentdb18350b1e55f7edfca8f02b0b233a6a7dcbb1ec (diff)
tutorial complete with server and js
Diffstat (limited to 'examples/tutorial/old/semantics/BaseI.gf')
-rw-r--r--examples/tutorial/old/semantics/BaseI.gf70
1 files changed, 70 insertions, 0 deletions
diff --git a/examples/tutorial/old/semantics/BaseI.gf b/examples/tutorial/old/semantics/BaseI.gf
new file mode 100644
index 000000000..b7ed86666
--- /dev/null
+++ b/examples/tutorial/old/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 ** {lock_Int = <>}) ; ---- terrible to need this
+
+ 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 DefArt (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 which_IQuant cn) (mkVP ap))) ;
+ QuestS s = mkPhr (mkQS (mkQCl s)) ;
+
+ Yes = mkPhr yes_Utt ;
+ No = mkPhr no_Utt ;
+
+ 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 DefArt (mkCN n2 (mkNP and_Conj nps)) ;
+
+}