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.


Constructor Summary
LiteralMethods()
           
 
Method Summary
static Character createCharacterFromLiteral(String s)
           
static char createCharFromPossiblyEscapedLiteral(String s, int start, int end, int[] nextPos)
          [3.10.6 Escape Sequences for Character and String Literals]
static Number createFloatingPointFromLiteral(String digits)
           
static Number createIntegerFromLiteral(String digits)
           
static String createStringFromLiteral(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiteralMethods

public LiteralMethods()
Method Detail

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 literal
start - 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)

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu