Package org.antlr.v4.codegen.target
Class Python3Target
- java.lang.Object
-
- org.antlr.v4.codegen.Target
-
- org.antlr.v4.codegen.target.Python3Target
-
public class Python3Target extends Target
-
-
Field Summary
Fields Modifier and Type Field Description protected static HashSet<String>reservedWordsprotected static Map<Character,String>targetCharValueEscape-
Fields inherited from class org.antlr.v4.codegen.Target
defaultCharValueEscape, gen
-
-
Constructor Summary
Constructors Constructor Description Python3Target(CodeGenerator gen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<String>getReservedWords()Map<Character,String>getTargetCharValueEscape()For pure strings of Unicode char, how can we display it in the target language as a literal.booleansupportsOverloadedMethods()booleanwantsBaseListener()booleanwantsBaseVisitor()-
Methods inherited from class org.antlr.v4.codegen.Target
addEscapedChar, addEscapedChar, appendUnicodeEscapedCodePoint, encodeInt16AsCharEscape, escapeChar, escapeIfNeeded, escapeWord, genFile, getAltLabelContextStructName, getBaseListenerFileName, getBaseVisitorFileName, getCodeGenerator, getElementListName, getElementName, getImplicitRuleLabel, getImplicitSetLabel, getImplicitTokenLabel, getInlineTestSetWordSize, getLanguage, getListenerFileName, getListLabel, getLoopCounter, getLoopLabel, getRecognizerFileName, getRuleFunctionContextStructName, getRuleFunctionContextStructName, getSerializedATNSegmentLimit, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromANTLRStringLiteral, getTargetStringLiteralFromString, getTargetStringLiteralFromString, getTemplates, getTokenTypeAsTargetLabel, getTokenTypesAsTargetLabels, getVersion, getVisitorFileName, grammarSymbolCausesIssueInGeneratedCode, isATNSerializedAsInts, loadTemplates, needsHeader, shouldUseUnicodeEscapeForCodePointInDoubleQuotedString, templatesExist, visibleGrammarSymbolCausesIssueInGeneratedCode
-
-
-
-
Constructor Detail
-
Python3Target
public Python3Target(CodeGenerator gen)
-
-
Method Detail
-
getTargetCharValueEscape
public Map<Character,String> getTargetCharValueEscape()
Description copied from class:TargetFor 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.- Overrides:
getTargetCharValueEscapein classTarget
-
getReservedWords
protected Set<String> getReservedWords()
- Specified by:
getReservedWordsin classTarget
-
wantsBaseListener
public boolean wantsBaseListener()
- Overrides:
wantsBaseListenerin classTarget
-
wantsBaseVisitor
public boolean wantsBaseVisitor()
- Overrides:
wantsBaseVisitorin classTarget
-
supportsOverloadedMethods
public boolean supportsOverloadedMethods()
- Overrides:
supportsOverloadedMethodsin classTarget
-
-