Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // var testSkaner = new Skaner("++--/\t\n/-");
            //var testSkaner = new Skaner("asdf");
            string fileInput;
            string fileOutput;

            if (args.Length < 2)
            {
                fileInput  = @"C:\Users\Natalia\Documents\Skaner\SQLSkaner\SQLSkaner\testFile.sql";
                fileOutput = @"C:\Users\Natalia\Documents\Skaner\SQLSkaner\SQLSkaner\SkanerCsResult.html";
            }
            {
                fileInput  = args[0];
                fileOutput = args[1];
            }

            var textFromFile = ReadFromFile(fileInput);
            var testSkaner   = new Skaner(textFromFile);

            try
            {
                var result = testSkaner.TokenizeInput();
                PrintResults(result);
                var text = WrapTokenizedResult(result);
                File.WriteAllText(fileOutput, text);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var testSkaner = new Skaner("++--/ \t\n/-");

            try
            {
                var result = testSkaner.TokenizeInput();
                PrintResults(result);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
            Console.ReadKey();
        }