Package net.sf.saxon.regex
Class OpAtom
java.lang.Object
net.sf.saxon.regex.Operation
net.sf.saxon.regex.OpAtom
A match against a fixed string of any length, within a regular expression
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.regex.Operation
Operation.ForceProgressIterator
-
Field Summary
Fields inherited from class net.sf.saxon.regex.Operation
MATCHES_ZLS_ANYWHERE, MATCHES_ZLS_AT_END, MATCHES_ZLS_AT_START, MATCHES_ZLS_NEVER
-
Method Summary
Modifier and TypeMethodDescriptiondisplay()
Display the operation as a regular expression, possibly in abbreviated formgetInitialCharacterClass
(boolean caseBlind) Get a CharacterClass identifying the set of characters that can appear as the first character of a non-empty string that matches this term.int
Get the length of the matches returned by this operation if they are fixed-lengthiterateMatches
(REMatcher matcher, int position) Get an iterator returning all the matches for this operationint
Ask whether the regular expression is known, after static analysis, to match a zero-length stringMethods inherited from class net.sf.saxon.regex.Operation
containsCapturingExpressions, getMaxLoopingDepth, getMinimumMatchLength, optimize
-
Method Details
-
getMatchLength
public int getMatchLength()Description copied from class:Operation
Get the length of the matches returned by this operation if they are fixed-length- Overrides:
getMatchLength
in classOperation
- Returns:
- the length of the matches, or -1 if the length is variable
-
matchesEmptyString
public int matchesEmptyString()Description copied from class:Operation
Ask whether the regular expression is known, after static analysis, to match a zero-length string- Specified by:
matchesEmptyString
in classOperation
- Returns:
- a value indicating whether the regex is statically known to match
a zero-length string. Specifically:
- returns
Operation.MATCHES_ZLS_AT_START
if the expression is statically known to match a zero-length string at the start of the supplied input; - returns
Operation.MATCHES_ZLS_AT_END
if it is statically known to return a zero-length string at the end of the supplied input; - returns
Operation.MATCHES_ZLS_ANYWHERE
if it is statically known to match a zero-length string anywhere in the input. - returns
Operation.MATCHES_ZLS_NEVER
if it is statically known that the regex will never match a zero length string.
- returns
-
getInitialCharacterClass
Description copied from class:Operation
Get a CharacterClass identifying the set of characters that can appear as the first character of a non-empty string that matches this term. This is allowed to be an over-estimate (that is, the returned Character class must match every character that can legitimately appear at the start of the matched string, but it can also match other characters).- Overrides:
getInitialCharacterClass
in classOperation
- Parameters:
caseBlind
- true if case-blind matching is in force ("i" flag)
-
iterateMatches
Description copied from class:Operation
Get an iterator returning all the matches for this operation- Specified by:
iterateMatches
in classOperation
- Parameters:
matcher
- supplies the context for the matching; may be updated with information about captured groupsposition
- the start position to seek a match- Returns:
- an iterator returning the endpoints of all matches starting at the supplied position
-
display
Description copied from class:Operation
Display the operation as a regular expression, possibly in abbreviated form
-