Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            Console.Write("\n Testing Semi");
            Console.Write("\n ============");

            ITokenCollection semiExp = Factory.Create();

            string source = "../../../SemiExpression.cs";

            if (!semiExp.Open(source))
            {
                Console.Write("\n Cant't open");
                return;
            }

            FindClasses();

            //while (!semiExp.IsDone())
            //{
            //    semiExp.GetTokens();
            //    semiExp.Show();
            //}
        }
Ejemplo n.º 2
0
        public static void FindClasses()
        {
            string[]         classSignature = { "class", "{" };
            ITokenCollection semiExp        = Factory.Create();

            //string source = "../../../../Toker/Toker.cs";
            string source = "../../../SemiExpression.cs";

            if (!semiExp.Open(source))
            {
                Console.Write("\n Cant't open");
                return;
            }

            while (!semiExp.IsDone())
            {
                semiExp.GetTokens();
                if (semiExp.HasSequence(classSignature))
                {
                    semiExp.Show();
                }
            }
            Console.Write("\n-------------------------------------------------------------------\n");
        }