module gaps. import lollisig. kind lex type. type np list lex -> list lex -> o. type pn list lex -> list lex -> o. type rel list lex -> list lex -> o. type sbar list lex -> list lex -> o. type sent list lex -> list lex -> o. type stv list lex -> list lex -> o. type tv list lex -> list lex -> o. type vp list lex -> list lex -> o. type ann lex. type believes lex. type bob lex. type loves lex. type married lex. type mary lex. type that lex. type whom lex. sent P Q <- bang (np P M) x vp M Q. vp P Q <- tv P M x np M Q. vp P Q <- stv P M x sbar M Q. np P Q <- pn P Q. sbar (that::P) Q <- sent P Q. rel (whom::P) Q <- (pi z\(np z z)) -o sent P Q. pn (mary::L) L <- one. pn (bob::L) L <- one. pn (ann::L) L <- one. tv (loves::L) L <- one. tv (married::L) L <- one. stv (believes::L) L <- one. type exrel int -> list lex -> o. % The first two are legal relative clause, the last two are not. exrel 1 (whom::mary::believes::that::bob::married::nil). exrel 2 (whom::bob::married::nil). exrel 3 (whom::mary::believes::that::married::ann::nil). exrel 4 (whom::bob::married::ann::nil). %% The following addition to the grammar results in a left-recursive program. % sent P Q <- sent P (and::M) & sent M Q. %% This additional clause should allow a parse of the following. % exrel 5 (whom::ann::married::and::bob::believes::that::mary::loves::nil).