jfun.parsec

Class IsToken

public final class IsToken extends Object implements FromToken<Tok>

Tests if the token is the same token expected.

Author: Ben Yu 2004-11-14

Method Summary
TokfromToken(Tok tok)
return the token if the token is the same object that we are expecting. null otherwise.
static FromToken<Tok>instance(Object t)
Creates a FromToken instance using the given expected token t.

Method Detail

fromToken

public Tok fromToken(Tok tok)
return the token if the token is the same object that we are expecting. null otherwise.

instance

public static FromToken<Tok> instance(Object t)
Creates a FromToken instance using the given expected token t.

Parameters: t the expected token object.

Returns: the FromToken instance.