38 #include <util/visitors/array_use.hpp>
39 #include <util/visitors/eval_init_exp.hpp>
40 #include <util/visitors/discrete_assignment.hpp>
49 : _std(), _class(nullptr), _father_class(nullptr), _initialCode(false), _classModification(false), _compositionElement(false)
104 AST_Element_ImportClause i = x->getAsImportClause();
107 AST_Element_Component c = x->getAsComponent();
109 AST_DeclarationListReverseIterator it;
110 AST_DeclarationList dl = c->nameList();
118 AST_ExpressionListIterator elistit;
119 foreach (elistit, elist) {
131 }
else if (c->isString()) {
142 AST_Class c = x->getAsClassWrapper()->getClass();
149 if (x->modificationType() ==
MODASSIGN) {
152 if (x->modificationType() ==
MODCLASS) {
159 if (x->modificationType() ==
MODCLASS) {
169 AST_EquationListIterator eqs_it;
170 foreach (eqs_it, eqs) {
181 AST_EquationList for_eqs = for_eq->equationList();
182 AST_EquationListIterator eqs_it;
185 foreach (eqs_it, for_eqs) {
192 if (!when_stms->empty()) {
196 if (!split_for_eqs->empty()) {
197 AST_ForIndexList fil = for_eq->forIndexList();
198 AST_ForIndexListIterator it;
205 return when_stms->empty();
212 AST_Equation_ElseList else_when_eqs = when_eq->equationElseWhen();
213 AST_Equation_ElseListIterator else_when_eqs_it;
214 foreach (else_when_eqs_it, else_when_eqs) {
216 AST_StatementList current_else_when_stms =
getStatementList(eq_else_when->equations());
217 AST_Statement_Else add_stm_else =
newAST_Statement_Else(eq_else_when->condition(), current_else_when_stms);
225 AST_Statement stm =
nullptr;
226 if (eq->equationType() ==
EQFOR) {
228 }
else if (eq->equationType() ==
EQWHEN) {
238 AST_Statement stm =
nullptr;
240 AST_Equation_Equality eqe = x->getAsEquality();
241 AST_Expression_ComponentReference lhs = eqe->left()->getAsComponentReference();
243 }
else if (x->equationType() ==
EQCALL) {
244 AST_Equation_Call eq_call = x->getAsCall();
245 AST_Expression call = eq_call->call();
246 if (call->expressionType() ==
EXPCALL) {
247 AST_Expression_Call exp_call = call->getAsCall();
253 }
else if (x->equationType() ==
EQFOR) {
254 AST_Equation_For for_eq = x->getAsFor();
257 }
else if (x->equationType() ==
EQIF) {
258 AST_Equation_If if_eq = x->getAsIf();
262 AST_Equation_ElseList else_if_eqs = if_eq->equationElseIf();
263 AST_Equation_ElseListIterator else_if_eqs_it;
264 foreach (else_if_eqs_it, else_if_eqs) {
266 AST_StatementList current_else_if_stms =
getStatementList(eq_else_if->equations());
267 AST_Statement_Else add_stm_else =
newAST_Statement_Else(eq_else_if->condition(), current_else_if_stms);
284 if (x->equationType() ==
EQFOR) {
285 AST_ForIndexList fil = x->getAsFor()->forIndexList();
286 AST_ForIndexListIterator it;
291 AST_Equation_Equality eqe = x->getAsEquality();
292 DiscreteAssignment da;
293 da.apply(eqe->left());
295 au.apply(eqe->left());
296 au.apply(eqe->right());
314 AST_Argument_Modification am = x->getAsModification();
323 AST_ForIndexList fil = for_stm->forIndexList();
324 AST_ForIndexListIterator it;
328 AST_StatementList stms = for_stm->statements();
329 AST_StatementListIterator stm_it;
330 foreach (stm_it, stms) {
335 AST_StatementList when_stms =
current_element(stm_it)->getAsWhen()->statements();
336 AST_StatementListIterator when_stm_it;
337 foreach (when_stm_it, when_stms) {
348 if (x->statementType() ==
STFOR) {
351 StatementArrayUse au;
360 AST_StatementList stl = x->statements();
361 AST_StatementListIterator sti;