Example #1
0
        public bool doTest()
        {
            ReqDisplay.title("Requirement #10b");
            ReqDisplay.message("Testing token extraction");

            result = FileUtils.fileLines(fileSpec1);
            if (!result)
            {
                return(false);
            }

            Lexer.Toker toker = new Lexer.Toker();
            toker.doReturnComments = true;
            toker.open(fileSpec1);
            List <Token> tokList = new List <Token>();

            while (!toker.isDone())
            {
                Token tok = toker.getTok();
                if (tok == "\n")
                {
                    tok = "\\n";
                }
                if (tok == "\r")
                {
                    tok = "\\r";
                }
                tokList.Add(tok);
            }
            ReqDisplay.showList(tokList, "Tokens:");
            return(result);
        }