Package org.antlr.v4.runtime.atn
Class CodePointTransitions
java.lang.Object
org.antlr.v4.runtime.atn.CodePointTransitions
Utility class to create
AtomTransition
, RangeTransition
,
and SetTransition
appropriately based on the range of the input.
Previously, we distinguished between atom and range transitions for
Unicode code points ≤ U+FFFF and those above. We used a set
transition for a Unicode code point > U+FFFF. Now that we can serialize
32-bit int/chars in the ATN serialization, this is no longer necessary.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Transition
createWithCodePoint
(ATNState target, int codePoint) Return newAtomTransition
static Transition
createWithCodePointRange
(ATNState target, int codePointFrom, int codePointTo) Return newAtomTransition
if range represents one atom elseSetTransition
.
-
Constructor Details
-
CodePointTransitions
public CodePointTransitions()
-
-
Method Details
-
createWithCodePoint
Return newAtomTransition
-
createWithCodePointRange
public static Transition createWithCodePointRange(ATNState target, int codePointFrom, int codePointTo) Return newAtomTransition
if range represents one atom elseSetTransition
.
-