Exemplo n.º 1
0
        // ------< Get all the tokens to pass it to semiexpression.>--------------------

        public Token GetSemi(Toker toker)
        {
            Token tok = null;

            while (!toker.isDone())
            {
                tok = toker.getTok();
                Console.Write("\n -- line#{0, 4} : {1}", toker.lineCount(), tok);
                return(tok);
            }
            toker.close();
            return(tok);
        }
Exemplo n.º 2
0
		static bool testToker(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;
			}
			else
			{
				Console.Write("\n  processing file: {0}", fqf);
			}
			while (!toker.isDone())
			{
				Token tok = toker.getTok();
				Console.Write("\n -- line#{0, 4} : {1}", toker.lineCount(), tok);
			}
			toker.close();
			return true;
		}