public static class Operation.OpUnambiguousRepeat extends Operation.OpRepeat
Operation.OpAtom, Operation.OpBackReference, Operation.OpBOL, Operation.OpCapture, Operation.OpCharClass, Operation.OpChoice, Operation.OpEndProgram, Operation.OpEOL, Operation.OpGreedyFixed, Operation.OpNothing, Operation.OpReluctantFixed, Operation.OpRepeat, Operation.OpSequence, Operation.OpTrace, Operation.OpUnambiguousRepeatgreedy, max, min, opMATCHES_ZLS_ANYWHERE, MATCHES_ZLS_AT_END, MATCHES_ZLS_AT_START, MATCHES_ZLS_NEVER| Constructor and Description |
|---|
OpUnambiguousRepeat(Operation op,
int min,
int max) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMatchLength()
Get the length of the matches returned by this operation if they are fixed-length
|
IntIterator |
iterateMatches(REMatcher matcher,
int position)
Get an iterator returning all the matches for this operation
|
int |
matchesEmptyString()
Ask whether the regular expression is known, after static analysis, to match a
zero-length string
|
Operation |
optimize(REProgram program,
REFlags flags)
Optimize the operation
|
containsCapturingExpressions, display, getInitialCharacterClass, getMinimumMatchLength, getRepeatedOperationpublic OpUnambiguousRepeat(Operation op, int min, int max)
public int matchesEmptyString()
OperationmatchesEmptyString in class Operation.OpRepeatOperation.MATCHES_ZLS_AT_START
if the expression is statically known to match a zero-length string at the
start of the supplied input;Operation.MATCHES_ZLS_AT_END if it is statically known to return a zero-length
string at the end of the supplied input;Operation.MATCHES_ZLS_ANYWHERE
if it is statically known to match a zero-length string anywhere in the input.
Operation.MATCHES_ZLS_NEVER if it is statically known that the
regex will never match a zero length string.public int getMatchLength()
OperationgetMatchLength in class Operation.OpRepeatpublic Operation optimize(REProgram program, REFlags flags)
Operationoptimize in class Operation.OpRepeatprogram - the program being optimizedflags - the regular expression flagspublic IntIterator iterateMatches(REMatcher matcher, int position)
OperationiterateMatches in class Operation.OpRepeatmatcher - supplies the context for the matching; may be updated with information about
captured groupsposition - the start position to seek a matchCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.