Changeset 4d0d14f in OpenModelica
- Timestamp:
- 2017-03-14T14:59:47+01:00 (7 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- cfa55d7
- Parents:
- 4124ebe8
- git-author:
- Per Östlund <per.ostlund@…> (03/14/17 14:59:47)
- git-committer:
- hudson <openmodelica@…> (03/14/17 14:59:47)
- Location:
- Compiler/NFFrontEnd
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/NFFrontEnd/NFBinding.mo
r4c362d1e r4d0d14f 122 122 end typedExp; 123 123 124 function variability 125 input Binding binding; 126 output DAE.Const var; 127 algorithm 128 var := match binding 129 case TYPED_BINDING() then binding.variability; 130 else DAE.Const.C_UNKNOWN(); 131 end match; 132 end variability; 133 124 134 function getInfo 125 135 input Binding binding; … … 133 143 end match; 134 144 end getInfo; 145 146 function getType 147 input Binding binding; 148 output Type ty; 149 algorithm 150 TYPED_BINDING(bindingType = ty) := binding; 151 end getType; 135 152 136 153 function isEach -
Compiler/NFFrontEnd/NFCeval.mo
r4c362d1e r4d0d14f 64 64 list<Expression> expl = {}; 65 65 Call call; 66 Component comp; 66 67 67 68 case Expression.CREF(cref=ComponentRef.CREF(node=c as InstNode.COMPONENT_NODE())) -
Compiler/NFFrontEnd/NFComponent.mo
r4c362d1e r4d0d14f 113 113 end TYPED_COMPONENT; 114 114 115 record ITERATOR 116 Type ty; 117 Binding binding; 118 end ITERATOR; 119 115 120 function classInstance 116 121 input Component component; … … 176 181 case TYPED_COMPONENT() then component.ty; 177 182 case UNTYPED_COMPONENT() then Class.getType(InstNode.getClass(component.classInst)); 183 case ITERATOR() then component.ty; 178 184 else Type.UNKNOWN(); 179 185 end match; … … 193 199 then 194 200 component; 201 202 case ITERATOR() 203 algorithm 204 component.ty := ty; 205 then 206 component; 207 195 208 end match; 196 209 end setType; … … 202 215 isTyped := match component 203 216 case TYPED_COMPONENT() then true; 217 case ITERATOR(ty = Type.UNKNOWN()) then false; 218 case ITERATOR() then true; 204 219 else false; 205 220 end match; … … 219 234 (); 220 235 236 case ITERATOR(ty = Type.ARRAY(elementType = ty)) 237 algorithm 238 component.ty := ty; 239 then 240 (); 241 221 242 else (); 222 243 end match; … … 240 261 case UNTYPED_COMPONENT() then component.binding; 241 262 case TYPED_COMPONENT() then component.binding; 263 case ITERATOR() then component.binding; 242 264 end match; 243 265 end getBinding; … … 307 329 case TYPED_COMPONENT(attributes = Attributes.ATTRIBUTES(variability = variability)) then variability; 308 330 case UNTYPED_COMPONENT(attributes = Attributes.ATTRIBUTES(variability = variability)) then variability; 331 case ITERATOR() then DAE.VarKind.CONST(); 309 332 else fail(); 310 333 end match; -
Compiler/NFFrontEnd/NFComponentRef.mo
r64ce9d9 r4d0d14f 84 84 input ComponentRef cref; 85 85 output DAE.Const var; 86 protected87 DAE.VarKind var_kind;88 86 algorithm 89 87 var := match cref 90 88 case CREF() 91 algorithm 92 Component.Attributes.ATTRIBUTES(variability = var_kind) := 93 Component.getAttributes(InstNode.component(cref.node)); 94 then 95 match var_kind 89 then 90 match Component.variability(InstNode.component(cref.node)) 96 91 case DAE.VarKind.VARIABLE() then DAE.Const.C_VAR(); 97 92 case DAE.VarKind.DISCRETE() then DAE.Const.C_VAR(); -
Compiler/NFFrontEnd/NFEquation.mo
r4c362d1e r4d0d14f 35 35 import Expression = NFExpression; 36 36 import Type = NFType; 37 import NFInstNode.InstNode; 37 38 38 39 public uniontype Equation … … 56 57 57 58 record FOR 58 String name "The name of the iterator variable."; 59 Integer index "The index of the iterator variable."; 60 Type indexType "The type of the index/iterator variable."; 61 Option<Expression> range "The range expression to loop over."; 59 InstNode iterator; 62 60 list<Equation> body "The body of the for loop."; 63 61 SourceInfo info; -
Compiler/NFFrontEnd/NFFlatten.mo
r4c362d1e r4d0d14f 531 531 el :: elements; 532 532 533 case Equation.FOR()534 algorithm535 // flatten the equations536 (els1, funcs) := flattenEquations(eq.body, prefix, {}, funcs);537 538 // deal with the range539 if isSome(eq.range) then540 SOME(e) := eq.range;541 SOME(de) := DAEUtil.evaluateExp(Expression.toDAE(e), elements);542 range := match (de)543 case DAE.ARRAY(array = range) then range;544 case DAE.RANGE(_, DAE.ICONST(is), SOME(DAE.ICONST(step)), DAE.ICONST(ie))545 then List.map(ExpressionSimplify.simplifyRange(is, step, ie), DAEExpression.makeIntegerExp);546 case DAE.RANGE(_, DAE.ICONST(is), _, DAE.ICONST(ie))547 then if is <= ie548 then List.map(ExpressionSimplify.simplifyRange(is, 1, ie), DAEExpression.makeIntegerExp)549 else List.map(ExpressionSimplify.simplifyRange(is, -1, ie), DAEExpression.makeIntegerExp);550 end match;551 // replace index in elements552 for i in range loop553 els := DAEUtil.replaceCrefInDAEElements(els1, DAE.CREF_IDENT(eq.name, Type.toDAE(eq.indexType), {}), i);554 elements := listAppend(els, elements);555 end for;556 end if;557 then558 elements;533 // case Equation.FOR() 534 // algorithm 535 // // flatten the equations 536 // (els1, funcs) := flattenEquations(eq.body, prefix, {}, funcs); 537 // 538 // // deal with the range 539 // if isSome(eq.range) then 540 // SOME(e) := eq.range; 541 // SOME(de) := DAEUtil.evaluateExp(Expression.toDAE(e), elements); 542 // range := match (de) 543 // case DAE.ARRAY(array = range) then range; 544 // case DAE.RANGE(_, DAE.ICONST(is), SOME(DAE.ICONST(step)), DAE.ICONST(ie)) 545 // then List.map(ExpressionSimplify.simplifyRange(is, step, ie), DAEExpression.makeIntegerExp); 546 // case DAE.RANGE(_, DAE.ICONST(is), _, DAE.ICONST(ie)) 547 // then if is <= ie 548 // then List.map(ExpressionSimplify.simplifyRange(is, 1, ie), DAEExpression.makeIntegerExp) 549 // else List.map(ExpressionSimplify.simplifyRange(is, -1, ie), DAEExpression.makeIntegerExp); 550 // end match; 551 // // replace index in elements 552 // for i in range loop 553 // els := DAEUtil.replaceCrefInDAEElements(els1, DAE.CREF_IDENT(eq.name, Type.toDAE(eq.indexType), {}), i); 554 // elements := listAppend(els, elements); 555 // end for; 556 // end if; 557 // then 558 // elements; 559 559 560 560 case Equation.WHEN() … … 748 748 case Statement.FOR() 749 749 algorithm 750 // flatten the list of statements 751 (sts, funcs) := flattenStatements(alg.body, {}, funcs); 752 if isSome(alg.range) then 753 SOME(e) := alg.range; 754 de := Expression.toDAE(e); 755 else 756 de := DAE.SCONST("NO RANGE GIVEN TODO FIXME"); 757 end if; 758 then 759 DAE.STMT_FOR(Type.toDAE(alg.indexType), false, alg.name, alg.index, de, sts, ElementSource.createElementSource(alg.info)) :: stmts; 750 (stmt, funcs) := flattenForStatement(alg, funcs); 751 then 752 stmt :: stmts; 760 753 761 754 case Statement.IF() … … 919 912 Option<DAE.Statement> owhenStatement = NONE(); 920 913 algorithm 921 922 914 head :: rest := whenBranches; 923 915 cond1 := Expression.toDAE(Util.tuple21(head)); … … 926 918 927 919 for b in rest loop 928 cond2 := Expression.toDAE(Util.tuple21(b));920 cond2 := Expression.toDAE(Util.tuple21(b)); 929 921 (stmts2, funcs) := flattenStatements(Util.tuple22(b), {}, funcs); 930 922 whenStatement := DAE.STMT_WHEN(cond2, {}, false, stmts2, owhenStatement, ElementSource.createElementSource(info)); … … 934 926 whenStatement := DAE.STMT_WHEN(cond1, {}, false, stmts1, owhenStatement, ElementSource.createElementSource(info)); 935 927 end flattenWhenStatement; 928 929 function flattenForStatement 930 input Statement forStmt; 931 output DAE.Statement forDAE; 932 input output DAE.FunctionTree funcs; 933 protected 934 InstNode iterator; 935 Type ty; 936 Binding binding; 937 Expression range; 938 list<Statement> body; 939 list<DAE.Statement> dbody; 940 SourceInfo info; 941 algorithm 942 Statement.FOR(iterator = iterator, body = body, info = info) := forStmt; 943 944 (dbody, funcs) := flattenStatements(body, {}, funcs); 945 946 Component.ITERATOR(ty = ty, binding = binding) := InstNode.component(iterator); 947 SOME(range) := Binding.typedExp(binding); 948 949 forDAE := DAE.STMT_FOR(Type.toDAE(ty), Type.isArray(ty), 950 InstNode.name(iterator), 0, Expression.toDAE(range), dbody, 951 ElementSource.createElementSource(info)); 952 end flattenForStatement; 936 953 937 954 function applyExpPrefix -
Compiler/NFFrontEnd/NFInst.mo
r4c362d1e r4d0d14f 108 108 // instantiation to make sure that lookup is able to find the correct nodes. 109 109 instExpressions(inst_cls); 110 execStat("NFInst.inst Bindings("+ name +")");110 execStat("NFInst.instExpressions("+ name +")"); 111 111 112 112 // Type the class. … … 1374 1374 list<tuple<Expression, list<Equation>>> branches; 1375 1375 SourceInfo info; 1376 Binding binding; 1377 InstNode for_scope, iter; 1376 1378 1377 1379 case SCode.EEquation.EQ_EQUALS(info = info) … … 1391 1393 case SCode.EEquation.EQ_FOR(info = info) 1392 1394 algorithm 1393 oexp := instExpOpt(scodeEq.range, scope, info); 1394 eql := instEEquations(scodeEq.eEquationLst, scope); 1395 then 1396 Equation.FOR(scodeEq.index, 0, Type.UNKNOWN(), oexp, eql, info); 1395 binding := Binding.fromAbsyn(scodeEq.range, SCode.NOT_EACH(), 0, scope, info); 1396 binding := instBinding(binding); 1397 1398 (for_scope, iter) := addIteratorToScope(scodeEq.index, binding, info, scope); 1399 eql := instEEquations(scodeEq.eEquationLst, for_scope); 1400 then 1401 Equation.FOR(iter, eql, info); 1397 1402 1398 1403 case SCode.EEquation.EQ_IF(info = info) … … 1504 1509 list<tuple<Expression, list<Statement>>> branches; 1505 1510 SourceInfo info; 1511 Binding binding; 1512 InstNode for_scope, iter; 1506 1513 1507 1514 case SCode.Statement.ALG_ASSIGN(info = info) … … 1514 1521 case SCode.Statement.ALG_FOR(info = info) 1515 1522 algorithm 1516 oexp := instExpOpt(scodeStmt.range, scope, info); 1517 stmtl := instStatements(scodeStmt.forBody, scope); 1518 then 1519 Statement.FOR(scodeStmt.index, 0, Type.UNKNOWN(), oexp, stmtl, info); 1523 binding := Binding.fromAbsyn(scodeStmt.range, SCode.NOT_EACH(), 0, scope, info); 1524 binding := instBinding(binding); 1525 1526 (for_scope, iter) := addIteratorToScope(scodeStmt.index, binding, info, scope); 1527 stmtl := instStatements(scodeStmt.forBody, for_scope); 1528 then 1529 Statement.FOR(iter, stmtl, info); 1520 1530 1521 1531 case SCode.Statement.ALG_IF(info = info) … … 1596 1606 end instStatement; 1597 1607 1608 function addIteratorToScope 1609 input String name; 1610 input Binding binding; 1611 input SourceInfo info; 1612 input output InstNode scope; 1613 output InstNode iterator; 1614 protected 1615 Component iter_comp; 1616 SCode.Element elem; 1617 algorithm 1618 scope := InstNode.openImplicitScope(scope); 1619 elem := SCode.Element.COMPONENT(name, SCode.defaultPrefixes, 1620 SCode.defaultVarAttr, Absyn.TypeSpec.TPATH(Absyn.Path.IDENT("$dummy"), NONE()), 1621 SCode.NOMOD(), SCode.noComment, NONE(), info); 1622 iter_comp := Component.ITERATOR(Type.UNKNOWN(), binding); 1623 iterator := InstNode.fromComponent(name, iter_comp, elem, scope); 1624 scope := InstNode.addIterator(iterator, scope); 1625 end addIteratorToScope; 1626 1598 1627 annotation(__OpenModelica_Interface="frontend"); 1599 1628 end NFInst; -
Compiler/NFFrontEnd/NFInstNode.mo
r64ce9d9 r4d0d14f 109 109 end REF_NODE; 110 110 111 record IMPLICIT_SCOPE 112 InstNode parentScope; 113 list<InstNode> locals; 114 end IMPLICIT_SCOPE; 115 111 116 record EMPTY_NODE end EMPTY_NODE; 112 117 … … 240 245 end isEmpty; 241 246 247 function isImplicit 248 input InstNode node; 249 output Boolean isImplicit; 250 algorithm 251 isImplicit := match node 252 case IMPLICIT_SCOPE() then true; 253 else false; 254 end match; 255 end isImplicit; 256 242 257 function name 243 258 input InstNode node; … … 247 262 case CLASS_NODE() then node.name; 248 263 case COMPONENT_NODE() then node.name; 264 // For bug catching, these names should never be used. 265 case REF_NODE() then "$ref" + String(node.index); 266 case IMPLICIT_SCOPE() then "$implicit"; 267 case EMPTY_NODE() then "$empty"; 249 268 end match; 250 269 end name; … … 276 295 case CLASS_NODE() then node.parentScope; 277 296 case COMPONENT_NODE() then node.parent; 297 case IMPLICIT_SCOPE() then node.parentScope; 278 298 end match; 279 299 end parent; … … 323 343 algorithm 324 344 node.parent := parent; 345 then 346 (); 347 348 case IMPLICIT_SCOPE() 349 algorithm 350 node.parentScope := parent; 325 351 then 326 352 (); … … 577 603 578 604 case COMPONENT_NODE(parent = EMPTY_NODE()) then accumScopes; 579 580 605 case COMPONENT_NODE() then scopeList(node.parent, node :: accumScopes); 606 case IMPLICIT_SCOPE() then scopeList(node.parentScope, accumScopes); 581 607 end match; 582 608 end scopeList; … … 660 686 end match; 661 687 end cacheAddFunc; 688 689 function openImplicitScope 690 input output InstNode scope; 691 algorithm 692 scope := match scope 693 case IMPLICIT_SCOPE() then scope; 694 else IMPLICIT_SCOPE(scope, {}); 695 end match; 696 end openImplicitScope; 697 698 function addIterator 699 input InstNode iterator; 700 input output InstNode scope; 701 algorithm 702 scope := match scope 703 case IMPLICIT_SCOPE() then IMPLICIT_SCOPE(scope, iterator :: scope.locals); 704 end match; 705 end addIterator; 662 706 end InstNode; 663 707 -
Compiler/NFFrontEnd/NFLookup.mo
r3532cb45 r4d0d14f 432 432 for i in 1:Global.recursionDepthLimit loop 433 433 try 434 node := match foundScope 435 case InstNode.IMPLICIT_SCOPE() 436 then lookupIterator(name, foundScope.locals); 437 case InstNode.CLASS_NODE() 438 then Class.lookupElement(name, InstNode.getClass(foundScope)); 439 case InstNode.COMPONENT_NODE() 440 then Class.lookupElement(name, InstNode.getClass(foundScope)); 441 end match; 442 434 443 // Check if the cref can be found in the current scope. 435 cls := InstNode.getClass(foundScope);436 node := Class.lookupElement(name, cls);444 //cls := InstNode.getClass(foundScope); 445 //node := Class.lookupElement(name, cls); 437 446 438 447 // We found a node, return it. … … 449 458 end lookupSimpleCref; 450 459 460 function lookupIterator 461 input String name; 462 input list<InstNode> iterators; 463 output InstNode iterator; 464 algorithm 465 for i in iterators loop 466 if name == InstNode.name(i) then 467 iterator := i; 468 return; 469 end if; 470 end for; 471 472 fail(); 473 end lookupIterator; 474 451 475 function lookupCrefInNode 452 476 input Absyn.ComponentRef cref; -
Compiler/NFFrontEnd/NFStatement.mo
r4c362d1e r4d0d14f 35 35 import Type = NFType; 36 36 import Expression = NFExpression; 37 import NFInstNode.InstNode; 37 38 38 39 public uniontype Statement … … 50 51 51 52 record FOR 52 String name "The name of the iterator variable."; 53 Integer index "The index of the scope of the iterator variable."; 54 Type indexType "The type of the index/iterator variable."; 55 Option<Expression> range "The range expression to loop over."; 53 InstNode iterator; 56 54 list<Statement> body "The body of the for loop."; 57 55 SourceInfo info; -
Compiler/NFFrontEnd/NFType.mo
r4c362d1e r4d0d14f 171 171 end match; 172 172 end isArray; 173 174 function isVector 175 "Return whether the type is a vector type or not, i.e. a 1-dimensional array." 176 input Type ty; 177 output Boolean isVector; 178 algorithm 179 isVector := match ty 180 case ARRAY(dimensions = {_}) then true; 181 else false; 182 end match; 183 end isVector; 173 184 174 185 function isEnumeration -
Compiler/NFFrontEnd/NFTyping.mo
r4c362d1e r4d0d14f 63 63 import Ceval = NFCeval; 64 64 import SimplifyExp = NFSimplifyExp; 65 import Subscript = NFSubscript; 65 66 66 67 public … … 149 150 end typeComponent; 150 151 152 function typeIterator 153 input InstNode iterator; 154 input InstNode scope; 155 input Boolean structural = false "If the iteration range must be a parameter expression or not."; 156 protected 157 Component c = InstNode.component(iterator); 158 Binding binding; 159 Type ty; 160 algorithm 161 () := match c 162 case Component.ITERATOR(binding = Binding.UNTYPED_BINDING()) 163 algorithm 164 binding := typeBinding(c.binding, scope); 165 166 // If the iteration range is structural, it must be a parameter expression. 167 if structural and not Types.isParameterOrConstant(Binding.variability(binding)) then 168 Error.addSourceMessageAndFail(Error.NON_PARAMETER_ITERATOR_RANGE, 169 {Binding.toString(binding)}, InstNode.info(iterator)); 170 end if; 171 172 ty := Binding.getType(binding); 173 174 // The iteration range must be a vector expression. 175 if not Type.isVector(ty) then 176 Error.addSourceMessageAndFail(Error.FOR_EXPRESSION_TYPE_ERROR, 177 {Binding.toString(binding), Type.toString(ty)}, InstNode.info(iterator)); 178 end if; 179 180 // The type of the iterator is the element type of the range expression. 181 ty := Type.arrayElementType(ty); 182 c := Component.ITERATOR(ty, binding); 183 InstNode.updateComponent(c, iterator); 184 then 185 (); 186 187 case Component.ITERATOR(binding = Binding.UNBOUND()) 188 algorithm 189 assert(false, getInstanceName() + ": Implicit iteration ranges not yet implement"); 190 then 191 fail(); 192 193 else 194 algorithm 195 assert(false, getInstanceName() + " got non-iterator " + InstNode.name(iterator)); 196 then 197 fail(); 198 199 end match; 200 end typeIterator; 201 151 202 function typeDimensions 152 203 input output array<Dimension> dimensions; … … 484 535 ty := Component.getType(comp); 485 536 variability := ComponentRef.getVariability(cref); 486 exp := Expression.CREF(ComponentRef.setType(ty, cref)); 487 then 488 (exp, ty, variability); 537 cref.ty := ty; 538 cref.subscripts := typeSubscripts(cref.subscripts, scope, info); 539 then 540 (Expression.CREF(cref), ty, variability); 489 541 490 542 // A typename, e.g. Boolean or an enumeration type. … … 503 555 end match; 504 556 end typeCref; 557 558 function typeSubscripts 559 input list<Subscript> subscripts; 560 input InstNode scope; 561 input SourceInfo info; 562 output list<Subscript> typedSubs; 563 algorithm 564 typedSubs := list(typeSubscript(s, scope, info) for s in subscripts); 565 end typeSubscripts; 566 567 function typeSubscript 568 input output Subscript subscript; 569 input InstNode scope; 570 input SourceInfo info; 571 algorithm 572 subscript := match subscript 573 local 574 Expression e; 575 Type ty; 576 577 case Subscript.UNTYPED() 578 algorithm 579 (e, ty, _) := typeExp(subscript.exp, scope, info); 580 then 581 if Type.isArray(ty) then Subscript.SLICE(e) else Subscript.INDEX(e); 582 583 else subscript; 584 end match; 585 end typeSubscript; 505 586 506 587 function typeArray … … 619 700 eq := match eq 620 701 local 621 Option<Expression> ope1;622 702 Expression cond, e1, e2, e3; 623 Option<Type> opty1;624 703 Type ty1, ty2; 625 704 list<Equation> eqs1, body; 626 705 list<tuple<Expression, list<Equation>>> tybrs; 627 InstNode fakeComponent; 628 array<InstNode> components; 629 Class cls; 630 Integer index; 631 ClassTree.Tree elements; 706 InstNode iterator; 632 707 633 708 case Equation.EQUALITY() … … 645 720 Equation.CONNECT(e1, ty1, e2, ty2, eq.info); 646 721 647 case Equation.FOR() then eq; 648 //case Equation.FOR() 649 // algorithm 650 // ope1 := NONE(); 651 // if (isSome(eq.range)) then 652 // (e1, ty1) := typeExp(Util.getOption(eq.range), scope, eq.info); 653 // ty1 := Type.arrayElementType(ty1); 654 // ope1 := SOME(e1); 655 // end if; 656 // // we need to add the iterator to the component scope! 657 // fakeComponent := InstNode.newComponent( 658 // SCode.COMPONENT( 659 // eq.name, 660 // SCode.defaultPrefixes, 661 // SCode.defaultVarAttr, 662 // Absyn.TPATH(Absyn.IDENT("Integer"), NONE()), 663 // SCode.NOMOD(), 664 // SCode.COMMENT(NONE(), NONE()), 665 // NONE(), 666 // eq.info), scope); 667 // fakeComponent := Inst.instComponent(fakeComponent, scope, scope); 668 // fakeComponent := typeComponent(fakeComponent, scope); 669 // cls := InstNode.getClass(scope); 670 // components := Class.components(cls); 671 // index := arrayLength(components) + 1; 672 // components := listArray(listAppend(arrayList(components), {fakeComponent})); 673 // cls := Class.setComponents(components, cls); 674 // elements := Class.elements(cls); 675 // elements := ClassTree.add(elements, eq.name, 676 // ClassTree.Entry.COMPONENT(0, index), ClassTree.addConflictReplace); 677 // cls := Class.setElements(elements, cls); 678 // fakeComponent := InstNode.updateClass(cls, scope); 679 // eqs1 := list(typeEquation(beq, fakeComponent) for beq in eq.body); 680 // then 681 // Equation.FOR(eq.name, 1, ty1, ope1, eqs1, eq.info); 722 case Equation.FOR() 723 algorithm 724 typeIterator(eq.iterator, scope, true); 725 body := typeEquations(eq.body, scope); 726 then 727 Equation.FOR(eq.iterator, body, eq.info); 682 728 683 729 case Equation.IF() … … 758 804 st := match st 759 805 local 760 Option<Expression> ope1;761 806 Expression cond, e1, e2, e3; 762 Option<Type> opty1;763 807 Type ty1, ty2, ty3; 764 808 list<Statement> sts1, body; 765 809 list<tuple<Expression, list<Statement>>> tybrs; 810 InstNode iterator; 766 811 767 812 case Statement.ASSIGNMENT() … … 771 816 then 772 817 Statement.ASSIGNMENT(e1, e2, st.info); 818 819 case Statement.FOR() 820 algorithm 821 typeIterator(st.iterator, scope); 822 body := typeAlgorithm(st.body, scope); 823 then 824 Statement.FOR(st.iterator, body, st.info); 773 825 774 826 case Statement.IF()
Note: See TracChangeset
for help on using the changeset viewer.