org.lsst.ccs.shell
Class Token

java.lang.Object
  extended by org.lsst.ccs.shell.Token

public class Token
extends Object

Token associates index of a token in the input line with the token itself, in order to be able to provide helpful error indecation (see below :) ------------------------------------------------^ Misspelled word! (Exactly how it should work). This class is immutable. Parsing procedural module is also within.


Constructor Summary
Token(int index, String string)
           
 
Method Summary
 boolean equals(Object obj)
           
static String escapeString(String input)
          Escape given string so that tokenize(escapeString(str)).get(0).getString === str.
 int getIndex()
           
 String getString()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(int index,
             String string)
Method Detail

getIndex

public final int getIndex()

getString

public final String getString()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

escapeString

public static String escapeString(String input)
Escape given string so that tokenize(escapeString(str)).get(0).getString === str.

Parameters:
input - String to be escaped
Returns:
escaped string


Copyright © 2013 LSST. All Rights Reserved.