Class SymbolToken
java.lang.Object
com.singularsys.jep.configurableparser.tokens.Token
com.singularsys.jep.configurableparser.tokens.SymbolToken
- All Implemented Interfaces:
Serializable
A simple type of token which represents a fixed string of characters.
These tokens are returned by the
SymbolTokenMatcher.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSymbolToken(String source) SymbolToken(String source, boolean implicitMul) Construct a symbol token with a specified value for the implicit multiplication flag. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the token can appear on the right-hand side of implicit multiplication '2 x'.booleanbooleanisSymbol()voidsetRhsImpMul(boolean rhsImpMul) 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 Details
-
SymbolToken
-
SymbolToken
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 Details
-
isSymbol
public boolean isSymbol() -
isImplicitMulRhs
public boolean isImplicitMulRhs()Description copied from class:TokenWhether the token can appear on the right-hand side of implicit multiplication '2 x'.- Overrides:
isImplicitMulRhsin classToken- Returns:
- boolean value corresponding to the result.
-
isRhsImpMul
public boolean isRhsImpMul() -
setRhsImpMul
public void setRhsImpMul(boolean rhsImpMul) -
cloneToken
-
toString
-