# Random English sentences.  Just for fun,
# but also a hint at some things that grammar alone
# doesn't capture.  Carrying along some state would be
# useful!
#
sentence ::=  noun_phrase ( intransitive_vp | transitive_vp ) ;
noun_phrase ::= art adj* noun prep;
art ::= "the " | "a " ;
adj ::= "big " | "brown " | "loud " | "furry " ;
prep ::= preposition noun_phrase | /* empty */ ;
preposition ::=  "over " | "under " | "near " | "far from " ;
intransitive_vp ::= intrans_verb adverb* ;
intrans_verb ::= "sang " | "snored " | "slept " | "walked ";
transitive_vp ::= adverb* trans_verb object ;
adverb ::= "loudly " | "hurriedly " | "occasionally " ;
trans_verb ::= "ate " | "approached " | "greeted " ;
object ::= noun_phrase ;
noun ::= "person " | "woman " | "man " | "camera " | "tv " ;
#
# Things I wish we had:
#     Establish context while expanding a non-terminal, e.g.,
#     whether we are in subject or object part of sentence
#     determines whether noun form is "he"|"I" and "him"|"me".
#     Condition some choices on context (e.g., "him" only if
#     in object).
#     A key/value store could be useful.
#     Also a key/list of values store for things that can be
#     recycled.
#
