25#ifndef MU_PARSER_BYTECODE_H
26#define MU_PARSER_BYTECODE_H
Bytecode implementation of the Math Parser.
void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
Add Strung function entry to the parser bytecode.
rpn_type m_vRPN
The actual rpn storage.
ParserByteCode & operator=(const ParserByteCode &a_ByteCode)
Assignment operator.
void ConstantFolding(ECmdCode a_Oprt)
void EnableOptimizer(bool bStat)
std::size_t GetMaxStackSize() const
void AddOp(ECmdCode a_Oprt)
Add an operator identifier to bytecode.
const SToken * GetBase() const
ParserToken< value_type, string_type > token_type
Token type for internal use only.
void ChangeVar(value_type *a_pOldVar, value_type *a_pNewVar, bool isVect)
Changes all old variable pointers to the new addresses. Will be used to compensate for different loca...
void Assign(const ParserByteCode &a_ByteCode)
Copy state of another object to this.
void AddVal(value_type a_fVal)
Add a Variable pointer to bytecode.
void AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
Add a bulk function to bytecode.
ParserByteCode()
Bytecode default constructor.
void clear()
Delete the bytecode.
std::size_t GetSize() const
Returns the number of entries in the bytecode.
void AddFun(generic_fun_type a_pFun, int a_iArgc, bool optimizeAway)
Add a function to the bytecode.
void AsciiDump()
Dump bytecode (for debugging only!).
void AddVar(value_type *a_pVar)
Add a Variable pointer to bytecode.
std::vector< SToken > rpn_type
Token vector for storing the RPN.
std::size_t m_iMaxStackSize
Maximum size needed for the stack.
unsigned m_iStackPos
Position in the Calculation array.
void Finalize()
Add end marker to bytecode.
void AddAssignOp(value_type *a_pVar)
Add an assignement operator.
void AddIfElse(ECmdCode a_Oprt)
This file contains standard definitions used by the parser.
This file defines the error class used by the parser.
This file contains the parser token definition.
Namespace for mathematical applications.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
@ cmUNKNOWN
uninitialized item
value_type(* generic_fun_type)()
Callback type used for functions without arguments.
struct mu::SToken::@11::@14 Fun
struct mu::SToken::@11::@13 Val
struct mu::SToken::@11::@15 Oprt