public final class AllTransitionsInOneTreeMatcher extends Matchers
CompressedCodePointSet| Modifier and Type | Class and Description |
|---|---|
static class |
AllTransitionsInOneTreeMatcher.AllTransitionsInOneTreeLeafMatcher
Data structure for optimized matching of multiple ranges in one lower byte range.
|
| Constructor and Description |
|---|
AllTransitionsInOneTreeMatcher(int[] ranges,
short[] successors,
AllTransitionsInOneTreeMatcher.AllTransitionsInOneTreeLeafMatcher[] leafMatchers)
Constructs a new
AllTransitionsInOneTreeMatcher. |
| Modifier and Type | Method and Description |
|---|---|
int |
checkMatchTree(int c) |
String |
toString() |
public AllTransitionsInOneTreeMatcher(int[] ranges,
short[] successors,
AllTransitionsInOneTreeMatcher.AllTransitionsInOneTreeLeafMatcher[] leafMatchers)
AllTransitionsInOneTreeMatcher.ranges - a sorted list of adjacent character ranges, in the following format: Every
character in the array simultaneously represents the inclusive lower bound of a
range and the exclusive upper bound of a range. The algorithm adds an implicit
zero at the begin and an implicit Constants.MAX_CODE_POINT + 1 at the end
of the array. An array representing the ranges
[0x00-0x10][0x10-0xff][0xff-0x2000][0x2000-0x10ffff] (represented with
exclusive upper bound) would be: [0x10, 0xff, 0x2000].successors - the list of successors corresponding to every range in the sorted list of
ranges. Every entry in this array is an index of
DFAAbstractStateNode.getSuccessors(), or a negative index. A negative index can
mean one of two things: -1 denotes "no successor", indices below
-1 denote leaf matchers. These
specialized matchers are used when many ranges lie in the same lower byte range,
i.e. all bytes of their numerical values except the lowest one are equal (e.g.
[0x2020-0x2021][0x2030-0x2031]...).