code to parse Prolog syntax - resolves #36

SentenceParser now has-a WordParser rather than is-a TermParser (prefer
composition over inheritance).