public class SimpleTextParser extends Object implements RecipeParser
SimpleTextParser
will handle.| Constructor and Description |
|---|
SimpleTextParser(List<String> directives) |
SimpleTextParser(String directives) |
SimpleTextParser(String[] directives) |
| Modifier and Type | Method and Description |
|---|---|
static String |
getNextToken(StringTokenizer tokenizer,
String directive,
String field,
int lineno) |
static String |
getNextToken(StringTokenizer tokenizer,
String delimiter,
String directive,
String field,
int lineno) |
static String |
getNextToken(StringTokenizer tokenizer,
String delimiter,
String directive,
String field,
int lineno,
boolean optional) |
void |
initialize(DirectiveContext context)
Initialises the directive with a
DirectiveContext. |
List<Directive> |
parse()
Parses the DSL to generate a sequence of stepRegistry to be executed by
RecipePipeline. |
public SimpleTextParser(String[] directives)
public SimpleTextParser(String directives)
public List<Directive> parse() throws DirectiveParseException
RecipePipeline.
The transformation parsing here needs a better solution. It has many limitations and having different way would
allow us to provide much more advanced semantics for directives.parse in interface RecipeParserParseExceptionDirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String directive, String field, int lineno) throws DirectiveParseException
DirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String delimiter, String directive, String field, int lineno) throws DirectiveParseException
DirectiveParseExceptionpublic static String getNextToken(StringTokenizer tokenizer, String delimiter, String directive, String field, int lineno, boolean optional) throws DirectiveParseException
DirectiveParseExceptionpublic void initialize(DirectiveContext context)
DirectiveContext.initialize in interface RecipeParsercontext - Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.