Extracted gherkin parsing logic from task, so that we may use it without Isolates.