From 7f032c511fd87ad6e9e725f29edb911c756bce73 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Thu, 20 Aug 2020 15:36:16 +0200 Subject: [PATCH] (May) Conditional + new tests --- src/malay/AdverbMay.gf | 7 ++++--- src/malay/GrammarMay.gf | 5 +++-- src/malay/StructuralMay.gf | 4 ++-- src/malay/unittest/tenses.gftest | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/malay/AdverbMay.gf b/src/malay/AdverbMay.gf index 7d31c577..36458f82 100644 --- a/src/malay/AdverbMay.gf +++ b/src/malay/AdverbMay.gf @@ -20,11 +20,12 @@ lin -- Like adverbs, adadjectives can be produced by adjectives. -- : A -> AdA ; -- extremely --- PositAdAAdj a = { } ; --- Subordinate clauses can function as adverbs. + -- PositAdAAdj a = { } ; + + -- Subordinate clauses can function as adverbs. -- : Subj -> S -> Adv ; - -- SubjS subj s = + SubjS subj s = {s = subj.s ++ s.s} ; -- Comparison adverbs also work as numeral adverbs. diff --git a/src/malay/GrammarMay.gf b/src/malay/GrammarMay.gf index eeb0b6a2..024f6953 100644 --- a/src/malay/GrammarMay.gf +++ b/src/malay/GrammarMay.gf @@ -12,13 +12,14 @@ concrete GrammarMay of Grammar = TextX, StructuralMay, IdiomMay, - TenseX - [AAnter, TFut] + TenseX - [AAnter, TFut, TCond] ** open ParamX in { flags startcat = Phr ; lin AAnter = {s = "sudah" ; a = ParamX.Anter} ; - TFut = {s = "akan" ; t = ParamX.Fut} ; + TFut = {s = "akan" ; t = ParamX.Fut} ; + TCond = {s = "akan" ; t = ParamX.Cond} ; } ; diff --git a/src/malay/StructuralMay.gf b/src/malay/StructuralMay.gf index 9a2a4a15..36c6e6c2 100644 --- a/src/malay/StructuralMay.gf +++ b/src/malay/StructuralMay.gf @@ -138,9 +138,9 @@ lin they_Pron = mkPron "mereka" P3 ; -- lin although_Subj = -- lin because_Subj = --- lin if_Subj = +lin if_Subj = ss "sekiranya" ; -- lin that_Subj = --- lin when_Subj = +lin when_Subj = ss "kalau" ; ------ diff --git a/src/malay/unittest/tenses.gftest b/src/malay/unittest/tenses.gftest index 0fe8ff75..b0447dd1 100644 --- a/src/malay/unittest/tenses.gftest +++ b/src/malay/unittest/tenses.gftest @@ -1,3 +1,6 @@ +------------- +-- Basics + Lang: UseCl (TTAnt TPres AAnter) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V)) LangEng: the cat has walked LangMay: kucing sudah berjalan @@ -9,3 +12,14 @@ LangMay: kucing berjalan Lang: UseCl (TTAnt TFut ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V)) LangEng: the cat will walk LangMay: kucing akan berjalan + +------------- +-- Conditions + +Lang: ExtAdvS (SubjS if_Subj (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron i_Pron) (UseV walk_V)))) (UseCl (TTAnt TCond ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V))) +LangEng: if I walked , the cat would walk +LangMay: sekiranya saya berjalan , kucing akan berjalan + +Lang: ExtAdvS (SubjS when_Subj (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseV walk_V)))) (UseCl (TTAnt TFut ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V))) +LangEng: when I walk , the cat will walk +LangMay: kalau saya berjalan , kucing akan berjalan