diff options
| author | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2010-03-02 19:10:56 +0000 |
| commit | e4748e998453b979af46983a079f2ec3d307ada4 (patch) | |
| tree | ef1c2b278850a7f6a95959b6f18469645cf1094c /examples/gfcc/ResImperEng.gf | |
| parent | 21b10f91cbbd0a2d369dc55306bad53df1502cd7 (diff) | |
restored gfcc example (GF C compiler)
Diffstat (limited to 'examples/gfcc/ResImperEng.gf')
| -rw-r--r-- | examples/gfcc/ResImperEng.gf | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/gfcc/ResImperEng.gf b/examples/gfcc/ResImperEng.gf new file mode 100644 index 000000000..87cb30a54 --- /dev/null +++ b/examples/gfcc/ResImperEng.gf @@ -0,0 +1,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 ++ "."); + +} |
