/* SYLLABLE_GRAMMAR.PL					*/
/* Simple grammar of syllable structure			*/

syllable_sequence --> syllable.
syllable_sequence --> syllable, syllable_sequence.

syllable --> onset, rime.

rime --> nucleus, coda.

onset --> obstruent, sonorant.	/* maximal Onset hypothesis */
onset --> obstruent.
onset --> sonorant.
onset --> [].

nucleus --> vowel.

coda --> [].
coda --> sonorant.
coda --> obstruent.
coda --> sonorant, sonorant.
coda --> sonorant, obstruent.
coda --> obstruent, obstruent.

obstruent --> [p].	obstruent --> [t].	obstruent --> [k].
obstruent --> [b].	obstruent --> [d].	obstruent --> [g].
obstruent --> [f].	obstruent --> [th].
obstruent --> [s].	obstruent --> [sh].
obstruent --> [v].	obstruent --> [dh]. 	obstruent --> [z].

sonorant --> [r].	sonorant --> [l].
sonorant --> [w].	sonorant --> [j].
sonorant --> [m].	sonorant --> [n].

vowel --> [i].
vowel --> [e].
vowel --> [a].
vowel --> [o].
vowel --> [u].
vowel --> [@].

loop:- syllable(S,[]), write(S), nl, fail.
