From 4d94cdfd66c63eb01ad90c292f3dc75878a0e8a7 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 30 Jun 2005 22:09:36 +0000 Subject: [PATCH] gfcm in Java ; Finnish close to finished --- examples/stoneage/StoneageFin.gf | 24 +++++++++---------- examples/stoneage/StoneageResFin.gf | 3 +++ .../de/uka/ilkd/key/ocl/gf/GrammarFilter.java | 6 ++--- .../de/uka/ilkd/key/ocl/gf/Utils.java | 2 +- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/examples/stoneage/StoneageFin.gf b/examples/stoneage/StoneageFin.gf index 22a5c3180..2afe3a188 100644 --- a/examples/stoneage/StoneageFin.gf +++ b/examples/stoneage/StoneageFin.gf @@ -25,24 +25,24 @@ lin Drink = PresV2 (dirV2 drink_V) ; Eat = PresV2 (dirV2 eat_V) ; - Bite = PresV2 (dirV2 bite_V) ; + Bite = PresV2 (partV2 bite_V) ; Suck = PresV2 (dirV2 suck_V) ; See = PresV2 (dirV2 see_V) ; Hear = PresV2 (dirV2 hear_V) ; Know = PresV2 (dirV2 know_V) ; Smell = PresV2 (dirV2 smell_V) ; - Fear = PresV2 (dirV2 fear_V) ; + Fear = PresV2 (partV2 fear_V) ; Kill = PresV2 (dirV2 kill_V) ; - Fight = PresV2 (dirV2 fight_V) ; - Hunt = PresV2 (dirV2 hunt_V) ; - Hit = PresV2 (dirV2 hit_V) ; + Fight = PresV2 (mkV2 fight_V (postpP partitive "vastaan")) ; + Hunt = PresV2 (partV2 hunt_V) ; + Hit = PresV2 (partV2 hit_V) ; Cut = PresV2 (dirV2 cut_V) ; Split = PresV2 (dirV2 split_V) ; - Stab = PresV2 (dirV2 stab_V) ; - Scratch = PresV2 (dirV2 scratch_V) ; - Hold = PresV2 (dirV2 hold_V) ; + Stab = PresV2 (partV2 stab_V) ; + Scratch = PresV2 (partV2 scratch_V) ; + Hold = PresV2 (partV2 hold_V) ; Squeeze = PresV2 (dirV2 squeeze_V) ; - Rub = PresV2 (dirV2 rub_V) ; + Rub = PresV2 (partV2 rub_V) ; Wash = PresV2 (dirV2 wash_V) ; Wipe = PresV2 (dirV2 wipe_V) ; Pull = PresV2 (dirV2 pull_V) ; @@ -79,7 +79,7 @@ lin Swell = PresV swell_V ; Burn = PresV burn_V ; ----- Give = PresV3 (dirV3 give_V "to") ; + Give = PresV3 (dirV3 give_V allative) ; -- Say = ; @@ -198,8 +198,8 @@ lin Name = UseN name_N ; -- NameOf = AppN2 name_N2 ; ------ MotherOf = AppN2 (mkN2 mother_N "of") ; ------ FatherOf = AppN2 (mkN2 father_N "of") ; + MotherOf = AppN2 (genN2 mother_N) ; + FatherOf = AppN2 (genN2 father_N) ; Big = ModPosA big_ADeg ; Long = ModPosA long_ADeg ; diff --git a/examples/stoneage/StoneageResFin.gf b/examples/stoneage/StoneageResFin.gf index 3542f5f07..f7b47ffe2 100644 --- a/examples/stoneage/StoneageResFin.gf +++ b/examples/stoneage/StoneageResFin.gf @@ -5,6 +5,7 @@ oper PresV2 : V2 -> NP -> NP -> Phr = \v,s,o -> PresCl (SPredV2 s v o) ; PresV3 : V3 -> NP -> NP -> NP -> Phr = \v,s,o,r -> PresCl (SPredV3 s v o r) ; PresVasV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (dirV2 v) ; + PresPartV2 : V -> NP -> NP -> Phr = \ v -> PresV2 (caseV2 v partitive) ; PresCl : Cl -> Phr = \c -> { s = (UseCl (PosTP TPresent ASimul) c).s } ** {lock_Phr = <>} ; @@ -12,4 +13,6 @@ oper ModPosA : ADeg -> CN -> CN = \a -> ModAP (PositADeg a) ; ModA : A -> CN -> CN = \a -> ModAP (UseA a) ; + partV2 : V -> V2 = \v -> caseV2 v partitive ; + } diff --git a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GrammarFilter.java b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GrammarFilter.java index 13d8f5184..e8bd59c66 100644 --- a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GrammarFilter.java +++ b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/GrammarFilter.java @@ -20,7 +20,7 @@ import javax.swing.filechooser.*; public class GrammarFilter extends FileFilter { - // Accept all directories and all gf, gfm files. + // Accept all directories and all gf, gfcm files. public boolean accept(File f) { if (f.isDirectory()) { return true; @@ -29,7 +29,7 @@ public class GrammarFilter extends FileFilter { String extension = Utils.getExtension(f); if (extension != null) { if (extension.equals(Utils.gf) || - extension.equals(Utils.gfm)) { + extension.equals(Utils.gfcm)) { return true; } else { return false; @@ -41,6 +41,6 @@ public class GrammarFilter extends FileFilter { // The description of this filter public String getDescription() { - return "Just Grammars (*.gf, *.gfm)"; + return "Just Grammars (*.gf, *.gfcm)"; } } diff --git a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/Utils.java b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/Utils.java index e8b67e72b..fc93852a2 100644 --- a/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/Utils.java +++ b/src/JavaGUI2/de/uka/ilkd/key/ocl/gf/Utils.java @@ -30,7 +30,7 @@ public class Utils { } public static final String gf = "gf"; - public static final String gfm = "gfm"; + public static final String gfcm = "gfcm"; /* * Get the extension of a file.