|
amath
1.8.5
Simple command line calculator
|
Evaluate arithmetic expression. More...
#include <eval.h>


Public Member Functions | |
| EvalStatement (ExpressionNode *expression) | |
| ~EvalStatement () | |
| char * | Execute () |
| SyntaxNode * | GetNext () |
| void | Attach (SyntaxNode *node) |
| void | Detach (SyntaxNode *node) |
| void | Replace (SyntaxNode *n, SyntaxNode *x) |
Public Member Functions inherited from StatementNode | |
| StatementNode () | |
| StatementNode (const char *text) | |
| virtual | ~StatementNode () |
| NodeType | GetNodeType () |
| virtual char * | GetTextCode () |
Public Member Functions inherited from SyntaxNode | |
| SyntaxNode () | |
| virtual | ~SyntaxNode () |
| void | SetFirstNode () |
| bool | GetFirstNode () const |
| SyntaxNode * | GetParent () const |
| void | SetParent (SyntaxNode *node) |
| virtual ReductionType | GetReductionType () |
| virtual void | ResetIterator () |
Private Attributes | |
| ExpressionNode * | expression |
Additional Inherited Members | |
Protected Attributes inherited from StatementNode | |
| char * | statementText |
Protected Attributes inherited from SyntaxNode | |
| CharBuffer * | output |
| SyntaxNode * | parent |
| SyntaxNode * | iterator |
| bool | leftBottom |
|
explicit |
Definition at line 35 of file eval.cpp.
References expression, and StatementNode::StatementNode().
Referenced by Parser::ParseEvaluation(), and Parser::ParseStatement().


| EvalStatement::~EvalStatement | ( | ) |
|
virtual |
Reimplemented from StatementNode.
Definition at line 83 of file eval.cpp.
References expression, and SyntaxNode::SetParent().

|
virtual |
|
virtual |
Implements StatementNode.
Definition at line 48 of file eval.cpp.
References CharBuffer::Append(), Number::Clone(), CharBuffer::Empty(), CharBuffer::EnsureSize(), ExpressionNode::Evaluate(), expression, CharBuffer::GetString(), NumeralSystem::GetText(), ExpressionNode::GetText(), Program::Output, SyntaxNode::output, Program::SetLastResult(), and StrLen().

|
virtual |
Reimplemented from StatementNode.
Definition at line 72 of file eval.cpp.
References expression, and SyntaxNode::iterator.
|
virtual |
|
private |
Definition at line 52 of file eval.h.
Referenced by Attach(), Detach(), EvalStatement(), Execute(), GetNext(), Replace(), and ~EvalStatement().