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.
To keep the serialized ATN size small, we only inline atom and
range transitions for Unicode code points invalid input: '<'= 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic TransitioncreateWithCodePoint(ATNState target, int codePoint) static TransitioncreateWithCodePointRange(ATNState target, int codePointFrom, int codePointTo) IfcodePointFromandcodePointToare both invalid input: '<'= U+FFFF, returns a newRangeTransition.
-
Constructor Details
-
CodePointTransitions
public CodePointTransitions()
-
-
Method Details
-
createWithCodePoint
IfcodePointis invalid input: '<'= U+FFFF, returns a newAtomTransition. Otherwise, returns a newSetTransition. -
createWithCodePointRange
public static Transition createWithCodePointRange(ATNState target, int codePointFrom, int codePointTo) IfcodePointFromandcodePointToare both invalid input: '<'= U+FFFF, returns a newRangeTransition. Otherwise, returns a newSetTransition.
-