com.singularsys.jep.configurableparser.matchers
Class OperatorTokenMatcher

java.lang.Object
  extended by com.singularsys.jep.configurableparser.matchers.OperatorTokenMatcher
All Implemented Interfaces:
TokenMatcher

public class OperatorTokenMatcher
extends java.lang.Object
implements TokenMatcher

TokenMatcher for matching operators from the operator set.


Constructor Summary
OperatorTokenMatcher()
          Default constructor.
 
Method Summary
 void init(Jep j)
          Initialize the matcher when the Jep instance is known.
 void init(OperatorTable os)
           
 Token match(java.lang.String s)
          Attempts to match the start of the string.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperatorTokenMatcher

public OperatorTokenMatcher()
Default constructor. The operator set is supplied using the init(com.singularsys.jep.OperatorTable) method.

Method Detail

init

public void init(OperatorTable os)

match

public Token match(java.lang.String s)
Description copied from interface: TokenMatcher
Attempts to match the start of the string.

Specified by:
match in interface TokenMatcher
Parameters:
s - the string to match against
Returns:
if successful returns the corresponding token, return null if failed to match

toString

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

init

public void init(Jep j)
Description copied from interface: TokenMatcher
Initialize the matcher when the Jep instance is known.

Specified by:
init in interface TokenMatcher


Copyright © 2007 Singular Systems http://www.singularsys.com/jep