expr.h

Go to the documentation of this file.
00001 #ifndef __EXPR_H__
00002 #define __EXPR_H__
00003 
00004 /*
00005  Copyright (c) 2006-2010 Trevor Williams
00006 
00007  This program is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by the Free Software
00009  Foundation; either version 2 of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00012  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00013  See the GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License along with this program;
00016  if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00026 #include <stdio.h>
00027 
00028 #include "defines.h"
00029 
00030 
00032 void expression_create_nba(
00033   expression* expr,
00034   vsignal*    lhs_sig,
00035   vector*     rhs_vec
00036 );
00037 
00039 expression* expression_is_nba_lhs(
00040   expression* exp
00041 );
00042 
00044 expression* expression_create(
00045   /*@null@*/ expression*  right,
00046   /*@null@*/ expression*  left,
00047              exp_op_type  op,
00048              bool         lhs,
00049              int          id,
00050              int          line,
00051              unsigned int first,
00052              unsigned int last,
00053              bool         data
00054 );
00055 
00057 void expression_set_value( expression* exp, vsignal* sig, func_unit* funit );
00058 
00060 void expression_set_signed( expression* exp );
00061 
00063 void expression_resize( expression* expr, func_unit* funit, bool recursive, bool alloc );
00064 
00066 int expression_get_id( expression* expr, bool parse_mode );
00067 
00069 expression* expression_get_first_line_expr( expression* expr );
00070 
00072 expression* expression_get_last_line_expr( expression* expr );
00073 
00075 unsigned int expression_get_curr_dimension( expression* expr );
00076 
00078 void expression_find_rhs_sigs( expression* expr, str_link** head, str_link** tail );
00079 
00081 expression* expression_find_uline_id( expression* expr, int ulid );
00082 
00084 bool expression_find_expr( expression* root, expression* expr );
00085 
00087 bool expression_contains_expr_calling_stmt( expression* expr, statement* stmt );
00088 
00090 statement* expression_get_root_statement( expression* exp );
00091 
00093 void expression_assign_expr_ids( expression* root, func_unit* funit );
00094 
00096 void expression_db_write( expression* expr, FILE* file, bool parse_mode, bool ids_issued );
00097 
00099 void expression_db_write_tree( expression* root, FILE* file );
00100 
00102 void expression_db_read( char** line, /*@null@*/func_unit* curr_mod, bool eval );
00103 
00105 void expression_db_merge(
00106   expression* base,
00107   char**      line,
00108   bool        same
00109 );
00110 
00112 void expression_merge(
00113   expression* base,
00114   expression* other
00115 );
00116 
00118 const char* expression_string_op( int op );
00119 
00121 char* expression_string( expression* exp );
00122 
00124 void expression_display( expression* expr );
00125 
00127 bool expression_operate( expression* expr, thread* thr, const sim_time* time );
00128 
00130 void expression_operate_recursively( expression* expr, func_unit* funit, bool sizing );
00131 
00133 bool expression_is_static_only( expression* expr );
00134 
00136 bool expression_is_bit_select( expression* expr );
00137 
00139 bool expression_is_in_rassign( expression* expr );
00140 
00142 bool expression_is_last_select( expression* expr );
00143 
00145 void expression_set_assigned( expression* expr );
00146 
00148 void expression_set_changed( expression* expr );
00149 
00151 void expression_dealloc( expression* expr, bool exp_only );
00152 
00153 #endif
00154 
Generated on Sun Nov 21 00:55:35 2010 for Covered by  doxygen 1.6.3