public abstract class CodePointTransitions extends Object
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 <= 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 | Description |
---|---|
CodePointTransitions() |
Modifier and Type | Method | Description |
---|---|---|
static Transition |
createWithCodePoint(ATNState target,
int codePoint) |
If
codePoint is <= U+FFFF, returns a new AtomTransition . |
static Transition |
createWithCodePointRange(ATNState target,
int codePointFrom,
int codePointTo) |
public static Transition createWithCodePoint(ATNState target, int codePoint)
public static Transition createWithCodePointRange(ATNState target, int codePointFrom, int codePointTo)
codePointFrom
and codePointTo
are both
<= U+FFFF, returns a new RangeTransition
.
Otherwise, returns a new SetTransition
.Copyright © 1992–2019 ANTLR. All rights reserved.