Example #1
0
        /// <summary>
        /// The main entry point.
        /// </summary>
        /// <param name="args">Program arguments.</param>
        static void Main(string[] args)
        {
            // Input folder                // ..\..\..\..\..\Input
            string         codeDirectory;
            string         testDirectory;
            string         yasmPath;    // ..\..\..\Assembler\yasm
            IList <string> files = ReadArguments(args, out codeDirectory, out testDirectory, out yasmPath);

            if (files == null)
            {
                return;
            }

            var specFactoryDispenser = new SpecFactoryDispenser();

            specFactoryDispenser.Register("x86", new X86SpecFactory());
            interpreter     = new ScriptInterpreter(new ScriptTokenizer(), specFactoryDispenser);
            writerDispenser = new SpecWriterDispenser();
            writerDispenser.Register("x86", new X86SpecWriter(yasmPath));

            foreach (string file in files)
            {
                Execute(file, codeDirectory, testDirectory);
            }

            Console.WriteLine("All done!");
            //Console.ReadLine();
        }
Example #2
0
        /// <summary>
        /// The main entry point.
        /// </summary>
        /// <param name="args">Program arguments.</param>
        static void Main(string[] args)
        {
            // Input folder                // ..\..\..\..\..\Input
            string codeDirectory;
            string testDirectory;
            string yasmPath;            // ..\..\..\Assembler\yasm
            IList<string> files = ReadArguments(args, out codeDirectory, out testDirectory, out yasmPath);
            if (files == null)
                return;

            var specFactoryDispenser = new SpecFactoryDispenser();
            specFactoryDispenser.Register("x86", new X86SpecFactory());
            interpreter = new ScriptInterpreter(new ScriptTokenizer(), specFactoryDispenser);
            writerDispenser = new SpecWriterDispenser();
            writerDispenser.Register("x86", new X86SpecWriter(yasmPath));

            foreach (string file in files)
            {
                Execute(file, codeDirectory, testDirectory);
            }

            Console.WriteLine("All done!");
            //Console.ReadLine();
        }