37 #include "lib/cplex.h" 38 #include "lib/charbuf.h" 40 #include "system/program.h" 101 if (
first !=
nullptr)
111 if (
first !=
nullptr)
140 while (current != var)
174 if (
first ==
nullptr)
183 while (current !=
nullptr)
205 variable
->Next = oldFirst;
234 return static_cast<
char*>(cmdFormat ?
nullptr :
HELPVARSNDEF);
240 while (current !=
nullptr)
245 len += cmdFormat ? 2 : 1;
253 while (current !=
nullptr)
357 static char* ret = (
char*)
"ins";
363 static char* ret = (
char*)
"ins";
449 static char* ret = (
char*)
"e";
469 static char* ret = (
char*)
"pi";
489 static char* ret = (
char*)
"i";
void Append(const char c)
virtual int GetPrecedence()=0
Use of the square root of -2 in a syntax tree.
void Attach(SyntaxNode *node)
virtual ReductionType GetReductionType()
ReductionType GetReductionType()
Number * GetValue() const
void Detach(SyntaxNode *node)
Base class for all statements in a syntax tree.
Base class for all nodes in a syntax tree.
NumericValueNode(Number *value)
void Replace(SyntaxNode *n, SyntaxNode *x)
Variable(const char *name)
void AssignValue(Number *value)
void ClearBuffer()
Release memory in buffer.
Use of PI in a syntax tree.
Variable * InsertTemporaryVariable(Variable *variable)
void Append(const char *source)
Variable * GetVariable(const char *name) const
virtual Number * Clone()=0
A list of user defined variables.
virtual const char * GetText(Number *number)=0
char * ListDefinitions() const
CharBuffer()
Initialize without allocating memory.
bool StrIsEqual(const char *s1, const char *s2)
Compare two null terminated strings to each other.
ExpressionNode(Number *value)
void AssignValue(Number *value) const
void Detach(SyntaxNode *node)
VariableNode(Variable *variable)
ReductionType GetReductionType()
Variable * CreateVariable(const char *name)
Represent a real number with 15 significant digits.
Variable * GetFirstVariable() const
void Attach(SyntaxNode *node)
void ReplaceWith(Number *value)
Statement to list all user defined variables.
Represent a complex number with 2 components of 15 significant digits.
class VariableList * Variables
Use of a variable in a syntax tree.
Use of a numeric value in a syntax tree.
int StrLen(const char *string)
Get the length of a null terminated string.
ComplexNumber(double real, double imag)
struct Number * GetLastResult() const
virtual int GetDefaultPrecedence()=0
void RemoveTemporaryVariable()
void ClearAndCopy(const char *source)
Release memory, allocate and copy source.
void Replace(SyntaxNode *n, SyntaxNode *x)
Base class for all nodes related to mathematical expressions.
unsigned int AllocAndCopy(char **destination, const char *source)
Allocate memory and copy a string into the array.
char * ListContent(bool cmdFormat) const
class NumeralSystem * Input
Encapsulate an character array which can be used as a string.
void EnsureSize(unsigned int size)
Ensure a memory block of specified size is allocated.
ReductionType GetReductionType()
friend bool VariableList::Delete(const char *name)
Use of Euler's number in a syntax tree.
class NumeralSystem * Output
Use of last result in a syntax tree.