Class SymbolToken
- java.lang.Object
-
- com.singularsys.jep.configurableparser.tokens.Token
-
- com.singularsys.jep.configurableparser.tokens.SymbolToken
-
- All Implemented Interfaces:
java.io.Serializable
public class SymbolToken extends Token
A simple type of token which represents a fixed string of characters. These tokens are returned by theSymbolTokenMatcher
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SymbolToken(java.lang.String source)
SymbolToken(java.lang.String source, boolean implicitMul)
Construct a symbol token with a specified value for the implicit multiplication flag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Token
cloneToken()
boolean
isImplicitMulRhs()
Whether the token can appear on the right hand side of implicit multiplication '2 x'.boolean
isRhsImpMul()
boolean
isSymbol()
void
setRhsImpMul(boolean rhsImpMul)
java.lang.String
toString()
-
Methods inherited from class com.singularsys.jep.configurableparser.tokens.Token
equals, getColumnNumber, getLength, getLineNumber, getSource, hashCode, isBinary, isComment, isFunction, isIdentifier, isNumber, isOperator, isPrefix, isString, isSuffix, isTerminal, isTernary, isWhiteSpace, setPosition
-
-
-
-
Constructor Detail
-
SymbolToken
public SymbolToken(java.lang.String source)
-
SymbolToken
public SymbolToken(java.lang.String source, boolean implicitMul)
Construct a symbol token with a specified value for the implicit multiplication flag.- Parameters:
source
- matched textimplicitMul
- where the token can appear on the right hand side of implicit multiplication.
-
-
Method Detail
-
isImplicitMulRhs
public boolean isImplicitMulRhs()
Description copied from class:Token
Whether the token can appear on the right hand side of implicit multiplication '2 x'.- Overrides:
isImplicitMulRhs
in classToken
- Returns:
- boolean value corresponding to the result.
-
isRhsImpMul
public boolean isRhsImpMul()
-
setRhsImpMul
public void setRhsImpMul(boolean rhsImpMul)
-
cloneToken
public Token cloneToken()
-
-