# ------------------------------------
# Common shaping rules shared by variants
# ------------------------------------

lookup chillu {
    sub k1 xx ZWJ by k1cil;
    sub nh xx ZWJ by nhcil;
    sub n1 xx ZWJ by n1cil;
    sub l3 xx ZWJ by l3cil;
    sub lh xx ZWJ by lhcil;
    sub r3 xx ZWJ by r3cil;
    sub y1 xx ZWJ by y1cil;
    sub m1 xx ZWJ by m1cil;
} chillu;

lookup blwf_la_sign_mlym {
  lookupflag 0;
    sub l3 xx by l4;
} blwf_la_sign_mlym;

lookup blwf_la_sign {
  lookupflag 0;
    sub xx l3 by l4;
} blwf_la_sign;

lookup half_forms_mlym {
  lookupflag 0;
    sub k1 xx by k1xx;
    sub k2 xx by k2xx;
    sub k3 xx by k3xx;
    sub k4 xx by k4xx;
    sub ng xx by ngxx;
    sub ch1 xx by ch1xx;
    sub ch2 xx by ch2xx;
    sub ch3 xx by ch3xx;
    sub ch4 xx by ch4xx;
    sub nj xx by njxx;
    sub t1 xx by t1xx;
    sub t2 xx by t2xx;
    sub t3 xx by t3xx;
    sub t4 xx by t4xx;
    sub nh xx by nhxx;
    sub th1 xx by th1xx;
    sub th2 xx by th2xx;
    sub th3 xx by th3xx;
    sub th4 xx by th4xx;
    sub n1 xx by n1xx;
    sub p1 xx by p1xx;
    sub p2 xx by p2xx;
    sub p3 xx by p3xx;
    sub p4 xx by p4xx;
    sub m1 xx by m1xx;
    sub y1 xx by y1xx;
    sub r3 xx by r3xx;
    sub rh xx by rhxx;
    sub l3 xx by l3xx;
    sub lh xx by lhxx;
    sub zh xx by zhxx;
    sub v1 xx by v1xx;
    sub z1 xx by z1xx;
    sub sh xx by shxx;
    sub s1 xx by s1xx;
    sub h1 xx by h1xx;
} half_forms_mlym;

lookup pstf_cons_signs_mlym {
  lookupflag 0;
    sub r3 xx by r4;
    sub y1 xx by y2;
    sub v1 xx by v2;
} pstf_cons_signs_mlym;

lookup pstf_cons_signs {
  lookupflag 0;
    sub xx y1 by y2;
    sub xx v1 by v2;
} pstf_cons_signs;

lookup split_cons_signs {
  lookupflag 0;
    sub v2 by xx v1;
    sub r4 by xx r3;
    sub l4 by xx l3;
} split_cons_signs;

lookup pstf_cons_signs_fix_order {
  lookupflag 0;
    # Avoid യ + ് + ര ligature
    sub y1 r4' lookup split_cons_signs;
    # Split r4 in  ്യ + ്ര combination
    sub y2 r4' lookup split_cons_signs;
    # Split r4 in ്വ + ്ര combination
    sub v2 r4' lookup split_cons_signs;
} pstf_cons_signs_fix_order;

lookup pref_reph {
  lookupflag 0;
    sub xx r3 by r4;
} pref_reph;

lookup restore_virama {
   sub l4 by xx l3;
} restore_virama;

lookup blws_la_sign_excludes {
    sub
        [
           t1 r3
           k1l3 k3l3 th1l3 p1l3 p2l3 m1l3 l3l3 v1v1 v1l3 z1l3 s1l3 h1l3
           ch1ch1 ch1ch2 k3k3 rhrh s1s1 t1t1 z1z1
        ]
        l4'
        lookup restore_virama;
} blws_la_sign_excludes;

