cc.redberry.core.parser
Class ParseToken
- java.lang.Object
-
- cc.redberry.core.parser.ParseToken
-
- Direct Known Subclasses:
- ParseTokenDerivative, ParseTokenExpression, ParseTokenNumber, ParseTokenScalarFunction, ParseTokenSimpleTensor
public class ParseToken extends java.lang.ObjectAbstract syntax tree. The implementation is a simple linked tree.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field and Description ParseToken[]contentChild nodes.ParseTokenparentParent node.TokenTypetokenTypeNode type.
-
Constructor Summary
Constructors Constructor and Description ParseToken(TokenType tokenType, ParseToken... content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)IndicesgetIndices()ReturnsIndicesof the corresponding mathematical expression.java.lang.StringtoString()java.lang.StringtoString(OutputFormat mode)TensortoTensor()Converts this AST to tensor.
-
-
-
Field Detail
-
tokenType
public final TokenType tokenType
Node type.
-
content
public final ParseToken[] content
Child nodes.
-
parent
public ParseToken parent
Parent node.
-
-
Constructor Detail
-
ParseToken
public ParseToken(TokenType tokenType, ParseToken... content)
- Parameters:
tokenType- node typecontent- child nodes
-
-
Method Detail
-
getIndices
public Indices getIndices()
ReturnsIndicesof the corresponding mathematical expression.- Returns:
Indicesof the corresponding mathematical expression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(OutputFormat mode)
-
toTensor
public Tensor toTensor()
Converts this AST to tensor.- Returns:
- resulting tensor
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG