Top Fields Constructors Methods
org.antlr.v4.codegen.target

public Class Python3Target

extends Target
Class Inheritance
Imports
org.antlr.v4.codegen.CodeGenerator, .Target, java.util.*

Field Summary

Modifier and TypeField and Description
protected static final HashSet<String>
protected static final Map<Character, String>
Inherited from org.antlr.v4.codegen.Target:
defaultCharValueEscapegen

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Set<String>
public Map<Character, String>
getTargetCharValueEscape()

Overrides org.antlr.v4.codegen.Target.getTargetCharValueEscape.

For pure strings of Unicode char, how can we display it in the target language as a literal.
public boolean
public boolean
public boolean
Inherited from org.antlr.v4.codegen.Target:
addEscapedCharaddEscapedCharappendUnicodeEscapedCodePointencodeInt16AsCharEscapeescapeCharescapeIfNeededescapeWordgenFilegetAltLabelContextStructNamegetBaseListenerFileNamegetBaseVisitorFileNamegetCodeGeneratorgetElementListNamegetElementNamegetImplicitRuleLabelgetImplicitSetLabelgetImplicitTokenLabelgetInlineTestSetWordSizegetLanguagegetListenerFileNamegetListLabelgetLoopCountergetLoopLabelgetRecognizerFileNamegetRuleFunctionContextStructNamegetRuleFunctionContextStructNamegetSerializedATNSegmentLimitgetTargetStringLiteralFromANTLRStringLiteralgetTargetStringLiteralFromANTLRStringLiteralgetTargetStringLiteralFromStringgetTargetStringLiteralFromStringgetTemplatesgetTokenTypeAsTargetLabelgetTokenTypesAsTargetLabelsgetVersiongetVisitorFileNamegrammarSymbolCausesIssueInGeneratedCodeisATNSerializedAsIntsloadTemplatesneedsHeadershouldUseUnicodeEscapeForCodePointInDoubleQuotedStringtemplatesExistvisibleGrammarSymbolCausesIssueInGeneratedCode

Field Detail

reservedWordsback to summary
protected static final HashSet<String> reservedWords
targetCharValueEscapeback to summary
protected static final Map<Character, String> targetCharValueEscape

Constructor Detail

Python3Targetback to summary
public Python3Target(CodeGenerator gen)

Method Detail

getReservedWordsback to summary
protected Set<String> getReservedWords()

Implements abstract org.antlr.v4.codegen.Target.getReservedWords.

Annotations
@Override
getTargetCharValueEscapeback to summary
public Map<Character, String> getTargetCharValueEscape()

Overrides org.antlr.v4.codegen.Target.getTargetCharValueEscape.

Doc from org.antlr.v4.codegen.Target.getTargetCharValueEscape.

For pure strings of Unicode char, how can we display it in the target language as a literal. Useful for dumping predicates and such that may refer to chars that need to be escaped when represented as strings. Also, templates need to be escaped so that the target language can hold them as a string. Each target can have a different set in memory at same time.

Annotations
@Override
supportsOverloadedMethodsback to summary
public boolean supportsOverloadedMethods()

Overrides org.antlr.v4.codegen.Target.supportsOverloadedMethods.

Annotations
@Override
wantsBaseListenerback to summary
public boolean wantsBaseListener()

Overrides org.antlr.v4.codegen.Target.wantsBaseListener.

Annotations
@Override
wantsBaseVisitorback to summary
public boolean wantsBaseVisitor()

Overrides org.antlr.v4.codegen.Target.wantsBaseVisitor.

Annotations
@Override