;;; Hey, emacs, this file is -*- Mode: tdl; -*- ... got that? ;;; ;;; the type hierachy, introducing sub-types and appropriate features ;;; feat-struc := *top*. expression := feat-struc & [ HEAD pos, VAL valence ]. valence := feat-struc & [ SPR *list*, COMPS *list* ]. pos := feat-struc & [ MOD *list* ]. pos-agr := pos & [ AGR pernum, MOD < > ]. pernum := feat-struc. 3sing := pernum. non-3sing := pernum. noun := pos-agr. verb := pos-agr. det := pos-agr. pre-mod := pos. post-mod := pos. adj := pre-mod & [ MOD < [ HEAD noun ] > ]. adv := post-mod & pre-mod & [ MOD < [ HEAD verb ] > ]. prep := post-mod & [ MOD < expression >, FORM *string* ]. phrase := expression & [ ARGS *list* ]. head-initial := phrase & [ HEAD #head, ARGS [ FIRST [ HEAD #head ] ] ]. head-final := phrase & [ HEAD #head, ARGS < expression, [ HEAD #head ] > ]. word := expression & [ ORTH *string* ]. root := phrase & [ HEAD verb, VAL [ SPR < >, COMPS < > ] ]. root-head-initial := root & head-initial. root-head-final := root & head-final. ;;; ;;; a few `non-linguistic' types: the top type for all strings (i.e. type names ;;; enclosed in double quotes; no need to declare strings individually) and the ;;; hierarchy of list types (using a FIRST -- REST encoding for list elements ;;; and list tails, respectively). ;;; *string* := *top*. *list* := *top*. *ne-list* := *list* & [ FIRST *top*, REST *list* ]. *null* := *list*.