lookup akhn_conjuncts {
  lookupflag 0;
    sub k1 l1 by k1l1;
    sub k1 xx k1 by k1k1;
    sub k1 xx nh by k1nh;
    sub k1 xx th1 by k1th1;
    sub k1 xx sh by k1sh;
    sub k3 xx k3 by k3k3;
    sub k3 xx th3 by k3th3;
    sub k3 xx th3 xx th4 by k3th3th4;
    sub k3 xx n1 by k3n1;
    sub k3 xx m1 by k3m1;
    sub ng xx k1 by ngk1;
    sub ng xx ng by ngng;
    sub ch1 xx ch1 by ch1ch1;
    sub ch3 xx ch3 by ch3ch3;
    sub ch3 xx nj by ch3nj;
    sub nj xx ch1 by njch1;
    sub nj xx ch3 by njch3;
    sub nj xx nj by njnj;
    sub t1 xx t1 by t1t1;
    sub t3 xx t3 by t3t3;
    sub t3 xx t4 by t3t4;
    sub nh xx t1 by nht1;
    sub nh xx t2 by nht2;
    sub nh xx t3 by nht3;
    sub nh xx nh by nhnh;
    sub nh xx m1 by nhm1;
    sub th1 xx th1 by th1th1;
    sub th1 xx th2 by th1th2;
    sub th1 xx n1 by th1n1;
    sub th1 xx p4 by th1p4;
    sub th1 xx m1 by th1m1;
    sub th1 xx s1 by th1s1;
    sub th3 xx th3 by th3th3;
    sub th3 xx th4 by th3th4;
    sub n1 xx th1 by n1th1;
    sub n1 xx th2 by n1th2;
    sub n1 xx th3 by n1th3;
    sub n1 xx th4 by n1th4;
    sub n1 xx n1 by n1n1;
    sub n1 xx m1 by n1m1;
    sub n1 xx rh by n1rh;
    sub n1cil xx rh by n1cilxxrh;
    sub p1 xx n1 by p1n1;
    sub p1 xx p1 by p1p1;
    sub p3 xx p3 by p3p3;
    sub m1 xx p1 by m1p1;
    sub m1 xx m1 by m1m1;
    sub y1 xx y1 by y1y1;
    sub l3 xx p1 by l3p1;
    sub l3 xx l3 by l3l3;
    sub v1 xx v1 by v1v1;
    sub z1 xx ch1 by z1ch1;
    sub z1 xx n1 by z1n1;
    sub z1 xx z1 by z1z1;
    sub s1 xx th2 by s1th2;
    sub s1 xx s1 by s1s1;
    sub h1 xx n1 by h1n1;
    sub h1 xx m1 by h1m1;
    sub lh xx lh by lhlh;
    sub rh xx rh by rhrh;
}  akhn_conjuncts;

