expression * kif_parse(int isTerm, const char *buffer)
Parses the KIF term or form and returns an expression, or NULL if the parse was unsuccessful.
isTerm should be 1 if the input is a KIF term, or 0 if the input is a KIF form.
buffer contains the input expression.
The return value is newly allocated memory, which should be deleted by the application.