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());
    }