;;; -*- Mode: TDL; Coding: utf-8 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Grammar of Miyako
;;; created at:
;;;     Thu May 02 07:10:25 UTC 2013
;;; based on Matrix customization system version of:
;;;     Fri Apr 26 22:55:12 UTC 2013
;;;
;;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Type assigning empty mod list. Added to basic types for nouns, verbs and determiners.

non-mod-lex-item := lex-item &
  [ SYNSEM.LOCAL.CAT.HEAD.MOD < > ].

;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Matrix Type Addenda
;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;; Added by Adam for imbedded -ru questions

basic-zero-arg :+ [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].
basic-one-arg :+ [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].
basic-two-arg :+ [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].
basic-three-arg :+ [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].
;intersective-mod-arg :+ [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].

decl-head-opt-subj-phrase :+ same-ynq-unary-phrase.
						
basic-head-opt-comp-phrase :+ same-ynq-unary-phrase &
 [ SYNSEM.L-PERIPH #periph,
   ARGS < [ SYNSEM.L-PERIPH #periph ] > ] .

non-local :+ [ YNQ 0-1-dlist ].

binary-headed-phrase :+ mc-na-headed-phrase.

basic-binary-phrase :+
 [ SYNSEM.NON-LOCAL.YNQ [ LIST #list,
   			  LAST #last ],
   ARGS < [ SYNSEM.NON-LOCAL.YNQ [ LIST #list,
   	    			   LAST #middle ] ],
	  [ SYNSEM.NON-LOCAL.YNQ [ LIST #middle,
	    			   LAST #last ] ] > ].

;;;;;

head :+ [ PRONOUN bool,
    VCLASS bool,
    ANIMATE bool,
    AUX bool,
    FORM form ].

+npc :+ [ CASE case ].

+nvcdmo :+ [ MOD < > ].
 
inflected :+ [ TENSE-FLAG luk ].

infl-satisfied :+ [ TENSE-FLAG na-or-+ ].

png :+ [ PERNUM pernum ].

basic-head-comp-phrase :+ [ SYNSEM.LOCAL.CAT.MC #mc,
    HEAD-DTR.SYNSEM.LOCAL.CAT.MC #mc ].

basic-head-mod-phrase-simple :+ [ SYNSEM.LOCAL.CAT.MC #mc,
    NON-HEAD-DTR.SYNSEM.LOCAL.CAT.MC #mc ].

;;;;;;;;;;;;;;
;;; Features
;;;;;;;;;;;;;;

;;; Case

case := *top*.
nom := case.  ; nom
acc := case.  ; acc
dat := case.  ; dat
gen := case.  ; gen
asc := case.  ; asc
ins := case.  ; ins
no-case := case. ; focus marker
;;; Pernum

pernum := *top*.
sg := pernum.
pl := pernum.
1st := pernum.
2nd := pernum.
3rd := pernum.
1sg := 1st & sg.
2sg := 2nd & sg.
3sg := 3rd & sg.
1pl := 1st & pl.
1pl_incl := 1pl.
1pl_excl := 1pl.
2pl := 2nd & pl.
3pl := 3rd & pl.

;;; Form

form := *top*.
nonfinite := form.
finite := form.

;;; Tense

nonpast := tense.
past := tense.

;;; Aspect

progressive := aspect.
resultative := aspect.
prospective := aspect.
perfect := aspect.

;;; Mood

optative := mood.
intentional := mood.
negative_intentional := mood.
imperative := mood.
prohibitive := mood.
realis := mood.

;;;;;;;;;;;;;;;;;;;
;;; Lexical Types
;;;;;;;;;;;;;;;;;;;
;;; Phrase

same-ynq-unary-phrase := unary-phrase &
 [ SYNSEM.NON-LOCAL.YNQ #ynq,
   ARGS < [ SYNSEM.NON-LOCAL.YNQ #ynq ] > ].
;;; Nouns

noun-lex := basic-noun-lex & basic-one-arg & no-hcons-lex-item & non-mod-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL [ SPR < #spr &
                                 [ LOCAL.CAT.HEAD det ] >,
                           COMPS < >,
                           SUBJ < >,
                           SPEC < > ],
    ARG-ST < #spr > ].

no-spr-noun-lex := noun-lex &
  [ SYNSEM.LOCAL.CAT.VAL.SPR < [ OPT + ] > ].

; Nouns which cannot take specifiers mark their SPR requirement
; as OPT +.  Making the non-head daughter OPT - in this rule
; keeps such nouns out.
; 
; Rules for building NPs.  Note that the Matrix uses SPR for
; the specifier of nouns and SUBJ for the subject (specifier) of verbs.

head-spec-phrase := basic-head-spec-phrase & head-final &
  [ NON-HEAD-DTR.SYNSEM.OPT - ].

commonnoun-noun-lex := noun-lex.

1SG-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 1sg,
                   CAT.HEAD.PRONOUN + ] ].

pronoun-noun-lex := no-spr-noun-lex &
  [ SYNSEM.LOCAL [ CAT.HEAD.ANIMATE +,
		 CONT.HOOK.INDEX [ COG-ST activ-or-more,
				   SPECI + ] ] ]. 	 
1PL-excl-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 1pl_excl,
                   CAT.HEAD.PRONOUN + ] ].

1PL-incl-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 1pl_incl,
                   CAT.HEAD.PRONOUN - ] ].

2SG-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 2sg,
                   CAT.HEAD.PRONOUN + ] ].

2PL-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 2pl,
                   CAT.HEAD.PRONOUN + ] ].

3SG-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 3sg,
                   CAT.HEAD.PRONOUN + ] ].

