|
| subroutine | expression::expression_init (this, str) |
| | Compile an expression.
|
| |
| subroutine | expression::parser_free (p) |
| | Release the memory held by the parser state.
|
| |
| subroutine | expression::expression_free (this) |
| | Destructor.
|
| |
| subroutine | expression::expression_eval (this, res, n, x, y, z, t, dt) |
| | Evaluate the expression in n points.
|
| |
| subroutine, public | expression::expression_eval_static (str, res, n, x, y, z, usage) |
| | Compile an expression and evaluate it in a set of points, in a context where there is no time state.
|
| |
| subroutine, public | expression::expression_check_finite (str, res, n, usage) |
| | Abort if an expression did not evaluate to a finite value everywhere.
|
| |
| subroutine | expression::expr_tokenize (p) |
| | Split the source string into a stream of tokens.
|
| |
| subroutine | expression::push_token (p, kind, pos) |
| | Append a token to the token stream.
|
| |
| recursive subroutine | expression::parse_expr (p) |
| | Parse an additive expression.
|
| |
| recursive subroutine | expression::parse_term (p) |
| | Parse a multiplicative expression.
|
| |
| recursive subroutine | expression::parse_factor (p) |
| | Parse a possibly signed factor. Unary minus binds looser than ^, so -x^2 is -(x^2), as in Fortran.
|
| |
| recursive subroutine | expression::parse_power (p) |
| | Parse an exponentiation. Right associative, so 2^3^2 is 2^(3^2).
|
| |
| recursive subroutine | expression::parse_primary (p) |
| | Parse a literal, a symbol, a function call or a parenthesised expression.
|
| |
| subroutine | expression::parse_symbol (p, k) |
| | Resolve a bare identifier into either a variable opcode or a literal.
|
| |
| integer function | expression::func_op (name, nargs) |
| | Look up the opcode of a function.
|
| |
| subroutine | expression::emit (p, op, val) |
| | Append an opcode, keeping track of how deep the evaluation stack gets.
|
| |
| subroutine | expression::expr_error (p, msg, pos) |
| | Abort with a message pointing at the offending part of the expression.
|
| |
| pure logical function | expression::is_digit (c) |
| | True if c is a decimal digit.
|
| |
| pure logical function | expression::is_alpha (c) |
| | True if c is a letter.
|
| |