示例#1
0
        static void Main()
        {
            StringBuilder inputCode = new StringBuilder();

            while (true)
            {
                string line = Console.ReadLine();
                inputCode.AppendLine(line);
                if (line.EndsWith("EXIT;"))
                {
                    break;
                }
            }

            BasicLanguageExecutor parser = new BasicLanguageExecutor();

            parser.ExecuteCode(inputCode.ToString());
            Console.WriteLine(parser.GetOutput());
        }
示例#2
0
        static void Main()
        {
            StringBuilder inputCode = new StringBuilder();
            while(true)
            {
                string line = Console.ReadLine();
                inputCode.AppendLine(line);
                if (line.EndsWith("EXIT;")) break;
            }

            BasicLanguageExecutor parser = new BasicLanguageExecutor();
            parser.ExecuteCode(inputCode.ToString());
            Console.WriteLine(parser.GetOutput());
        }