public RG_EdgeTU_RX(MG.RG_EdgeNode rg_EdgeNode, preCH preCH_in) { var memANodeRX = (MGRX.MemANodeRX)rg_EdgeNode.memAVT.children[0]; // todo proper field in MemAVTNode - hard cast doubles as Assert memANodeRX.ACMembTypingCallback = () => preCH_in.PayT; // for now, and for lazyness: no extra TU_RX for MemARX var memA_preCH_out = new deferred_preCH( () => { return(new TTuple { isMulti = false, // todo PayT = SGA.MembType_Exact(preCH_in.PayT, memANodeRX.name) }); }, dataSrc: null // not used in RX-case ); // todo Assign creates a new Column ( thus distinct preCH ) in the properly translated version // the proper preCH out is that of AssignVT - but since types are identical, and that's all we care for here : this could simply be dropped, but i need the assignVTNode for scoping if (rg_EdgeNode.assignVT == null) { preCH_out = memA_preCH_out; } else { assignVTNode = new Assign_VBXTU(preCH_in, rg_EdgeNode.assignVT); preCH_out = assignVTNode.preCH_out; } }
public TestTR(TestMG1.MemA_andOptAssign startNode, preCH pre_LHS) { test_start_node = startNode; this.pre_LHS = pre_LHS; memaTR = new MemA_VBXTU(pre_LHS, startNode.memavt_node); assignTR = startNode.assignvt_node == null ? null : new Assign_VBXTU(memaTR.preCH_out, startNode.assignvt_node); }
public PrimitveStepTU_RX(preCH preCH_in, MGRX.PrimitiveStepNode prim_step_node) { // pretty fucky - copy and paste job from the nonRX variant - needed though to plug in the RX constructors for child TUs this.primtv_step_node = prim_step_node; // var primaryNN = primtv_step_node.children[0]; if (primaryNN is MG.SG_EdgeNode) { primaryTU = new SG_EdgeTU(preCH_in, (MG.SG_EdgeNode)primaryNN); primary_preCH_out = ((SG_EdgeTU)primaryTU).preCH_out; } else if (primaryNN is MG.MemANode) { var MemTU = new MemA_VBX_TU_RX(preCH_in, (MGRX.MemANodeRX)primaryNN); // type - patch I primaryTU = MemTU; primary_preCH_out = MemTU.preCH_out; } else if (primaryNN is MG.FilterNode) { var filterTU = new FilterTU(preCH_in, (MG.FilterNode)primaryNN); primaryTU = filterTU; primary_preCH_out = filterTU.preCH_out; } else if (primaryNN is MG.FanNode) { var fanTU = new FanTU(preCH_in, (MG.FanNode)primaryNN); primaryTU = fanTU; primary_preCH_out = fanTU.pRHS; } else { throw new Exception(); // grammar changed or parser bug } preCH current_preCH_out = primary_preCH_out; foreach (var asgn_node in primtv_step_node.assigns) { var asgn_TU = new Assign_VBXTU(current_preCH_out, asgn_node); assigns.Add(asgn_TU); current_preCH_out = asgn_TU.preCH_out; } preCH_out = current_preCH_out; }