libSBML Perl API  5.20.5
Loading...
Searching...
No Matches
ASTNode.cpp File Reference

Abstract Syntax Tree (AST) for representing formula trees. More...

Include dependency graph for ASTNode.cpp:

Macros

#define ASTNodeType_isAvogadro(t)
 ASTNodeType predicate.
#define ASTNodeType_isConstant(t)
 ASTNodeType predicate.
#define ASTNodeType_isConstantNumber(t)
 ASTNodeType predicate.
#define ASTNodeType_isFunction(t)
 ASTNodeType predicate.
#define ASTNodeType_isInteger(t)
 ASTNodeType predicate.
#define ASTNodeType_isLambda(t)
 ASTNodeType predicate.
#define ASTNodeType_isLogical(t)
 ASTNodeType predicate.
#define ASTNodeType_isName(t)
 ASTNodeType predicate.
#define ASTNodeType_isNumber(t)
 ASTNodeType predicate.
#define ASTNodeType_isOperator(t)
 ASTNodeType predicate.
#define ASTNodeType_isRational(t)
 ASTNodeType predicate.
#define ASTNodeType_isReal(t)
 ASTNodeType predicate.
#define ASTNodeType_isRelational(t)
 ASTNodeType predicate.
#define ASTNodeType_isUnknown(t)
 ASTNodeType predicate.

Functions

static void copyNode (const ASTNode *source, ASTNode *dest)

Variables

static const char * AST_CONSTANT_STRINGS []
static const char * AST_FUNCTION_STRINGS []
static const char * AST_LAMBDA_STRING = "lambda"
 String Constants.
static const char * AST_LOGICAL_STRINGS []
static const char * AST_OPERATOR_STRINGS []
static const char * AST_RELATIONAL_STRINGS []

Detailed Description

Abstract Syntax Tree (AST) for representing formula trees.

Author
Ben Bornstein

Macro Definition Documentation

◆ ASTNodeType_isAvogadro

#define ASTNodeType_isAvogadro ( t)
Value:
@ AST_NAME_AVOGADRO
Definition ASTNodeType.h:96

ASTNodeType predicate.

◆ ASTNodeType_isConstant

#define ASTNodeType_isConstant ( t)
Value:
(((t >= AST_CONSTANT_E) && (t <= AST_CONSTANT_TRUE)) || t == AST_NAME_AVOGADRO)
@ AST_CONSTANT_TRUE
Definition ASTNodeType.h:102
@ AST_CONSTANT_E
Definition ASTNodeType.h:99

ASTNodeType predicate.

◆ ASTNodeType_isConstantNumber

#define ASTNodeType_isConstantNumber ( t)
Value:
@ AST_CONSTANT_PI
Definition ASTNodeType.h:101

ASTNodeType predicate.

◆ ASTNodeType_isFunction

#define ASTNodeType_isFunction ( t)
Value:
@ AST_FUNCTION_TANH
Definition ASTNodeType.h:141
@ AST_CSYMBOL_FUNCTION
Definition ASTNodeType.h:165
@ AST_FUNCTION
Definition ASTNodeType.h:106

ASTNodeType predicate.

◆ ASTNodeType_isInteger

#define ASTNodeType_isInteger ( t)
Value:
(t == AST_INTEGER)
@ AST_INTEGER
Definition ASTNodeType.h:90

ASTNodeType predicate.

◆ ASTNodeType_isLambda

#define ASTNodeType_isLambda ( t)
Value:
(t == AST_LAMBDA)
@ AST_LAMBDA
Definition ASTNodeType.h:104

ASTNodeType predicate.

◆ ASTNodeType_isLogical

#define ASTNodeType_isLogical ( t)
Value:
(((t >= AST_LOGICAL_AND) && (t <= AST_LOGICAL_XOR)))
@ AST_LOGICAL_XOR
Definition ASTNodeType.h:146
@ AST_LOGICAL_AND
Definition ASTNodeType.h:143

ASTNodeType predicate.

◆ ASTNodeType_isName

#define ASTNodeType_isName ( t)
Value:
((t >= AST_NAME) && (t <= AST_NAME_TIME))
@ AST_NAME_TIME
Definition ASTNodeType.h:97
@ AST_NAME
Definition ASTNodeType.h:95

ASTNodeType predicate.

◆ ASTNodeType_isNumber

#define ASTNodeType_isNumber ( t)
Value:
#define ASTNodeType_isReal(t)
ASTNodeType predicate.
Definition ASTNode.cpp:123
#define ASTNodeType_isInteger(t)
ASTNodeType predicate.
Definition ASTNode.cpp:111

ASTNodeType predicate.

◆ ASTNodeType_isOperator

#define ASTNodeType_isOperator ( t)
Value:
( ( t == AST_PLUS ) || \
( t == AST_MINUS ) || \
( t == AST_TIMES ) || \
( t == AST_DIVIDE ) || \
( t == AST_POWER ) )
@ AST_MINUS
Definition ASTNodeType.h:85
@ AST_DIVIDE
Definition ASTNodeType.h:87
@ AST_TIMES
Definition ASTNodeType.h:86
@ AST_POWER
Definition ASTNodeType.h:88
@ AST_PLUS
Definition ASTNodeType.h:84

ASTNodeType predicate.

◆ ASTNodeType_isRational

#define ASTNodeType_isRational ( t)
Value:
(t == AST_RATIONAL)
@ AST_RATIONAL
Definition ASTNodeType.h:93

ASTNodeType predicate.

◆ ASTNodeType_isReal

#define ASTNodeType_isReal ( t)
Value:
((t >= AST_REAL) && (t <= AST_RATIONAL))
@ AST_REAL
Definition ASTNodeType.h:91

ASTNodeType predicate.

◆ ASTNodeType_isRelational

#define ASTNodeType_isRelational ( t)
Value:
@ AST_RELATIONAL_NEQ
Definition ASTNodeType.h:153
@ AST_RELATIONAL_EQ
Definition ASTNodeType.h:148

ASTNodeType predicate.

◆ ASTNodeType_isUnknown

#define ASTNodeType_isUnknown ( t)
Value:
(t == AST_UNKNOWN)
@ AST_UNKNOWN
Definition ASTNodeType.h:275

ASTNodeType predicate.

Function Documentation

◆ copyNode()

void copyNode ( const ASTNode * source,
ASTNode * dest )
static

Variable Documentation

◆ AST_CONSTANT_STRINGS

const char* AST_CONSTANT_STRINGS[]
static
Initial value:
=
{
"exponentiale"
, "false"
, "pi"
, "true"
, "avogadro"
}

◆ AST_FUNCTION_STRINGS

const char* AST_FUNCTION_STRINGS[]
static

◆ AST_LAMBDA_STRING

const char* AST_LAMBDA_STRING = "lambda"
static

String Constants.

◆ AST_LOGICAL_STRINGS

const char* AST_LOGICAL_STRINGS[]
static
Initial value:
=
{
"and"
, "not"
, "or"
, "xor"
}

◆ AST_OPERATOR_STRINGS

const char* AST_OPERATOR_STRINGS[]
static
Initial value:
=
{
"divide"
, "minus"
, "plus"
, "times"
, "power"
}

◆ AST_RELATIONAL_STRINGS

const char* AST_RELATIONAL_STRINGS[]
static
Initial value:
=
{
"eq"
, "geq"
, "gt"
, "leq"
, "lt"
, "neq"
}