3PL-noun-lex := pronoun-noun-lex &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.PNG.PERNUM 3pl,
                   CAT.HEAD.PRONOUN + ] ].

inanimate_cnoun-noun-lex := commonnoun-noun-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.ANIMATE - ].

animate_cnoun-noun-lex := commonnoun-noun-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.ANIMATE + ].

;;; Verbs

verb-lex := non-mod-lex-item &
  [ SYNSEM.LOCAL.CAT.HEAD verb,
    INFLECTED.TENSE-FLAG na-or-- ].

main-verb-lex := verb-lex & basic-verb-lex &
  [ SYNSEM.LOCAL [ CAT [ HEAD.AUX -,
                         VAL [ SPR < >,
                               SPEC < >,
                               SUBJ < #subj > ] ],
                   CONT.HOOK.XARG #xarg ],
    ARG-ST.FIRST #subj &
                 [ LOCAL [ CAT.VAL [ SPR < >,
                                     COMPS < > ],
                           CONT.HOOK.INDEX #xarg ] ] ].

aux-lex := verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.AUX + ].

intransitive-verb-lex := main-verb-lex & intransitive-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < >,
    ARG-ST.FIRST.LOCAL.CAT.HEAD adp ].

transitive-verb-lex := main-verb-lex & transitive-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >,
    ARG-ST < [ LOCAL.CAT.HEAD adp ],
             #comps &
             [ LOCAL.CAT [ VAL [ SPR < >,
                                 COMPS < > ],
                           HEAD adp ] ] > ].

;Lab6 sanaes 2013/05/10 - copula
transitive-copula-ext-verb-lex := main-verb-lex & transitive-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS < #comps >,
    ARG-ST < [ LOCAL.CAT.HEAD adp ],
             #comps &
             [ LOCAL.CAT [ VAL [ SPR < >,
                                 COMPS < > ],
                           HEAD +njrp ] ] > ].

nom-intransitive-verb-lex := intransitive-verb-lex &
  [ ARG-ST.FIRST.LOCAL.CAT.HEAD adp &
                                [ CASE nom ] ].

nom-acc-transitive-verb-lex := transitive-verb-lex &
  [ ARG-ST < [ LOCAL.CAT.HEAD adp &
                              [ CASE nom ] ],
             [ LOCAL.CAT.HEAD adp &
                              [ CASE acc ] ] > ].

intrans-verb-lex := nom-intransitive-verb-lex & ASPECT-or-converb-rule-dtr & MOOD-rule-dtr & TENSE-rule-dtr & negation-rule-dtr &
  [ INFLECTED.TENSE-FLAG - ].

trans-verb-lex := nom-acc-transitive-verb-lex & ASPECT-or-converb-rule-dtr & MOOD-rule-dtr & TENSE-rule-dtr & negation-rule-dtr &
  [ INFLECTED.TENSE-FLAG -,
	SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.OPT-CS type-id ].

;Lab6 sanaes 2013/05/10 - copula
trans-copula-verb-lex := transitive-copula-ext-verb-lex & ASPECT-or-converb-rule-dtr & MOOD-rule-dtr & TENSE-rule-dtr & negation-rule-dtr &
  [ INFLECTED.TENSE-FLAG -,
	SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.OPT-CS type-id ].


intrans_class1-verb-lex := intrans-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS + ].

intrans_class2-verb-lex := intrans-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS - ].

