jfun.parsec
Class String2TokenWord

java.lang.Object
  extended by jfun.parsec.String2TokenWord
All Implemented Interfaces:
java.io.Serializable, FromString<TypedToken<TokenType>>

public class String2TokenWord
extends java.lang.Object
implements FromString<TypedToken<TokenType>>

This implementation of FromString creates a TypedToken instance from the string.

Author:
Ben Yu Mar 29, 2006 9:54:23 PM
See Also:
Serialized Form

Method Summary
 TypedToken<TokenType> fromString(int from, int len, java.lang.String s)
           
static FromString<TypedToken<TokenType>> instance()
          Get an instance of this implementation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

fromString

public TypedToken<TokenType> fromString(int from,
                                        int len,
                                        java.lang.String s)
Specified by:
fromString in interface FromString<TypedToken<TokenType>>
Parameters:
from - the starting index of this token.
len - the length of this token.
s - the string.
Returns:
the object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

instance

public static FromString<TypedToken<TokenType>> instance()
Get an instance of this implementation.