Class CSharpTarget

java.lang.Object
org.antlr.v4.codegen.Target
org.antlr.v4.codegen.target.CSharpTarget

public class CSharpTarget extends Target
  • Field Details

    • reservedWords

      protected static final HashSet<String> reservedWords
    • targetCharValueEscape

      protected static final Map<Character,String> targetCharValueEscape
  • Constructor Details

  • Method Details

    • getTargetCharValueEscape

      public Map<Character,String> getTargetCharValueEscape()
      Description copied from class: Target
      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.
      Overrides:
      getTargetCharValueEscape in class Target
    • getReservedWords

      protected Set<String> getReservedWords()
      Specified by:
      getReservedWords in class Target
    • escapeWord

      protected String escapeWord(String word)
      Overrides:
      escapeWord in class Target
    • isATNSerializedAsInts

      public boolean isATNSerializedAsInts()
      Overrides:
      isATNSerializedAsInts in class Target
    • escapeChar

      protected String escapeChar(int v)
      Overrides:
      escapeChar in class Target