GRAMMAR jungle.

LEXICON dummylex
DEFINES
    nothing really.

# jungle grammar, C.H.A. Koster #

NUMB ::
   sing | plur.

PERS ::
   first | second | third.

TRAN ::
   tran | intr.

CASE ::
   nom | acc.

TENSE:: pres | past | imper.

ROOT sentence.

sentence :
    statement; order; question.

statement:
    subject (NUMB, PERS), verbpart (NUMB, PERS), ("."; ).

order:
    to be (imper), predicate, circumstances, ("!"; );
    to have (imper), object, circumstances, ("!"; );
    verb (imper, intr), circumstances, ("!"; );
    verb (imper, tran), object, circumstances, ("!"; ).

question:
    to be (NUMB, PERS), subject (NUMB, PERS), predicate, ("?"; );
    to have (NUMB, PERS), subject (NUMB, PERS), object,
      circumstances, ("?"; ).

subject (NUMB, PERS):
    nounphrase (NUMB, PERS, nom).

nounphrase (NUMB, third, CASE):
    name (NUMB), optional postmodifiers (NUMB, third);
    noungroup (NUMB), optional postmodifiers (NUMB, third).
nounphrase (NUMB, PERS, CASE):
    reflpron (NUMB, PERS, CASE), optional postmodifiers (NUMB, PERS);
    perspron (NUMB, PERS, CASE), optional postmodifiers (NUMB, PERS).

optional postmodifiers (NUMB, PERS):
    preposition phrase,  optional postmodifiers (NUMB, PERS);
    relsentence (NUMB, PERS);
    ;;.

noungroup (NUMB) :
    nounpart (NUMB);
    number (NUMB), nounpart (NUMB);
    article (NUMB), nounpart (NUMB).

nounpart (NUMB) :
    gradation, adjective, nounpart (NUMB);
    adjective, nounpart (NUMB);
    noun (NUMB);
    noun (NUMB);
    noun (NUMB);
    noun (sing), noun (NUMB).

relsentence (NUMB, PERS) :
    relpron, verbpart (NUMB, PERS).

verbpart (NUMB, PERS) :
    to be (NUMB, PERS), predicate, circumstances;
    to have (NUMB, PERS), object, circumstances;
    verb (NUMB, PERS, intr), circumstances;
    verb (NUMB, PERS, tran), object, circumstances.

circumstances: 
    preposition phrase, circumstances;.

predicate:
    gradation, adjective;
    adjective;
    preposition phrase;
    object.

preposition phrase:
   preposition, object.

verb (NUMB, PERS, TRAN) :
    adverb, verbform (NUMB, PERS, TRAN);
    irreg verbform (NUMB, PERS, TRAN);
    verbform (NUMB, PERS, TRAN).
verb (imper, TRAN):
    verbform (imper, TRAN).

object :
    nounphrase (NUMB, PERS, acc).


#--------------------------NUMBERS-----------------------------#

number (sing) :
    "1 ".
number (plur) :
  "0 "; "2 "; "3 "; "4 "; "5 "; "6 "; "7 "; "8 "; "9 ".

#--------------------------LEXICON-----------------------------#

name (sing) :
    "Jim "; "Mary ".
name (plur) :
    "The Beatles ".

article (sing) :
    "a "; "an ".
article (NUMB) :
    "the ".

perspron (sing, first, nom) :
    "I ".
perspron (plur, first, nom) :
    "we ".
perspron (NUMB, second, nom) :
    "you ".
perspron (sing, third, nom) :
    "he "; "she "; "it ".
perspron (plur, third, nom) :
    "they ".

perspron (sing, first, acc) :
    "me ".
perspron (plur, first, acc) :
    "us ".
perspron (NUMB, second, acc) :
    "you ".
perspron (sing, third, acc) :
    "him "; "her "; "it ".
perspron (plur, third, acc) :
    "them ".

reflpron (sing, first, acc) :
    "myself ".
reflpron (sing, second, acc) :
    "yourself ".
reflpron (sing, third, acc) :
    "himself "; "herself "; "itself ".
reflpron (plur, first, acc) :
    "ourselves ".
reflpron (plur, second, acc) :
    "yourselves ".
reflpron (plur, third, acc) :
    "themselves ".

relpron: "that "; "who "; "which ".

adjective :
    "big "; "little "; "green "; "nice ".

gradation:
    "rather "; "very ".

adverb :
    "always "; "often "; "never ".

noun (sing) :
    "man "; "boy "; "bear "; "girl "; "lamb ";
    "sheep "; "time "; "fly "; "arrow "; "house ".
noun (plur) :
    "men "; "boys "; "bears "; "girls "; "lambs ";
    "sheep "; "times "; "flies "; "arrows "; "houses ".

verbform (sing, first|second, TRAN) :
    verbstem (TRAN), "\ ".
verbform (sing, third, TRAN) :
    verbstem (TRAN), "s ".
verbform (plur, PERS, TRAN) :
    verbstem (TRAN), "\ ".
verbform (imper, TRAN):
    verbstem (TRAN), "\ ".

irreg verbform (sing, first|second, intr) :
    "fly ".
irreg verbform (sing, third, intr) :
    "flies ".
irreg verbform (plur, PERS, intr) :
    "fly ".

verbstem (tran) :
    "see"; "smell"; "like"; "eat"; "forget"; "time".
verbstem (intr) :
    "live"; "sneeze"; "travel".

to be (sing, first): "am ".
to be (sing, second): "are ".
to be (sing, third): "is ".
to be (plur, PERS): "are ".
to be (imper): "be ".

to have (sing, first|second): "have ".
to have (sing, third): "has ".
to have (plur, PERS): "have ".
to have (imper): "have ".

preposition:
    "of "; "with "; "in "; "on "; "like ".