lookup pres_reph_mlym {
  lookupflag 0;
    sub k1k1 r4 by k1k1r3;
    sub k1k1 xx r3 by k1k1r3;
    sub k1xx r3 by k1r3;
    sub k1 r4 by k1r3;
    sub k1t1 xx r3 by k1t1r3;
    sub k1t1 r4 by k1t1r3;
    sub k3xx r3 by k3r3;
    sub k3 r4 by k3r3;
    sub k4xx r3 by k4r3;
    sub k4 r4 by k4r3;
    sub k1th1 r4 by k1th1r3;
    sub k1th1 xx r3 by k1th1r3;
    sub ch3xx r3 by ch3r3;
    sub ch3 r4 by ch3r3;
    sub t1xx r3 by t1r3;
    sub t1 r4 by t1r3;
    sub t3xx r3 by t3r3;
    sub t3 r4 by t3r3;
    sub nht1 r4 by nht1r3;
    sub nht1 xx r3 by nht1r3;
    sub th1th1 r4 by th1th1r3;
    sub th1th1 xx r3 by th1th1r3;
    sub th1xx r3 by th1r3;
    sub th1 r4 by th1r3;
    sub th3xx r3 by th3r3;
    sub th3 r4 by th3r3;
    sub th4 r4 by th4r3;
    sub n1th1 r4 by n1th1r3;
    sub n1th1 xx r3 by n1th1r3;
    sub n1th3 r4 by n1th3r3;
    sub n1th3 xx r3 by n1th3r3;
    sub n1th4 r4 by n1th4r3;
    sub n1th4 xx r3 by n1th4r3;
    sub n1n1 r4 by n1n1r3;
    sub n1n1 xx r3 by n1n1r3;
    sub p1xx r3 by p1r3;
    sub p1 r4 by p1r3;
    sub p2xx r3 by p2r3;
    sub p2 r4 by p2r3;
    sub p3xx r3 by p3r3;
    sub p3 r4 by p3r3;
    sub p4xx r3 by p4r3;
    sub p4 r4 by p4r3;
    sub m1p1 r4 by m1p1r3;
    sub m1p1 xx r3 by m1p1r3;
    sub m1 r4 by m1r3;
    sub l3xx l3 by l3l3;
    sub v1xx r3 by v1r3;
    sub v1 r4 by v1r3;
    sub z1xx r3 by z1r3;
    sub z1 r4 by z1r3;
    sub sht1 r4 by sht1r3;
    sub sht1 xx r3 by sht1r3;
    sub s1th1 r4 by s1th1r3;
    sub s1th1 xx r3 by s1th1r3;
    sub s1xx r3 by s1r3;
    sub s1 r4 by s1r3;
    sub h1 r4 by h1r3;
    sub rhrh r4 by rhrhr3;
    sub rhrh xx r3 by rhrhr3;
} pres_reph_mlym;

lookup pres_reph {
  lookupflag 0;
    sub r4 k1k1 by k1k1r3;
    sub r4 k1t1 by k1t1r3;
    sub r4 k1th1 by k1th1r3;
    sub r4 k1 by k1r3;
    sub r4 k3 by k3r3;
    sub r4 k4 by k4r3;
    sub r4 ch3 by ch3r3;
    sub r4 t1 by t1r3;
    sub r4 t3 by t3r3;
    sub r4 nht1 by nht1r3;
    sub r4 th1th1 by th1th1r3;
    sub r4 th1 by th1r3;
    sub r4 th3 by th3r3;
    sub r4 th4 by th4r3;
    sub r4 n1th1 by n1th1r3;
    sub r4 n1th3 by n1th3r3;
    sub r4 n1th4 by n1th4r3;
    sub r4 n1n1 by n1n1r3;
    sub r4 p1 by p1r3;
    sub r4 p2 by p2r3;
    sub r4 p3 by p3r3;
    sub r4 p4 by p4r3;
    sub r4 m1p1 by m1p1r3;
    sub r4 m1 by m1r3;
    sub r4 v1 by v1r3;
    sub r4 z1 by z1r3;
    sub r4 sht1 by sht1r3;
    sub r4 s1th1 by s1th1r3;
    sub r4 s1 by s1r3;
    sub r4 h1 by h1r3;
    sub r4 rhrh by rhrhr3;
} pres_reph;

lookup blws_la_signs {
    sub k1xx l3 by k1l3;
    sub k1 l4 by k1l3;
    sub k3xx l3 by k3l3;
    sub k3 l4 by k3l3;
    sub th1xx l3 by th1l3;
    sub th1 l4 by th1l3;
    sub p1xx l3 by p1l3;
    sub p1 l4 by p1l3;
    sub p2xx l3 by p2l3;
    sub p2 l4 by p2l3;
    sub p3xx l3 by p3l3;
    sub p3 l4 by p3l3;
    sub m1xx l3 by m1l3;
    sub m1 l4 by m1l3;
    sub l3 l4 by l3l3;
    sub v1xx l3 by v1l3;
    sub v1 l4 by v1l3;
    sub z1xx l3 by z1l3;
    sub z1 l4 by z1l3;
    sub s1xx l3 by s1l3;
    sub s1 l4 by s1l3;
    sub h1xx l3 by h1l3;
    sub h1 l4 by h1l3;
} blws_la_signs;

