|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.SatherCharFormatter
Constructor Summary | |
(package private) |
SatherCharFormatter()
|
Method Summary | |
String |
BitSet2BoolList(BitSet bs,
String separator)
|
String |
BitSet2IntList(BitSet bs,
String separator)
|
String |
escapeChar(int c,
boolean forCharLiteral)
Given a character value, return a string representing the character that can be embedded inside a string literal or character literal This works for Java/C/C++ code-generation and languages with compatible special-character-escapment. |
String |
escapeString(String s)
Converts a String into a representation that can be use as a literal when surrounded by double-quotes. |
String |
literalChar(int c)
Given a character value, return a string representing the character literal that can be recognized by the target language compiler. |
String |
literalString(String s)
Converts a String into a string literal This works for languages that use double-quotes for string literals. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
SatherCharFormatter()
Method Detail |
public String escapeChar(int c, boolean forCharLiteral)
escapeChar
in interface CharFormatter
c
- The character of interest.forCharLiteral
- true to escape for char literal, false for string literalpublic String escapeString(String s)
escapeString
in interface CharFormatter
s
- The String to be changed into a literalpublic String literalChar(int c)
literalChar
in interface CharFormatter
c
- The character of interest.public String literalString(String s)
literalString
in interface CharFormatter
s
- The String to be changed into a literalpublic String BitSet2BoolList(BitSet bs, String separator)
public String BitSet2IntList(BitSet bs, String separator)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |