public interface LexerBlockResolver extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
consume(LexerParser parser)
Indicates that this parser has been consumed.
|
LexerBlock |
getBlock() |
LexerParser |
identify(LexerParser parentParser)
Should Calls
identify(LexerParser, boolean)
with safe mode computed from unicity, mandatory flag min/max occur and already consumed parsers. |
LexerParser |
identify(LexerParser parentParser,
boolean safeMode)
Identifies the lexer to use between candidates identified by
resolveLexers(Grammar) to handle the following source part. |
LexerParser |
identifyAndConsume(LexerParser parentParser)
Short cut to call both identity and consume
|
LexerParser |
identifyAndConsume(LexerParser parentParser,
boolean safeMode)
Short cut to call both identity and consume
|
void |
inject(Object target,
LexerParser value)
Method used to inject result.
|
boolean |
isExcluded(Matcher matcher) |
boolean |
isHasBeenConsumed() |
boolean |
isMaxConsommationReached() |
boolean |
isMinConsommationReached() |
List<Lexer> |
resolveLexers(Grammar grammar)
Resolves the lexer(s) described by this block's configuration that can still be candidate in this parsing operation.
|
List<Lexer> resolveLexers(Grammar grammar) throws DslException
DslException
LexerParser identify(LexerParser parentParser) throws IOException, DslException
identify(LexerParser, boolean)
with safe mode computed from unicity, mandatory flag min/max occur and already consumed parsers.IOException
DslException
LexerParser identify(LexerParser parentParser, boolean safeMode) throws IOException, DslException
resolveLexers(Grammar)
to handle the following source part.parentParser
- Parent parsersafeMode
- If false, an exception will be thrown if no lexer is identifiedIOException
DslException
void consume(LexerParser parser) throws DslException
parser
- DslException
LexerParser identifyAndConsume(LexerParser parentParser) throws IOException, DslException
IOException
DslException
LexerParser identifyAndConsume(LexerParser parentParser, boolean safeMode) throws IOException, DslException
IOException
DslException
boolean isHasBeenConsumed()
boolean isMinConsommationReached()
boolean isMaxConsommationReached()
void inject(Object target, LexerParser value) throws UtilsException
UtilsException
boolean isExcluded(Matcher matcher) throws DslException
DslException
LexerBlock getBlock()