private Sentence parseSentence()
{
Token t = lookAhead(1);
if (lParen(t))
{
return parseParanthizedSentence();
}
else if ((lookAhead(1).getType() == (int)LogicTokenTypes.QUANTIFIER))
{
return parseQuantifiedSentence();
}
else if (notToken(t))
{
return parseNotSentence();
}
else if (predicate(t))
{
return parsePredicate();
}
else if (term(t))
{
return parseTermEquality();
}
throw new ApplicationException("parse failed with Token " + t.getText());
}