public static class Operation.OpReluctantFixed 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.OpUnambiguousRepeat
greedy, max, min, op
Constructor and Description |
---|
OpReluctantFixed(Operation op,
int min,
int max,
int len) |
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
|
boolean |
matchesEmptyString()
Ask whether the regular expression is capable of matching a zero-length string
|
Operation |
optimize(REProgram program,
REFlags flags)
Optimize the operation
|
containsCapturingExpressions, display, getInitialCharacterClass, getMinimumMatchLength, getRepeatedOperation
public OpReluctantFixed(Operation op, int min, int max, int len)
public int getMatchLength()
Operation
getMatchLength
in class Operation.OpRepeat
public boolean matchesEmptyString()
Operation
matchesEmptyString
in class Operation.OpRepeat
public Operation optimize(REProgram program, REFlags flags)
Operation
optimize
in class Operation.OpRepeat
program
- the program being optimizedflags
- the regular expression flagspublic IntIterator iterateMatches(REMatcher matcher, int position)
Operation
iterateMatches
in class Operation.OpRepeat
matcher
- supplies the context for the matching; may be updated with information about
captured groupsposition
- the start position to seek a matchCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.