
%% This file gives a `toy' set of `user' definitions for two 
%% level rules. These are given merely to illustrate the method. 
%% No claim that these rules are sensible or appropriate. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% TWO LEVEL RULES:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Two fundamental rules

boundary := 
   (*) - [] - (*)  =>  (*) - [0] - (*).      % Can delete lexical boundary markers

default  := 
    (*) - [X] - (*)  =>  (*) - [X] - (*)     % Any segment (except boundary markers)
    where post: \+(X = 0).                   % may surface unmodified. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Phonological rules

d_del :=                                                  % Can delete a lexical d, 
    (*) - [] - (*)  => [@(nasal:[cor=y])] - [@d] - (*).   % when precede by lexical 
                                                          % coronal nasal.

d_devoicing :=
    [S] - [@t] - (*) <=> [0] - [@d] - [0]                 % lexical morpheme d must be devoiced
    where pre: (S <@> @(seg:[voi=n,cons=y]))              % to t, if preceded by an unvoiced
          and                                             % other than t. 
          post: \+(S = @t). 

nasal_assim :=
   (*) - [N1] - [@(stop:[back=A,lab=B,cor=n])]  => (*) - [N2] - (*)  % Lexical coronal nasal (N2)
   where pre : (N2 <@> @nasal:[cor=y],                               % may take on place features
                N1 <@> [back=A,lab=B,cor=n] // N2).                  % of following consonant. 

z_devoicing :=                                                     % lexical z must be devoiced, if
   [@seg:[cons=y,son=n,voi=n]] - [@s] - (*)  <=> (*) - [@z] - (*). % preceded by surface unvoiced
                                                                   % nonsonorant consonant. 

schwa_insert:=
    [X] - [@schwa] - [Y] <=> [0] - [] - (*)            % A schwa must be inserted: 
    where pre: ((X <@> @seg:[strd=y], Y <@> @z);       % between surface strident and a z, or
                (X <@> @t:[voi=_],    Y <@> @d)).      % between either {t,d} and d. 

s_affric :=                                            % Lexical s becomes affricated, if
     (*) - [@'S'] - (*)  =>  (*) - [@s] - X            % followed by S or y (that may be on
     where  pre:  ((A <@> @'S' ; A <@> @y),            % other side of morpheme boundary). 
                   (X in [[0,A],[A]])). 
	      
y_drop := 
    [@seg:[strd=y]] - [] - [@u] => (*) - [@y] - (*).   % Lexical y may be deleted, between 
                                                       % surface strident and u. 
    
't/d_affric' :=                                              % Lexical y may become surface 
    [@t:[voi=V]] - [@'S':[voi=V]] - (*) => (*) - [@y] - (*). % coronal fricative having voice 
                                                             % feature of preceding t or d. 

t_loss :=                                                   % lexical t may be deleted if 
    [@seg:[cons=y,cor=y]] - [] - [_] => (*) - [@t] - (*).   % preceded by coronal consonant, 
                                                            % and followed by at least on segment
                                                            % (as required by context [_] ). 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
