lojix/logic/src/main/com/thesett/aima/logic/fol/isoprologparser/SentenceParser.java
public Sentence<Clause> parse() throws SourceCodeException
    {
        if (parser.peekAndConsumeEof())
        {
            return null;
        }
        else
        {
            return new SentenceImpl<Clause>(parser.sentence());
        }
    }
public Sentence<Clause> parse() throws SourceCodeException
    {
        if (parser.peekAndConsumeEof())
        {
            return null;
        }
        else
        {
            return new SentenceImpl<Clause>(parser.sentence());
        }
    }
Parses the next sentence from the current token source.

@return The fully parsed syntax tree for the next sentence, or null if no more sentences are available, for
example, because an end of file has been reached.

@throws SourceCodeException If the source being parsed does not match the grammar.