edu.mit.ai.psg.jeva
Class LiteralMethods
java.lang.Object
|
+--edu.mit.ai.psg.jeva.LiteralMethods
- public class LiteralMethods
- extends Object
Methods for creating primitives from literal strings.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
LiteralMethods
public LiteralMethods()
createIntegerFromLiteral
public static final Number createIntegerFromLiteral(String digits)
createFloatingPointFromLiteral
public static final Number createFloatingPointFromLiteral(String digits)
createCharacterFromLiteral
public static final Character createCharacterFromLiteral(String s)
createStringFromLiteral
public static final String createStringFromLiteral(String s)
createCharFromPossiblyEscapedLiteral
public static final char createCharFromPossiblyEscapedLiteral(String s,
int start,
int end,
int[] nextPos)
- [3.10.6 Escape Sequences for Character and String Literals]
- Parameters:
s - the string containing the character literalstart - the starting position, including the '\'end - where to stop searching, e.g. the end of the string.nextPos - a place to store the next position after all the
chars in the character literal. (for lack of easy
way to return multiple values)