The structured syntax used to write a story is central to BDD. In some cases, it may be necessary to modify the input, either to clean it up or to transform it in some that is consumable by JBehave. To this end, JBehave provides the StoryTransformer interface:
public interface StoryTransformer { String transform(String storyAsText); }
The TransformingStoryParser is a parser that applies an arbitrary number of story transformers and then delegates to the configured delegate story parser for the actual parsing.
An example of its usage is the GherkinStoryParser.