trans_class1-verb-lex := trans-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS + ].

trans_class2-verb-lex := trans-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS - ].

animate_ext-verb-lex := ext-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.SUBJ.FIRST.LOCAL.CAT.HEAD.ANIMATE + ].

inanimate_ext-verb-lex := ext-verb-lex &
  [ SYNSEM.LOCAL.CAT.VAL.SUBJ.FIRST.LOCAL.CAT.HEAD.ANIMATE - ].

;Lab6 sanaes 2013/05/10 - copula
;copula-verb-lex := transitive-verb-lex &
;  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS - ].

copula-verb-lex := trans-copula-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS - ].

;Added by Sanae Lab6
ext-verb-lex := transitive-copula-ext-verb-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.VCLASS - ].

;;; Auxiliaries

subj-raise-aux := aux-lex & trans-first-arg-raising-lex-item &
  [ SYNSEM.LOCAL [ CAT.VAL [ SPR < >,
                             SPEC < >,
                             COMPS < #comps >,
                             SUBJ < #subj > ],
                   CONT.HOOK.XARG #xarg ],
    ARG-ST < #subj &
             [ LOCAL [ CAT [ HEAD noun,
                             VAL [ SUBJ < >,
                                   SPR < >,
                                   SPEC < >,
                                   COMPS < > ] ],
                       CONT.HOOK.INDEX #xarg ] ],
             #comps &
             [ LOCAL.CAT [ VAL [ SUBJ < [ ] >,
                                 COMPS < >,
                                 SPR < >,
                                 SPEC < > ],
                           HEAD verb &
                                [ AUX - ] ] ] > ].

subj-raise-aux-no-pred := subj-raise-aux & raise-sem-lex-item.

aspect-aux-lex := subj-raise-aux-no-pred &
  [ SYNSEM.LOCAL.CAT.VAL.COMPS.FIRST.LOCAL.CAT.HEAD.FORM finite ].

;;; Others

;;; Case-marking adpositions
;;; Case marking adpositions are constrained not to
;;; be modifiers.

case-marking-adp-lex := basic-one-arg & raise-sem-lex-item &
  [ SYNSEM.LOCAL.CAT [ HEAD adp &
                            [ CASE #case,
                              MOD < > ],
                       VAL [ SPR < >,
                             SUBJ < >,
                             COMPS < #comps >,
                             SPEC < > ] ],
    ARG-ST < #comps &
             [ LOCAL.CAT [ HEAD noun &
                                [ CASE #case ],
                           VAL.SPR < > ] ] > ].

;Lab6 sanaes 2013/05/10 : new case marker looking for noun & comp 
case-marking-lex := basic-one-arg & raise-sem-lex-item &
  [ SYNSEM.LOCAL.CAT [ HEAD adp &
                            [ CASE #case,
                              MOD < > ],
                       VAL [ SPR < >,
                             SUBJ < >,
                             COMPS < #comps >,
                             SPEC < > ] ],
    ARG-ST < #comps &
             [ LOCAL.CAT [ HEAD +nc &
                                [ CASE #case ],
                           VAL.SPR < > ] ] > ].

;;; Added by Adam Ledyard 5/9 double-particle focus marking
focus-marking-adp-lex := basic-one-arg & no-hcons-lex-item & no-icons-lex-item &
  [ SYNSEM.LOCAL [ CONT.RELS <! !>,
		   CAT [ POSTHEAD +,
   			 MKG fc,
		         HEAD adp &
			    [ MOD < [ LOCAL [ CONT.HOOK.ICONS-KEY focus,
 					      CAT [ HEAD +vrp,
						    VAL.COMPS < > ]]] > ],
		       VAL [ SPR < >,
			     SUBJ < >,
			     COMPS < >,
			     SPEC < > ] ] ] ].

;;; Added by Adam Ledyard 5/9 double-particle topic marking on ACC
acc-topic-marking-adp-lex := basic-one-arg & no-hcons-lex-item & no-icons-lex-item &
  [ SYNSEM.LOCAL [ CONT.RELS <! !>,
		   CAT [ POSTHEAD +,
   			 MKG tp,
		         HEAD adp &
			    [ MOD < [ LOCAL [ CONT.HOOK.ICONS-KEY topic,
 					      CAT [ HEAD.CASE acc,
						    VAL.COMPS < > ]]] > ],
		       VAL [ SPR < >,
			     SUBJ < >,
			     COMPS < >,
			     SPEC < > ] ] ] ].

adj-clitic-lex := basic-one-arg & raise-sem-lex-item  &
  [ SYNSEM.LOCAL.CAT [  POSTHEAD -,
                        HEAD adp &
                        [ MOD <[ LOCAL intersective-mod &
                               [ CONT.HOOK.INDEX #xarg,
                                 CAT [ HEAD noun, 
                                     VAL.SPR cons ]]] >],
                        VAL [ SPR < >,
                              SUBJ < >,
                              COMPS < #comps >,
                              SPEC < > ] ],
    ARG-ST < #comps &
             [ LOCAL [ CAT [ HEAD adj ],
                       CONT.HOOK.XARG #xarg]] > ].

;;;; Added by Adam for embedded question clitics

non-ynq-word := lex-item &
 [ SYNSEM.NON-LOCAL.YNQ 0-dlist ].

question-clitic-lex := no-hcons-lex-item &
 [ SYNSEM [ LOCAL [ CAT [ POSTHEAD +, 
			  VAL [ SPR < >,
   	    	    	      	COMPS < >,
				SUBJ < >,
				SPEC < > ],
			  HEAD adp &
			    [ MOD < [ LIGHT +,
			      	      L-PERIPH + ] > ] ] ,
		    CONT.RELS <! !> ],
	    NON-LOCAL.YNQ <! *top* !> ] ].

mvi-clause := head-only &
 [ SYNSEM.LOCAL [ COORD -,
   		  CAT [ HEAD +vc,
		      	VAL [ SUBJ < >,
			      COMPS < > ] ] ] ].
  
int-cl := mvi-clause & interrogative-clause &
 [ SYNSEM [ LOCAL.CAT [ VAL #val,
   	    	      	MC bool ],
	    NON-LOCAL.YNQ <! !> ],
   HEAD-DTR.SYNSEM [ LOCAL.CAT [ MC na,
   		     	       	 VAL #val ],
		     NON-LOCAL.YNQ <! *top* !> ] ].

decl-cl := mvi-clause & declarative-clause & same-ynq-unary-phrase &
 [ SYNSEM [ LOCAL.CAT [ VAL #val,
   	    	      	MC bool ],
	    NON-LOCAL.YNQ <! !> ],
   HEAD-DTR.SYNSEM [ LOCAL.CAT [ MC na,
   		     	       	 VAL #val ],
		     NON-LOCAL.YNQ 0-dlist ] ].

mc-na-headed-phrase := headed-phrase &
 [ SYNSEM.LOCAL.CAT.MC na,
   HEAD-DTR.SYNSEM.LOCAL.CAT.MC na ].

;;;;;

;;; Complementizer
;;; Bare NP rule
;;;Added by Adam
np-bar-predicate-rule := unary-phrase &
 [ SYNSEM.LOCAL.CAT [ HEAD verb & [ MOD < >],
		      VAL [ SPR < >,
		      	    SPEC < >,
			    COMPS < >,
			    SUBJ < [ LOCAL [ CONT.HOOK.INDEX #arg1,
					     CAT [ HEAD adp,
					     	   VAL.SPR < > ] ] ] > ] ],
   C-CONT [ HOOK [ LTOP #ltop,
		   INDEX #index & [ E.TENSE nonpast ],
		   XARG #arg1 ],
	    RELS <! arg12-ev-relation &
		  [ PRED "_be_v_id_rel",
 		    LBL #ltop,
		    ARG0 #index,
		    ARG1 #arg1,
		    ARG2 #arg2 ] !>,
	    HCONS <! qeq & [ LARG #larg ] !> ],
  ARGS < [ SYNSEM.LOCAL [ CAT [ HEAD noun,
				VAL.SPR < > ],
			  CONT.HOOK [ INDEX #arg2,
				      LTOP #larg ]]] > ].

;;; Adjectives
;;; Adjectives lexical rule is handled by clitics. see adj-clitic-lex
;;; sanaes added for Lab5
adjective-lex := basic-adjective-lex & basic-one-arg & norm-ltop-lex-item &  
   [ SYNSEM.LOCAL.CAT [ HEAD.MOD < >,
                        VAL [ SPR < >,
                              SUBJ < >,
                              COMPS < >,
                              SPEC < > ]]].
   


;;; Adverbs
adverb-lex := basic-adverb-lex & basic-one-arg & intersective-mod-lex &
   [ SYNSEM [ LOCAL [ CAT [ HEAD.MOD <  [ LOCAL.CAT.HEAD verb] >,
                            VAL [ SPR < >,
                                  SUBJ < >,
                                  COMPS < >,
                                  SPEC < > ]]]]].

;;; Demonstratives


demonstrative_a_rel := predsort.
proximal+dem_a_rel := demonstrative_a_rel. ; close to speaker
distal+dem_a_rel := demonstrative_a_rel.   ; away from speaker
remote+dem_a_rel := distal+dem_a_rel.      ; away from speaker and hearer
hearer+dem_a_rel := distal+dem_a_rel.      ; near hearer

determiner-lex-supertype := norm-hook-lex-item & basic-zero-arg &
  [ SYNSEM [ LOCAL [ CAT [ HEAD det,
			   VAL [ SPEC.FIRST.LOCAL.CONT.HOOK [ INDEX #ind & [ COG-ST activ+fam ],
				  			     LTOP #larg ],
                                SPR < >,
                                SUBJ < >,
                                COMPS < >]],
		     CONT [ HCONS < ! qeq &
				 [ HARG #harg,
				   LARG #larg ] ! > ,
		          RELS < ! [ PRED "exist_q_rel" ], 
		     	       	   #altkey & 
				   arg1-ev-relation &
				   [ LBL #larg,
				    ARG1 #ind ] ! > ]],  
	     LKEYS [ KEYREL quant-relation &
		     [ ARG0 #ind,
		       RSTR #harg ], 
		     ALTKEYREL #altkey ] ] ].
;;; Determiners
;;; SPEC is non-empty, and already specified by basic-determiner-lex.

determiner-lex := basic-determiner-lex & basic-zero-arg & non-mod-lex-item &
  [ SYNSEM.LOCAL.CAT.VAL [ SPR < >,
                           COMPS < >,
                           SUBJ < > ] ].

demonstrative_determiners-determiner-lex := determiner-lex-supertype.

; We treat question particles as complementizers.
; Here is the lexical type for complementizers.

complementizer-lex-item := raise-sem-lex-item & basic-one-arg &
  [ SYNSEM.LOCAL.CAT [ HEAD comp &
                            [ MOD < > ],
                       VAL [ SPR < >,
                             SUBJ < >,
                             COMPS < #comp > ] ],
    ARG-ST < #comp &
             [ LOCAL.CAT [ MC +,
                           HEAD verb,
                           VAL [ SUBJ < >,
                                 COMPS < > ] ] ] > ].

; Subtype for question particles. Constrains SF to ques.

qpart-lex-item := complementizer-lex-item &
  [ SYNSEM.LOCAL [ CONT.HOOK.INDEX.SF ques,
                   CAT.VAL.COMPS.FIRST.LOCAL.CAT.HEAD.FORM finite ] ].

;;; Sanae added lab6
interrogative-comp-lex-item := complementizer-lex-item &
   [ SYNSEM.LOCAL.CONT.HOOK.INDEX.SF ques ].
 
declarative-comp-lex-item := complementizer-lex-item &
   [ SYNSEM.LOCAL.CONT.HOOK.INDEX.SF prop ].
;;;;;;;;;;;;;;;;;;;
;;; Lexical Rules
;;;;;;;;;;;;;;;;;;;

;;; Intermediate rule types

negation-rule-dtr := word-or-lexrule.
MOOD-rule-dtr := word-or-lexrule.
ASPECT-or-converb-rule-dtr := word-or-lexrule.
TENSE-rule-dtr := word-or-lexrule.

;;; Lexical rule types

negation-lex-rule-super := MOOD-rule-dtr & TENSE-rule-dtr & cont-change-only-lex-rule & infl-lex-rule &
  [ INFLECTED #infl,
    DTR negation-rule-dtr &
        [ INFLECTED #infl ] ].

; This adds negative semantics to the verb's
; RELS list.

negative-lex-rule := negation-lex-rule-super &
  [ C-CONT [ HOOK [ XARG #xarg,
                    LTOP #ltop,
                    INDEX #ind ],
             RELS <! event-relation &
                     [ PRED "neg_rel",
                       LBL #ltop,
                       ARG1 #harg ] !>,
             HCONS <! qeq &
                      [ HARG #harg,
                        LARG #larg ] !> ],
    SYNSEM.LKEYS #lkeys,
    DTR.SYNSEM [ LKEYS #lkeys,
                 LOCAL [ CONT.HOOK [ XARG #xarg,
                                     INDEX #ind,
                                     LTOP #larg ],
                         CAT.HEAD verb ] ] ].

MOOD-lex-rule-super := add-only-no-ccont-rule & infl-lex-rule &
  [ INFLECTED #infl,
    DTR MOOD-rule-dtr &
        [ INFLECTED #infl ] ].

realis-lex-rule := MOOD-lex-rule-super &
  [ DTR.INFLECTED.TENSE-FLAG +,
    SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD realis ].

optative-lex-rule := MOOD-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD optative ].

intentional-lex-rule := MOOD-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD intentional ].

neg_intentional-lex-rule := MOOD-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD intentional ].

imperative-lex-rule := MOOD-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD imperative ].

prohibitive-lex-rule := MOOD-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.MOOD prohibitive ].

ASPECT-lex-rule-super := MOOD-rule-dtr & TENSE-rule-dtr & add-only-no-ccont-rule & infl-lex-rule & negation-rule-dtr &
  [ INFLECTED #infl,
    DTR ASPECT-or-converb-rule-dtr &
        [ INFLECTED #infl ] ].

resultative-lex-rule := ASPECT-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.ASPECT resultative ].

prospective-lex-rule := ASPECT-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.ASPECT prospective ].

progressive-lex-rule := ASPECT-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.ASPECT progressive ].

TENSE-lex-rule-super := MOOD-rule-dtr & add-only-no-ccont-rule & infl-lex-rule &
  [ INFLECTED.TENSE-FLAG +,
    DTR TENSE-rule-dtr ].

NPST-lex-rule := TENSE-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.TENSE nonpast ].

PAST-lex-rule := TENSE-lex-rule-super &
  [ SYNSEM.LOCAL.CONT.HOOK.INDEX.E.TENSE past ].

converb-lex-rule-super := add-only-no-ccont-rule & infl-lex-rule &
  [ INFLECTED #infl,
    DTR ASPECT-or-converb-rule-dtr &
        [ INFLECTED #infl ] ].

medial-lex-rule := converb-lex-rule-super.

conditional-lex-rule := converb-lex-rule-super.

;;;;;;;;;;;;;;;;;;;
;;; Phrasal Types
;;;;;;;;;;;;;;;;;;;

;Constraint on MC used to be part of matrix.tdl
;;it applies to all wo implementations, except for v2

comp-head-phrase := basic-head-1st-comp-phrase & head-final.

subj-head-phrase := decl-head-subj-phrase & head-final &
  [ HEAD-DTR.SYNSEM.LOCAL.CAT.VAL.COMPS < > ].

; Bare NP phrase.  Consider modifying the PRED value of the quantifier relation
; introduced to match the semantic effect of bare NPs in your language.

bare-np-phrase := basic-bare-np-phrase & same-ynq-unary-phrase &
  [ C-CONT.RELS <! [ PRED "exist_q_rel" ] !> ].

;;;;;;;;;;;;;;;;;;
;;; Coordination
;;;;;;;;;;;;;;;;;;

;;; Coordination Strategy 1

np1-top-coord-rule := basic-np-top-coord-rule & omni-top-coord-rule &
  [ SYNSEM.LOCAL.COORD-STRAT "1" ].

np1-mid-coord-rule := basic-np-mid-coord-rule & omni-mid-coord-rule &
  [ SYNSEM.LOCAL.COORD-STRAT "1" ].

np1-bottom-coord-rule := omni-conj-last-bottom-coord-rule & np-bottom-coord-phrase &
  [ SYNSEM.LOCAL.COORD-STRAT "1" ].

np1-left-coord-rule := omni-conj-last-left-coord-rule & np-bottom-coord-phrase &
  [ SYNSEM.LOCAL.COORD-STRAT "1" ].
