next up previous
Next: Lexical entries. Up: Formalism Previous: Formalism

Grammar rules.

A grammar rule is defined by a ternary predicate, rule/3. The first argument of this predicate is a ground Prolog term indicating the rule identifier. The second argument of the rule is the mother category. Categories are non-variable Prolog terms. The third argument of the rule is a list of categories. Note that we require that the length of the list is given, and that none of the categories appearing in the list is a variable. An example of a grammar rule is provided:
\begin{displaymath}
\small\begin{minipage}[t]{.9\textwidth}
\begin{verbatim}ru...
...,Agr,trans,l(Arg,Sem)),np(_,Arg)]).\end{verbatim}\end{minipage}\end{displaymath} (1)

Terminal symbols cannot be introduced in rules directly, but are introduced by means of lexical entries.




2000-07-10