Moved parsing call and prolog term generator call to parser