Package org.antlr.v4.runtime.atn
Class CodePointTransitions
- java.lang.Object
-
- org.antlr.v4.runtime.atn.CodePointTransitions
-
public abstract class CodePointTransitions extends Object
Utility class to createAtomTransition
,RangeTransition
, andSetTransition
appropriately based on the range of the input. To keep the serialized ATN size small, we only inline atom and range transitions for Unicode code points <= U+FFFF. Whenever we encounter a Unicode code point > U+FFFF, we represent that as a set transition (even if it is logically an atom or a range).
-
-
Constructor Summary
Constructors Constructor Description CodePointTransitions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Transition
createWithCodePoint(ATNState target, int codePoint)
IfcodePoint
is <= U+FFFF, returns a newAtomTransition
.static Transition
createWithCodePointRange(ATNState target, int codePointFrom, int codePointTo)
-
-
-
Method Detail
-
createWithCodePoint
public static Transition createWithCodePoint(ATNState target, int codePoint)
-
createWithCodePointRange
public static Transition createWithCodePointRange(ATNState target, int codePointFrom, int codePointTo)
IfcodePointFrom
andcodePointTo
are both <= U+FFFF, returns a newRangeTransition
. Otherwise, returns a newSetTransition
.
-
-