miSim

misim.asm
Class TokenString

java.lang.Object
  |
  +--misim.editor.Token
        |
        +--misim.asm.TokenString
All Implemented Interfaces:
java.lang.Cloneable

public class TokenString
extends Token


Fields inherited from class misim.editor.Token
display, text, TYPE_ALIAS, TYPE_COLON, TYPE_COMMA, TYPE_COMMAND, TYPE_COMMENT, TYPE_INSTRUCTION, TYPE_LISTING, TYPE_NUMBER, TYPE_OPERATOR, TYPE_STRING, TYPE_TOKEN, TYPE_WHITESPACE
 
Constructor Summary
TokenString(java.lang.String text, EditorPrefs prefs)
           
 
Method Summary
static Token consume(Token aToken, int start)
          Parsing method - to be implemented by subclasses.
static java.lang.String getDelimiters()
           
 java.lang.String stringValue()
          Return the String value of this token
 
Methods inherited from class misim.editor.Token
clone, draw, drawChars, getColour, getColumn, getLength, getPixelPos, getPrefs, getType, getValue, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenString

public TokenString(java.lang.String text,
                   EditorPrefs prefs)
Method Detail

getDelimiters

public static java.lang.String getDelimiters()

stringValue

public java.lang.String stringValue()
                             throws EditorException
Return the String value of this token
Returns:
The value of this token

consume

public static Token consume(Token aToken,
                            int start)
Parsing method - to be implemented by subclasses. Build a new token based on as much of the given token as possible, starting at the given index. The method may return null if the text is not appropriate for this token type.
Parameters:
aToken - The token to consume
start - The start index
Returns:
A new token, or null

miSim