summaryrefslogtreecommitdiff
path: root/grammars/timetable/click.gf
blob: d752fb0274ecd5f76989fc1a0d3656e5bf4fdf97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
cat
  Request ;
  Place ;
  Position ;

fun
  GoTo : Place -> Request ;
  GoFromTo : Place -> Place -> Request ;

  Named : String -> Place ;
  Pointed : Position -> Place ;

  Pos : Int -> Int -> Position ;

lincat
  Request, Place = {s,s2 : Str} ;

lin
  GoTo x = {
    s = ["I want to go to"] ++ x.s ; 
    s2 = x.s2
    } ;
  GoFromTo x y = {
    s = ["I want to go from"] ++ x.s ++ "to" ++ y.s ; 
    s2 = x.s2 ++ "," ++ y.s2
    } ;

  Named c = {
    s = c.s ;
    s2 = []
    } ;
  Pointed p = {
    s = "here" ;
    s2 = p.s
    } ;
  Pos x y = {s = "(" ++ x.s ++ "," ++ y.s ++ ")"} ;