Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

c_expression Class Reference

Expression. More...

#include <c_expression.h>

Collaboration diagram for c_expression:

List of all members.

Public Member Functions

 c_expression (c_module *this_module, const string &exp, const string &debug_, c_micro_symbol_variable_mapping &symbols, const string &next_expression)
 Constructor.
 c_expression ()
 c_expression (const c_expression &orig)
virtual ~c_expression ()
 Destructor.
void add_inputs (vector< var_sym_index_t > &inputs)
 Adds all inputs to vector.
void assign (c_module *this_module, const string &exp, const string &debug_, c_micro_symbol_variable_mapping &symbols, const string &next_expression, const string &debug_prefix)
 Assigns expression.
void clean_up ()
 Call this before destruction.
instruct_id_t get_next_id ()
bool got_error ()
 Returns true if there is error.
c_expressionoperator= (const c_expression &orig)
void optimize_output (const vector< var_sym_index_t > &inputs)
 Optimizes output by removing result variables taht are not referenced as input.
bool perform (c_module *this_module, c_var_array *vars, c_micro_error *&error, var_sym_index_t &sym_return, stack< c_eval_iteration > &st, c_micro_symbol_table *symbols)
 Performs expression.

Public Attributes

string debug
 Debug string.
string next_exp
 Next expression.
var_sym_index_t result
 ID of resulting variable.

Private Member Functions

instruct_id_t add_micro (c_micro *instr)
 Adds a new microcode instruction.
void clear_microcode ()
 Clears and deallocates microcode vector.
bool update_conditional (c_module *this_module, c_micro_error *&error, c_micro_symbol_table *symbols, c_micro *micro)
 Updates result of shortened evaluation.

Private Attributes

map< instruct_id_t, c_micro * > microcode
 Microcode instructions.
instruct_id_t next_id
 Next instruction ID.
bool ok
 If it was parsed okay.

Friends

class c_micro_symbol_variable_mapping
class c_sub_exp_const
class c_sub_exp_eval_str
class c_sub_exp_func
class c_sub_exp_immediate_str
class c_sub_exp_index
class c_sub_exp_numeric_immediate
class c_sub_exp_oper
class c_sub_exp_oper_ternary
class c_sub_exp_oper_ternary_false
class c_sub_exp_oper_ternary_true
class c_sub_exp_parenthesis
class c_sub_exp_ternary_true_end_marker
class c_sub_exp_variable

Detailed Description

Expression.

Version:
2
Author:
VooDooMan
Date:
2005, 2006-03-22

Definition at line 69 of file c_expression.h.


The documentation for this class was generated from the following files:

Generated on Sat Aug 7 2010 15:28:50 for VooDoo cIRCle by doxygen 1.7.1

Get VooDoo cIRCle at SourceForge.net. Fast, secure and Free Open Source software downloads