コード例 #1
0
        public static void condition4(string completepath, ITokCollection semiexp)
        {
            StringBuilder req = new StringBuilder();

            req.Append(" \n ///////// Requirement  4 and Requirement 5   ////////////////////");
            req.Append("\n - The project contains Tokenizer package that declares and defines a Toker class that implements the State Pattern with derived classes \n for collecting the following token types:.");
            req.Append("\n -alphanumeric tokens");
            req.Append("\n - punctuator tokens");
            req.Append("\n - Special single char and Double Special Char");
            req.Append("\n - Single Line Comments");
            req.Append("\n - Multi Line Comments");
            req.Append("\n - Double Quotes and Strings");
            Console.Write(req);
            if (!semiexp.open(completepath))
            {
                Console.WriteLine("\n Cannot open {0}\n ", completepath);
            }
            else
            {
                Console.Write("\n Currently processing file: {0}", completepath);
                try
                {
                    List <Token> tokenList = semiexp.getTokens();
                }
                catch (Exception e)
                {
                    Console.Write("Exception occurred:'{0}'", e);
                }
            }
        }
コード例 #2
0
        public static void condition5(string completepath, ITokCollection semiexp)
        {
            StringBuilder req = new StringBuilder();

            req.Append(" \n -///////// Requirement  6 , Requirement 7 and Requirement 8  ////////////////////");
            req.Append(" \n -The project provides provide a SemiExpression package containing a class SemiExp used to retrieve collections \n of tokens by calling Toker::getTok() repeatedly until SemiExpression termination condition");
            req.Append("\n The project provides rules to handle special termination characters in the for loop");
            Console.Write(req);
            Console.Write("\n");
            if (!semiexp.open(completepath))
            {
                Console.Write("\n Unable to open {0}\n", completepath);
            }
            else
            {
                Console.Write("\n Currently processing file: {0}", completepath);
                try
                {
                    semiexp.get();
                }
                catch (Exception e)
                {
                    Console.Write("Exception occurred:'{0}'", e);
                }
            }
        }