use of org.matheclipse.parser.client.ast.SymbolNode in project symja_android_library by axkr.
the class Parser method getSymbol.
/**
* Read the current identifier from the expression factories table
*
* @return
* @see
*/
private SymbolNode getSymbol() throws SyntaxError {
String identifier = getIdentifier();
if (!fFactory.isValidIdentifier(identifier)) {
throwSyntaxError("Invalid identifier: " + identifier + " detected.");
}
final SymbolNode symbol = fFactory.createSymbol(identifier);
getNextToken();
return symbol;
}
use of org.matheclipse.parser.client.ast.SymbolNode in project symja_android_library by axkr.
the class Parser method getTimes.
private ASTNode getTimes(ASTNode temp) throws SyntaxError {
FunctionNode func = fFactory.createAST(new SymbolNode("Times"));
func.add(temp);
do {
getNextToken();
temp = parseExpression();
func.add(temp);
if (fToken != TT_PRECEDENCE_CLOSE) {
throwSyntaxError("\')\' expected.");
}
getNextToken();
} while (fToken == TT_PRECEDENCE_OPEN);
return func;
}
Aggregations