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

public Class CSharpTarget

extends Target
Class Inheritance
Imports
org.antlr.v4.codegen.CodeGenerator, .Target, org.antlr.v4.tool.ErrorType, org.stringtemplate.v4.NumberRenderer, .STErrorListener, .STGroup, .STGroupFile, .StringRenderer, org.stringtemplate.v4.misc.STMessage, 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 String
protected String
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
Inherited from org.antlr.v4.codegen.Target:
addEscapedCharaddEscapedCharappendUnicodeEscapedCodePointencodeInt16AsCharEscapeescapeIfNeededgenFilegetAltLabelContextStructNamegetBaseListenerFileNamegetBaseVisitorFileNamegetCodeGeneratorgetElementListNamegetElementNamegetImplicitRuleLabelgetImplicitSetLabelgetImplicitTokenLabelgetInlineTestSetWordSizegetLanguagegetListenerFileNamegetListLabelgetLoopCountergetLoopLabelgetRecognizerFileNamegetRuleFunctionContextStructNamegetRuleFunctionContextStructNamegetSerializedATNSegmentLimitgetTargetStringLiteralFromANTLRStringLiteralgetTargetStringLiteralFromANTLRStringLiteralgetTargetStringLiteralFromStringgetTargetStringLiteralFromStringgetTemplatesgetTokenTypeAsTargetLabelgetTokenTypesAsTargetLabelsgetVersiongetVisitorFileNamegrammarSymbolCausesIssueInGeneratedCodeloadTemplatesneedsHeadershouldUseUnicodeEscapeForCodePointInDoubleQuotedStringsupportsOverloadedMethodstemplatesExistvisibleGrammarSymbolCausesIssueInGeneratedCodewantsBaseListenerwantsBaseVisitor

Field Detail

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

Constructor Detail

CSharpTargetback to summary
public CSharpTarget(CodeGenerator gen)

Method Detail

escapeCharback to summary
protected String escapeChar(int v)

Overrides org.antlr.v4.codegen.Target.escapeChar.

Annotations
@Override
escapeWordback to summary
protected String escapeWord(String word)

Overrides org.antlr.v4.codegen.Target.escapeWord.

Annotations
@Override
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
isATNSerializedAsIntsback to summary
public boolean isATNSerializedAsInts()

Overrides org.antlr.v4.codegen.Target.isATNSerializedAsInts.

Annotations
@Override