public class RegexStoryParser extends Object implements StoryParser
Story
.Modifier and Type | Field and Description |
---|---|
static ResourceLoader |
DEFAULT_RESOURCE_LOADER |
static TableTransformers |
DEFAULT_TABLE_TRANSFORMERS |
protected static String |
NONE |
Constructor and Description |
---|
RegexStoryParser() |
RegexStoryParser(Configuration configuration) |
RegexStoryParser(ExamplesTableFactory tableFactory) |
RegexStoryParser(Keywords keywords) |
RegexStoryParser(Keywords keywords,
ExamplesTableFactory tableFactory) |
RegexStoryParser(Keywords keywords,
ResourceLoader resourceLoader,
TableParsers tableParsers,
TableTransformers tableTransformers) |
RegexStoryParser(Keywords keywords,
ResourceLoader resourceLoader,
TableTransformers tableTransformers) |
RegexStoryParser(ResourceLoader resourceLoader,
TableTransformers tableTransformers) |
Modifier and Type | Method and Description |
---|---|
protected String |
concatenateFollowingStartingWords() |
protected String |
concatenateInitialStartingWords() |
protected String |
concatenateWithOr(String... keywords) |
protected List<String> |
findSteps(String stepsAsText) |
protected Keywords |
keywords() |
Story |
parseStory(String storyAsText)
Parses story from its textual representation
|
Story |
parseStory(String storyAsText,
String storyPath)
Parses story from its textual representation and (optional) story path
|
protected List<String> |
splitElements(String text,
String keyword) |
protected String |
startingWithNL(String text) |
public static final ResourceLoader DEFAULT_RESOURCE_LOADER
public static final TableTransformers DEFAULT_TABLE_TRANSFORMERS
protected static final String NONE
public RegexStoryParser()
public RegexStoryParser(Keywords keywords)
public RegexStoryParser(ResourceLoader resourceLoader, TableTransformers tableTransformers)
public RegexStoryParser(Keywords keywords, ResourceLoader resourceLoader, TableTransformers tableTransformers)
public RegexStoryParser(Keywords keywords, ResourceLoader resourceLoader, TableParsers tableParsers, TableTransformers tableTransformers)
public RegexStoryParser(ExamplesTableFactory tableFactory)
public RegexStoryParser(Keywords keywords, ExamplesTableFactory tableFactory)
public RegexStoryParser(Configuration configuration)
public Story parseStory(String storyAsText)
StoryParser
parseStory
in interface StoryParser
storyAsText
- the textual representationpublic Story parseStory(String storyAsText, String storyPath)
StoryParser
parseStory
in interface StoryParser
storyAsText
- the textual representationstoryPath
- the story path, may be null
protected Keywords keywords()
protected String concatenateInitialStartingWords()
protected String concatenateFollowingStartingWords()
Copyright © 2003–2021. All rights reserved.