diff options
| author | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
|---|---|---|
| committer | john.j.camilleri <john.j.camilleri@chalmers.se> | 2013-09-16 07:17:27 +0000 |
| commit | f5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 (patch) | |
| tree | 946c9e8542b8e8271b6b529a95c0400fa6613cb4 /examples/tutorial/smart/SmartFre.gf | |
| parent | 8e1c6cca407c82fc09569d80c231b8d256735989 (diff) | |
Remove contribs and examples
Everything has now been moved to a separate repository at
https://github.com/GrammaticalFramework/gf-contrib
The contents of the examples folder are build during SetupWeb
Diffstat (limited to 'examples/tutorial/smart/SmartFre.gf')
| -rw-r--r-- | examples/tutorial/smart/SmartFre.gf | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/examples/tutorial/smart/SmartFre.gf b/examples/tutorial/smart/SmartFre.gf deleted file mode 100644 index 78f3ed684..000000000 --- a/examples/tutorial/smart/SmartFre.gf +++ /dev/null @@ -1,90 +0,0 @@ ---# -path=.:prelude - -concrete SmartFre of Smart = open Prelude in { - --- grammar Toy1 from the Regulus book - -flags startcat = Utterance ; - -param - Number = Sg | Pl ; - Gender = Masc | Fem ; - VForm = VInf | VPart Gender Number ; - -lincat - Utterance = SS ; - Command = SS ; - Question = SS ; - Kind = {s : Number => Str ; g : Gender} ; - Action = {s : VForm => Str} ; - Device = {s : Str ; g : Gender ; n : Number} ; - Location = {s : Number => Str ; g : Gender} ; - Switchable = {} ; - Dimmable = {} ; - Statelike = {} ; - -lin - UCommand c = c ; - UQuestion q = q ; - - CAction _ act dev = ss (act.s ! VInf ++ dev.s) ; - QAction _ act _ dev = - ss (dev.s ++ est dev.g dev.n ++ act.s ! VPart dev.g dev.n) ; - - DKindOne k = { - s = defArt k.g ++ k.s ! Sg ; - g = k.g ; - n = Sg - } ; - DKindMany k = { - s = "les" ++ k.s ! Pl ; - g = k.g ; - n = Pl - } ; - DLoc _ dev loc = { - s = dev.s ++ "dans" ++ defArt loc.g ++ loc.s ! Sg ; - g = dev.g ; - n = dev.n - } ; - - light = mkNoun "lampe" Fem ; - fan = mkNoun "ventilateur" Masc ; - - switchOn _ _ = mkVerb "allumer" "allumé" ; - switchOff _ _ = mkVerb "éteindre" "éteint" ; - - dim _ _ = mkVerb "baisser" "baissé" ; - - kitchen = mkNoun "cuisine" Fem ; - livingRoom = mkNoun "salon" Masc ; - -oper - mkNoun : Str -> Gender -> {s : Number => Str ; g : Gender} = \dog,g -> { - s = table { - Sg => dog ; - Pl => dog + "s" - } ; - g = g - } ; - - mkVerb : (_,_ : Str) -> {s : VForm => Str} = \venir,venu -> { - s = table { - VInf => venir ; - VPart Masc Sg => venu ; - VPart Masc Pl => venu + "s" ; - VPart Fem Sg => venu + "e" ; - VPart Fem Pl => venu + "es" - } - } ; - - est : Gender -> Number -> Str = \g,n -> case <g,n> of { - <Masc,Sg> => "est-il" ; - <Fem, Sg> => "est-elle" ; - <Masc,Pl> => "sont-ils" ; - <Fem, Pl> => "sont-elles" - } ; - - defArt : Gender -> Str = \g -> case g of {Masc => "le" ; Fem => "la"} ; - -} - |
