Пример #1
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                ShowHelp();
                return;
            }

            var command = args[0];

            if (command == "-d" && args.Length == 3)
            {
                var msnPath = args[1];
                var outPath = args[2];
                var fsm     = MsnFSMParser.ReadMission(msnPath);
                DisassembleTo(fsm, outPath);
            }
            else if (command == "-a" && args.Length == 4)
            {
                var inputTxtPath  = args[1];
                var inputMsnPath  = args[2];
                var outputMsnPath = args[3];
                Assemble(inputTxtPath, inputMsnPath, outputMsnPath);
            }
            else
            {
                ShowHelp();
            }
        }
Пример #2
0
        static void Assemble(string inputTxtPath, string inputMsnPath, string outputMsnPath)
        {
            var fsm = MsnFSMParser.AssembleFSM(inputTxtPath);

            MsnFSMParser.WriteMission(inputMsnPath, fsm, outputMsnPath);
        }