Exemple #1
0
        public bool testToker2(string path)
        {
            Toker toker = new Toker();

            string fqf = System.IO.Path.GetFullPath(path);

            if (!toker.open(fqf))
            {
                Console.Write("\n can't open {0}\n", fqf);
                return(false);
            }
            toker.setSpecialSingleChars(new List <string> {
                "<", ">"
            });
            toker.setSpecialCharPairs(new List <string> {
                "<<", "=="
            });

            while (!toker.isDone())
            {
                Token tok = toker.getTok();
                Console.Write("\n -- line#{0, 4} : {1}", toker.lineCount(), tok);
            }
            toker.close();

            return(true);
        }
 public bool setSpecialCharPairs(string scp)
 {
     toker.setSpecialCharPairs(scp);
     return(true);
 }