summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/tram/ExTramI.gfe41
-rw-r--r--examples/tram/README5
-rw-r--r--examples/tram/Tram.gf6
-rw-r--r--examples/tram/TramI.gf6
4 files changed, 51 insertions, 7 deletions
diff --git a/examples/tram/ExTramI.gfe b/examples/tram/ExTramI.gfe
new file mode 100644
index 000000000..4a05d1cf8
--- /dev/null
+++ b/examples/tram/ExTramI.gfe
@@ -0,0 +1,41 @@
+--# -resource=../../lib/multimodal/MultimodalEng.gfc
+--# -path=multimodal:present:mathematical:prelude
+
+incomplete concrete TramI of Tram = open Multimodal, DemRes, Symbol in {
+
+flags startcat=Query ; lexer=literals ;
+
+lincat
+ Query = Phr ; -- top level, plain string
+ Input = MS ; -- two parallel sequences (text and clicks)
+ Dep, Dest = MAdv ;
+ Click = Point ;
+
+lin
+ QInput = PhrMS PPos ;
+
+ GoFromTo x_MAdv y_MAdv = in MultimodalEng.MS "I want to go X Y" ;
+
+ ComeToFrom x_MAdv y_MAdv = in MultimodalEng.MS "I want to come X Y" ;
+
+ ComeFrom x_MAdv = in MultimodalEng.MS "I want to come X" ;
+
+ GoTo x_MAdv = in MultimodalEng.MS "I want to go X" ;
+
+ DepClick c = mkDem Adv (in MAdv "from here") c ;
+ DestClick c = mkDem Adv (in MAdv "to here") c ;
+ DepHere = DemAdv (in Adv "from here") ;
+ DestHere = DemAdv (in Adv "to here") ;
+ DepNamed s = MPrepNP from_Prep (DemNP (UsePN (SymbPN (MkSymb s)))) ;
+ DestNamed s = MPrepNP to_Prep (DemNP (UsePN (SymbPN (MkSymb s)))) ;
+
+ CCoord x y = {point = "(" ++ x.s ++ "," ++ y.s ++ ")" ; lock_Point = <>} ;
+
+-- Place = DNP ; -- name + click - not possible for "here"
+-- PClick c = this_DNP c ;
+-- PHere = DemNP this_NP ;
+-- PNamed s = DemNP (UsePN (SymbPN s)) ;
+
+---- FromThisPlace =
+
+}
diff --git a/examples/tram/README b/examples/tram/README
index 2376afaf8..c4f606380 100644
--- a/examples/tram/README
+++ b/examples/tram/README
@@ -21,7 +21,10 @@ resources, located in
To produce them, use 'make' and 'make install' in GF/lib/resource-1.0.
You moreover have to set your GF_LIB_PATH to point to your GF/lib/.
+The grammar in ExTramI.gfe compiles, but does not give the same grammar
+as TramI.gf.
-AR 7/11/2005 -- 25/2/2006
+
+AR 7/11/2005 -- 6/3/2006
diff --git a/examples/tram/Tram.gf b/examples/tram/Tram.gf
index 1e437d5ed..5392d1c73 100644
--- a/examples/tram/Tram.gf
+++ b/examples/tram/Tram.gf
@@ -12,9 +12,9 @@ fun
fun
GoFromTo : Dep -> Dest -> Input ; -- user input "want to go from a to b"
- GoToFrom : Dest -> Dep -> Input ; -- user input "want to go to a from b"
- ComeFrom : Dep -> Input ; -- user input "want to come from x (to where I am now)
- GoTo : Dest -> Input ; -- user input "want to go to x (from where I am now)
+ ComeToFrom: Dest -> Dep -> Input ; -- user input "want to come to a from b"
+ ComeFrom : Dep -> Input ; -- user input "want to come from x (to where I'm now)
+ GoTo : Dest -> Input ; -- user input "want to go to x (from where I'm now)
DepClick : Click -> Dep ; -- "from here" with click
DestClick : Click -> Dest ; -- "to here" with click
diff --git a/examples/tram/TramI.gf b/examples/tram/TramI.gf
index 242a7788d..31dbaab59 100644
--- a/examples/tram/TramI.gf
+++ b/examples/tram/TramI.gf
@@ -15,13 +15,13 @@ lin
MPredVP (DemNP (UsePron i_Pron))
(MAdvVP (MAdvVP (MComplVV want_VV (MUseV go_V)) x) y) ;
- GoToFrom x y =
+ ComeToFrom x y =
MPredVP (DemNP (UsePron i_Pron))
- (MAdvVP (MAdvVP (MComplVV want_VV (MUseV go_V)) x) y) ;
+ (MAdvVP (MAdvVP (MComplVV want_VV (MUseV come_V)) x) y) ;
ComeFrom x =
MPredVP (DemNP (UsePron i_Pron))
- (MAdvVP (MComplVV want_VV (MUseV go_V)) x) ;
+ (MAdvVP (MComplVV want_VV (MUseV come_V)) x) ;
GoTo x =
MPredVP (DemNP (UsePron i_Pron))