summaryrefslogtreecommitdiff
path: root/next-lib/src/scandinavian/RelativeScand.gf
blob: c5c0abc17d829bfacfdae82b648ba38acfa9eae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
incomplete concrete RelativeScand of Relative = 
  CatScand ** open CommonScand, ResScand, Prelude in {

  flags optimize=all_subs ;

  lin

    RelCl cl = {
      s = \\t,a,p,ag => pronSuch ! ag.gn ++ conjThat ++ cl.s ! t ! a ! p ! Sub ;
      c = NPAcc
      } ;

    RelVP rp vp = {
      s = \\t,ant,b,ag => 
        let 
          agr = case rp.a of {
            RNoAg => ag ;
            RAg a => a
            } ;
          cl = mkClause (rp.s ! ag.gn ! RNom) agr vp
        in
        cl.s ! t ! ant ! b ! Sub ;
      c = NPNom
      } ;

-- This rule uses pied piping ("huset i vilket hon bor")
-- Preposition stranding ("huset som hon bor i")
-- and the empty relative ("huset hon bor i") are defined in $ExtraScand$.

    RelSlash rp slash = {
      s = \\t,a,p,ag => 
        let 
          agr = case rp.a of {
            RNoAg => ag ;
            RAg agg => agg
            }
        in
          slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++  
          slash.s ! t ! a ! p ! Sub ++ slash.n3 ! agr ;
      c = NPAcc
      } ;

--- The case here could be genitive.

    FunRP p np rp = {
      s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep True ;
      a = RAg np.a
      } ;

    IdRP = {s = relPron ; a = RNoAg} ;

}