summaryrefslogtreecommitdiff
path: root/examples/gfcc/ResImperEng.gf
blob: 87cb30a544b1f39c75298d2ac5a3c0e3a71ba2c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
resource ResImperEng = open Predef, Prelude in {

  oper
    indef = pre {"a" ; 
                  "an" / strs {"a" ; "e" ; "i" ; "o" ; "A" ; "E" ; "I" ; "O" }} ;

    constant : Str -> SS  = ss ;
    prefix   : Str -> SS -> SS -> SS = \f,x,y -> 
      ss ("the" ++ f ++ "of" ++ x.s ++ "and" ++ y.s) ;
    comparison : Str -> SS -> SS -> SS = \f,x,y -> 
      ss (x.s ++ "is" ++ f ++ "than" ++ y.s) ;
    continues : Str -> SS -> SS = \s,t -> ss (s ++ "." ++ t.s) ; 
    continue  : Str -> SS -> SS = \s,t -> ss (s ++        t.s) ; 
    statement : Str -> SS       = \s   -> ss (s ++ "."); 

}