| Modifier and Type | Field and Description |
|---|---|
| protected static final HashSet | |
| private static final ThreadLocal | targetTemplates
The Java target can cache the code generation templates. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Set | |
| public int | getSerializedATNSegmentLimit()
Overrides org. |
| public boolean |
| reservedWords | back to summary |
|---|---|
| protected static final HashSet<String> reservedWords | |
| targetTemplates | back to summary |
|---|---|
| private static final ThreadLocal<STGroup> targetTemplates The Java target can cache the code generation templates. | |
| JavaTarget | back to summary |
|---|---|
| public JavaTarget(CodeGenerator gen) | |
| getReservedWords | back to summary |
|---|---|
| public Set Implements abstract org.
| |
| getSerializedATNSegmentLimit | back to summary |
|---|---|
| public int getSerializedATNSegmentLimit() Overrides org. Doc from org. Gets the maximum number of 16-bit unsigned integers that can be encoded in a single segment (a declaration in target language) of the serialized ATN. E.g., in C++, a small segment length results in multiple decls like: static const int32_t serializedATNSegment1[] = { 0x7, 0x12, 0x2, 0x13, 0x7, 0x13, 0x2, 0x14, 0x7, 0x14, 0x2, 0x15, 0x7, 0x15, 0x2, 0x16, 0x7, 0x16, 0x2, 0x17, 0x7, 0x17, 0x2, 0x18, 0x7, 0x18, 0x2, 0x19, 0x7, 0x19, 0x2, 0x1a, 0x7, 0x1a, 0x2, 0x1b, 0x7, 0x1b, 0x2, 0x1c, 0x7, 0x1c, 0x2, 0x1d, 0x7, 0x1d, 0x2, 0x1e, 0x7, 0x1e, 0x2, 0x1f, 0x7, 0x1f, 0x2, 0x20, 0x7, 0x20, 0x2, 0x21, 0x7, 0x21, 0x2, 0x22, 0x7, 0x22, 0x2, 0x23, 0x7, 0x23, 0x2, 0x24, 0x7, 0x24, 0x2, 0x25, 0x7, 0x25, 0x2, 0x26, }; instead of one big one. Targets are free to ignore this like JavaScript does. This is primarily needed by Java target to limit size of any single ATN string to 65k length.
| |
| isATNSerializedAsInts | back to summary |
|---|---|
| public boolean isATNSerializedAsInts() Overrides org.
| |