public class CharSupport extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
ANTLRLiteralCharValueEscape
Given a char, we need to be able to show as an ANTLR literal.
|
static int[] |
ANTLRLiteralEscapedCharValue
When converting ANTLR char and string literals, here is the
value set of escape chars.
|
Constructor and Description |
---|
CharSupport() |
Modifier and Type | Method and Description |
---|---|
static String |
capitalize(String s) |
static String |
getANTLRCharLiteralForChar(int c)
Return a string representing the escaped char for code c.
|
static int |
getCharValueFromCharInGrammarLiteral(String cstr)
Given char x or \t or ሴ return the char value;
Unnecessary escapes like '\{' yield -1.
|
static int |
getCharValueFromGrammarCharLiteral(String literal)
Given a literal like (the 3 char sequence with single quotes) 'a',
return the int value of 'a'.
|
static String |
getStringFromGrammarStringLiteral(String literal) |
public static int[] ANTLRLiteralEscapedCharValue
public static String[] ANTLRLiteralCharValueEscape
public static String getANTLRCharLiteralForChar(int c)
public static int getCharValueFromGrammarCharLiteral(String literal)
public static int getCharValueFromCharInGrammarLiteral(String cstr)
public static String getStringFromGrammarStringLiteral(String literal)
Copyright © 1992–2014 ANTLR. All rights reserved.