lookup psts_vowel_signs_common {
  lookupflag IgnoreMarks;
    sub y2 u1 by y2u1;
    sub y2 u2 by y2u2;
    sub k1 u1 by k1u1;
    sub k1 u2 by k1u2;
    sub k1 r1 by k1r1;
    sub k1k1 u1 by k1k1u1;
    sub k1k1 u2 by k1k1u2;
    sub k1k1 r1 by k1k1r1;
    sub k1k1r3 u1 by k1k1r3u1;
    sub k1k1r3 u2 by k1k1r3u2;
    sub k1nh u1 by k1nhu1;
    sub k1nh u2 by k1nhu2;
    sub k1th1 u1 by k1th1u1;
    sub k1th1 u2 by k1th1u2;
    sub k1th1 r1 by k1th1r1;
    sub k1r3 u1 by k1r3u1;
    sub k1r3 u2 by k1r3u2;
    sub k1l3 u1 by k1l3u1;
    sub k1l3 u2 by k1l3u2;
    sub k1sh u1 by k1shu1;
    sub k1sh u2 by k1shu2;
    sub k2 u1 by k2u1;
    sub k2 u2 by k2u2;
    sub k2 r1 by k2r1;
    sub k3 u1 by k3u1;
    sub k3 u2 by k3u2;
    sub k3 r1 by k3r1;
    sub k3k3 u1 by k3k3u1;
    sub k3k3 u2 by k3k3u2;
    sub k3k3 r1 by k3k3r1;
    sub k3th3 u1 by k3th3u1;
    sub k3th3 u2 by k3th3u2;
    sub k3th3 r1 by k3th3r1;
    sub k3th3th4 u1 by k3th3th4u1;
    sub k3th3th4 u2 by k3th3th4u2;
    sub k3n1 u1 by k3n1u1;
    sub k3n1 u2 by k3n1u2;
    sub k3m1 u1 by k3m1u1;
    sub k3m1 u2 by k3m1u2;
    sub k3r3 u1 by k3r3u1;
    sub k3r3 u2 by k3r3u2;
    sub k3l3 u1 by k3l3u1;
    sub k3l3 u2 by k3l3u2;
    sub k4 u1 by k4u1;
    sub k4 u2 by k4u2;
    sub k4 r1 by k4r1;
    sub k4r3 u1 by k4r3u1;
    sub k4r3 u2 by k4r3u2;
    sub ng u1 by ngu1;
    sub ng u2 by ngu2;
    sub ngk1 u1 by ngk1u1;
    sub ngk1 u2 by ngk1u2;
    sub ngk1 r1 by ngk1r1;
    sub ngng u1 by ngngu1;
    sub ngng u2 by ngngu2;
    sub ch1 u1 by ch1u1;
    sub ch1 u2 by ch1u2;
    sub ch1ch1 u1 by ch1ch1u1;
    sub ch1ch1 u2 by ch1ch1u2;
    sub ch2 u1 by ch2u1;
    sub ch2 u2 by ch2u2;
    sub ch2 r1 by ch2r1;
    sub ch3 u1 by ch3u1;
    sub ch3 u2 by ch3u2;
    sub ch3 r1 by ch3r1;
    sub ch3ch3 u1 by ch3ch3u1;
    sub ch3ch3 u2 by ch3ch3u2;
    sub ch3ch3 r1 by ch3ch3r1;
    sub ch3r3 u1 by ch3r3u1;
    sub ch3r3 u2 by ch3r3u2;
    sub ch4 u1 by ch4u1;
    sub ch4 u2 by ch4u2;
    sub nj u1 by nju1;
    sub nj u2 by nju2;
    sub njch1 u1 by njch1u1;
    sub njch1 u2 by njch1u2;
    sub njch1 r1 by njch1r1;
    sub njch3 u1 by njch3u1;
    sub njch3 u2 by njch3u2;
    sub njnj u1 by njnju1;
    sub njnj u2 by njnju2;
    sub t1 u1 by t1u1;
    sub t1 u2 by t1u2;
    sub t1 r1 by t1r1;
    sub t1t1 u1 by t1t1u1;
    sub t1t1 u2 by t1t1u2;
    sub t1r3 u1 by t1r3u1;
    sub t1r3 u2 by t1r3u2;
    sub t2 u1 by t2u1;
    sub t2 u2 by t2u2;
    sub t3 u1 by t3u1;
    sub t3 u2 by t3u2;
    sub t3 r1 by t3r1;
    sub t3t3 u1 by t3t3u1;
    sub t3t3 u2 by t3t3u2;
    sub t3t4 u1 by t3t4u1;
    sub t3t4 u2 by t3t4u2;
    sub t3r3 u1 by t3r3u1;
    sub t3r3 u2 by t3r3u2;
    sub t4 u1 by t4u1;
    sub t4 u2 by t4u2;
    sub t4 r1 by t4r1;
    sub nh u1 by nhu1;
    sub nh u2 by nhu2;
    sub nht1 u1 by nht1u1;
    sub nht1 u2 by nht1u2;
    sub nht3 u1 by nht3u1;
    sub nht3 u2 by nht3u2;
    sub nhnh u1 by nhnhu1;
    sub nhnh u2 by nhnhu2;
    sub nhm1 u1 by nhm1u1;
    sub nhm1 u2 by nhm1u2;
    sub th1 u1 by th1u1;
    sub th1 u2 by th1u2;
    sub th1 r1 by th1r1;
    sub th1th1 u1 by th1th1u1;
    sub th1th1 u2 by th1th1u2;
    sub th1th1 r1 by th1th1r1;
    sub th1th1r3 u1 by th1th1r3u1;
    sub th1th1r3 u2 by th1th1r3u2;
    sub th1th2 u1 by th1th2u1;
    sub th1th2 u2 by th1th2u2;
    sub th1th2 r1 by th1th2r1;
    sub th1p4 u1 by th1p4u1;
    sub th1p4 u2 by th1p4u2;
    sub th1m1 u1 by th1m1u1;
    sub th1m1 u2 by th1m1u2;
    sub th1m1 r1 by th1m1r1;
    sub th1r3 u1 by th1r3u1;
    sub th1r3 u2 by th1r3u2;
    sub th1l3 u1 by th1l3u1;
    sub th1l3 u2 by th1l3u2;
    sub th1s1 u1 by th1s1u1;
    sub th1s1 u2 by th1s1u2;
    sub th1s1 r1 by th1s1r1;
    sub th2 u1 by th2u1;
    sub th2 u2 by th2u2;
    sub th2 r1 by th2r1;
    sub th3 u1 by th3u1;
    sub th3 u2 by th3u2;
    sub th3 r1 by th3r1;
    sub th3th3 u1 by th3th3u1;
    sub th3th3 u2 by th3th3u2;
    sub th3th4 u1 by th3th4u1;
    sub th3th4 u2 by th3th4u2;
    sub th3r3 u1 by th3r3u1;
    sub th3r3 u2 by th3r3u2;
    sub th4 u1 by th4u1;
    sub th4 u2 by th4u2;
    sub th4 r1 by th4r1;
    sub th4r3 u1 by th4r3u1;
    sub th4r3 u2 by th4r3u2;
    sub n1 u1 by n1u1;
    sub n1 u2 by n1u2;
    sub n1 r1 by n1r1;
    sub n1th1 u1 by n1th1u1;
    sub n1th1 u2 by n1th1u2;
    sub n1th1 r1 by n1th1r1;
    sub n1th1r3 u1 by n1th1r3u1;
    sub n1th1r3 u2 by n1th1r3u2;
    sub n1th2 u1 by n1th2u1;
    sub n1th2 u2 by n1th2u2;
    sub n1th2 r1 by n1th2r1;
    sub n1th3 u1 by n1th3u1;
    sub n1th3 u2 by n1th3u2;
    sub n1th3 r1 by n1th3r1;
    sub n1th3r3 u1 by n1th3r3u1;
    sub n1th3r3 u2 by n1th3r3u2;
    sub n1th4 u1 by n1th4u1;
    sub n1th4 u2 by n1th4u2;
    sub n1th4r3 u1 by n1th4r3u1;
    sub n1th4r3 u2 by n1th4r3u2;
    sub n1n1 u1 by n1n1u1;
    sub n1n1 u2 by n1n1u2;
    sub n1n1 r1 by n1n1r1;
    sub n1n1r3 u1 by n1n1r3u1;
    sub n1n1r3 u2 by n1n1r3u2;
    sub n1m1 u1 by n1m1u1;
    sub n1m1 u2 by n1m1u2;
    sub n1m1 r1 by n1m1r1;
    sub n1rh u1 by n1rhu1;
    sub n1rh u2 by n1rhu2;
    sub n1cilxxrh u1 by n1cilxxrhu1;
    sub n1cilxxrh u2 by n1cilxxrhu2;
    sub nht1r3 u1 by nht1r3u1;
    sub nht1r3 u2 by nht1r3u2;
    sub p1 u1 by p1u1;
    sub p1 u2 by p1u2;
    sub p1 r1 by p1r1;
    sub p1n1 u1 by p1n1u1;
    sub p1n1 u2 by p1n1u2;
    sub p1p1 u1 by p1p1u1;
    sub p1p1 u2 by p1p1u2;
    sub p1p1 r1 by p1p1r1;
    sub p1r3 u1 by p1r3u1;
    sub p1r3 u2 by p1r3u2;
    sub p1l3 u1 by p1l3u1;
    sub p1l3 u2 by p1l3u2;
    sub p2 u1 by p2u1;
    sub p2 u2 by p2u2;
    sub p2r3 u1 by p2r3u1;
    sub p2r3 u2 by p2r3u2;
    sub p2l3 u1 by p2l3u1;
    sub p2l3 u2 by p2l3u2;
    sub p3 u1 by p3u1;
    sub p3 u2 by p3u2;
    sub p3 r1 by p3r1;
    sub p3p3 u1 by p3p3u1;
    sub p3p3 u2 by p3p3u2;
    sub p3r3 u1 by p3r3u1;
    sub p3r3 u2 by p3r3u2;
    sub p3l3 u1 by p3l3u1;
    sub p3l3 u2 by p3l3u2;
    sub p4 u1 by p4u1;
    sub p4 u2 by p4u2;
    sub p4 r1 by p4r1;
    sub p4r3 u1 by p4r3u1;
    sub p4r3 u2 by p4r3u2;
    sub m1 u1 by m1u1;
    sub m1 u2 by m1u2;
    sub m1 r1 by m1r1;
    sub m1p1 u1 by m1p1u1;
    sub m1p1 u2 by m1p1u2;
    sub m1p1 r1 by m1p1r1;
    sub m1p1r3 u1 by m1p1r3u1;
    sub m1p1r3 u2 by m1p1r3u2;
    sub m1m1 u1 by m1m1u1;
    sub m1m1 u2 by m1m1u2;
    sub m1r3 u1 by m1r3u1;
    sub m1r3 u2 by m1r3u2;
    sub y1 u1 by y1u1;
    sub y1 u2 by y1u2;
    sub y1 y2 by y1y1;
    sub y1y1 u1 by y1y1u1;
    sub y1 y2 u1 by y1y1u1;
    sub y1y1 u2 by y1y1u2;
    sub y1 y2 u2 by y1y1u2;
    sub r3 u1 by r3u1;
    sub r3 u2 by r3u2;
    sub l3 u1 by l3u1;
    sub l3 u2 by l3u2;
    sub l3xx p1 by l3p1;
    sub l3p1 u1 by l3p1u1;
    sub l3p1 u2 by l3p1u2;
    sub l3l3 u1 by l3l3u1;
    sub l3 l4 u1 by l3l3u1;
    sub l3l3 u2 by l3l3u2;
    sub l3 l4 u2 by l3l3u2;
    sub v1 u1 by v1u1;
    sub v1 u2 by v1u2;
    sub v1 r1 by v1r1;
    sub v1r3 u1 by v1r3u1;
    sub v1r3 u2 by v1r3u2;
    sub v1l3 u1 by v1l3u1;
    sub v1l3 u2 by v1l3u2;
    sub v1 v2 by v1v1;
    sub v1v1 u1 by v1v1u1;
    sub v1 v2 u1 by v1v1u1;
    sub v1v1 u2 by v1v1u2;
    sub v1 v2 u2 by v1v1u2;
    sub z1 u1 by z1u1;
    sub z1 u2 by z1u2;
    sub z1 r1 by z1r1;
    sub z1ch1 u1 by z1ch1u1;
    sub z1ch1 u2 by z1ch1u2;
    sub z1n1 u1 by z1n1u1;
    sub z1n1 u2 by z1n1u2;
    sub z1r3 u1 by z1r3u1;
    sub z1r3 u2 by z1r3u2;
    sub z1l3 u1 by z1l3u1;
    sub z1l3 u2 by z1l3u2;
    sub z1z1 u1 by z1z1u1;
    sub z1z1 u2 by z1z1u2;
    sub sh u1 by shu1;
    sub sh u2 by shu2;
    sub sh r1 by shr1;
    sub sht1 u1 by sht1u1;
    sub sht1 u2 by sht1u2;
    sub sht2 u1 by sht2u1;
    sub sht2 u2 by sht2u2;
    sub shnh u1 by shnhu1;
    sub shnh u2 by shnhu2;
    sub s1 u1 by s1u1;
    sub s1 u2 by s1u2;
    sub s1 r1 by s1r1;
    sub s1th2 u1 by s1th2u1;
    sub s1th2 u2 by s1th2u2;
    sub s1th2 r1 by s1th2r1;
    sub s1r3 u1 by s1r3u1;
    sub s1r3 u2 by s1r3u2;
    sub s1l3 u1 by s1l3u1;
    sub s1l3 u2 by s1l3u2;
    sub s1s1 u1 by s1s1u1;
    sub s1s1 u2 by s1s1u2;
    sub s1rhrh u1 by s1rhrhu1;
    sub s1rhrh u2 by s1rhrhu2;
    sub h1 u1 by h1u1;
    sub h1 u2 by h1u2;
    sub h1 r1 by h1r1;
    sub h1n1 u1 by h1n1u1;
    sub h1n1 u2 by h1n1u2;
    sub h1m1 u1 by h1m1u1;
    sub h1m1 u2 by h1m1u2;
    sub h1m1 r1 by h1m1r1;
    sub h1r3 u1 by h1r3u1;
    sub h1r3 u2 by h1r3u2;
    sub lh u1 by lhu1;
    sub lh u2 by lhu2;
    sub lhlh u1 by lhlhu1;
    sub lhlh u2 by lhlhu2;
    sub zh u1 by zhu1;
    sub zh u2 by zhu2;
    sub rh u1 by rhu1;
    sub rh u2 by rhu2;
    sub rhrh u1 by rhrhu1;
    sub rhrh u2 by rhrhu2;
} psts_vowel_signs_common;


lookup remove_dotted_circle {
    sub uni25CC a2 anuswara by aam;
} remove_dotted_circle;
