Exemple #1
0
 public override void fill(MemMapper MM)
 {
     Col_in  = MM.get(CH_in);
     Col_out = MM.get(CH_out);
 }
Exemple #2
0
        public static void Test1()
        {
            //LexxAndRun( ".*foo -> x <- y  -> z " );
            Console.WriteLine(LexxAndParse(".*foo", MG.MemA));
            Console.WriteLine(LexxAndParse(".*foo -> x ", MG.MemAVT));
            Console.WriteLine(LexxAndParse(".*foo -> x ", MGRX.MemAVT_RX));
            Console.WriteLine(LexxAndParse("..str", MGRX.MemAVT_RX));
            Console.WriteLine(LexxAndParse("..str -> foo", MGRX.MemAVT_RX));

            Console.WriteLine(LexxAndParse("..str -> foo", TestMG1.TestStartRX));
            Console.WriteLine("----------- whoooo ------- ");

            Console.WriteLine(LexxAndParse("  <- $XX ", MG.SingleAssign));
            Console.WriteLine(LexxAndParse("  <- $XX -> a -> b ", MG.AssignVT));

            Console.WriteLine(LexxAndParse(" .*foo -> decl1 <- $ARG -> decl2 ", TestMG1.TestStart));


            // -----------------------------------------------------------------

            var MM            = new MemMapper();
            var dollar_arg_CH = new TypedSingleCH <int>();

            // Method I: hack column entries into MM directly
            ColumnSingle <int> dollar_arg_Column = (ColumnSingle <int>)dollar_arg_CH.SpawnColumn();       // todo: maybe provide SpawnColumnT that "kinda-overloads" on the return type

            MM.D[dollar_arg_CH] = dollar_arg_Column;


            dollar_arg_Column.AddVal(3, null);
            dollar_arg_Column.AddVal(4, null);

            // Method II: abuse MemMapper for column creation
            ColumnSingle <TestcasesLHSType> LHS_column;

            LHS_column = MM.get(DummyInstances.TestcasesLHSsingletonTypedCH);                             // TypedSingle<DummyType>

            LHS_column.AddVal(new TestcasesLHSType(), null);
            LHS_column.AddVal(new TestcasesLHSType(), null);
            LHS_column.AddVal(new TestcasesLHSType(), null);

            CH_closedScope scope = new CH_closedScope();

            scope = scope.decl("ARG", dollar_arg_CH);

            CH_closedScope out_scope;



            var TR_LHS = new TranslateLHS {
                preCH_LHS = new adapter_preCH(DummyInstances.TestcasesLHSsingletonTypedCH),
                scope     = scope
            };

            Console.WriteLine("in -> " + LHS_column);
            Column res = Evaluate.Eval_incomplete_tolerant(" ..intMem1 -> decl1 <- $ARG -> decl2 ", DummyInstances.GE_TestStart, TR_LHS, MM, out out_scope);

            foreach (var s in ColumnChainPrttS(
                         res,
                         CH => MM.D[CH]
                         ).Reverse())
            {
                Console.WriteLine(s);
            }
        }
Exemple #3
0
 public override void fill(MemMapper MM)
 {
     args_Column = MM.get(args_CH);
     out_Column  = MM.get(out_CH);
 }
Exemple #4
0
 public override void fill(MemMapper MM)
 {
     lhs_Column = MM.getGen(lhs_CH);
     out_Column = MM.get(out_CH);
 }
Exemple #5
0
 public override void fill(MemMapper MM)
 {
     //origCol = MM.get(origCH);
     lhsCol  = MM.get(lhsCH);
     out_Col = MM.get(CH_out);
 }
Exemple #6
0
 public override void fill(MemMapper MM)
 {
     LHS_Column        = MM.getGen(LHS_CH);
     referenced_Column = MM.get(referenced_CH);
     out_Column        = MM.get(CH_out);
 }
Exemple #7
0
 public override void fill(MemMapper MM)
 {
     Col_in  = MM.get(CH_in);
     Col_arg = MM.get(CH_arg);
     Col_res = MM.get(CH_res);
 }