예제 #1
0
        public static NodeLinkedList compile(LinkedListNode<Token> firstToken)
        {
            CompiledStatement cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken);
            Compiled = cs.compile(ref firstToken);
            while (firstToken != null)
            {
                cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken);
                NodeLinkedList nll = cs.compile(ref firstToken);
                Compiled.Add(nll);
            }
            ActionNode a = Compiled.First;
            while (a != null)
            {
                Console.WriteLine(a.GetType());
                a = a.Next;
            }

            return Compiled;
        }
예제 #2
0
        public static NodeLinkedList compile(LinkedListNode <Token> firstToken)
        {
            CompiledStatement cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken);

            Compiled = cs.compile(ref firstToken);
            while (firstToken != null)
            {
                cs = CompilerFactory.Instance.CreateCompiledStatement(firstToken);
                NodeLinkedList nll = cs.compile(ref firstToken);
                Compiled.Add(nll);
            }
            ActionNode a = Compiled.First;

            while (a != null)
            {
                Console.WriteLine(a.GetType());
                a = a.Next;
            }

            return(Compiled);
        }