STATE
- the enum used for describing parse states.public class SequenceRecognizer<STATE extends java.lang.Enum<STATE>> extends RecognizerBase<STATE>
Modifier and Type | Class and Description |
---|---|
static interface |
SequenceRecognizer.ITokenMatcher
Interface of a custom matcher.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
matchTerms
The match terms.
|
NO_MATCH, tailRecognizers
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getRecognizerStringRepresentation()
Returns the default string representation of this recognizer: its short class
name.
|
int |
matchesLocally(ParserState<STATE> parserState,
java.util.List<IToken> tokens,
int startOffset)
Attempts to match the recognizer locally (without respecting tail
recognizers).
|
createNode, createNode, createNode, debug, endNode, endNodeWithContinuation, endNodeWithContinuation, endNodeWithName, ensureTopLevel, markStart, matches, notPreCondition, optional, optionalSubRecognizer, parseOnce, parseStrictlyUntil, parseUntil, parseUntilOrEof, preCondition, repeated, repeatedAtLeastOnce, repeatedSubRecognizer, sequence, sequenceBefore, skipAny, skipBefore, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipForward, skipNested, skipNested, skipTo, skipToWithNesting, skipToWithNesting, skipToWithNesting, skipToWithNesting, skipWithNesting, skipWithNesting, subRecognizer, subRecognizer, toString
protected java.lang.Object[] matchTerms
public int matchesLocally(ParserState<STATE> parserState, java.util.List<IToken> tokens, int startOffset)
matchesLocally
in class RecognizerBase<STATE extends java.lang.Enum<STATE>>
parserState
- the current state of the underlying parser.tokens
- the list of tokens.startOffset
- the current offset into the tokens from where to start matching.RecognizerBase.NO_MATCH
if matching was not possible at this position.protected java.lang.String getRecognizerStringRepresentation()
RecognizerBase.toString()
to ease debugging. May be overwritten by
subclasses to provide better debugging information.
This default implementation is sufficient for all recognizers that don't take
any arguments. Other recognizers should overwrite this to make their
arguments visible to the debugging user if they are helpful.getRecognizerStringRepresentation
in class RecognizerBase<STATE extends java.lang.Enum<STATE>>