Esempio n. 1
0
        public void T(int n, int m)
        {
            NumberOfComands++;
            string comand = NumberOfComands.ToString() + ". T(" + n.ToString() + "," + m.ToString() + ")";

            Prog.Add(comand);
        }
Esempio n. 2
0
        public void S(int n)
        {
            NumberOfComands++;
            string comand = NumberOfComands.ToString() + ". S(" + n.ToString() + ")";

            Prog.Add(comand);
        }
Esempio n. 3
0
        public void J(int n, int m, int k)
        {
            NumberOfComands++;
            string comand = NumberOfComands.ToString() + ". J(" + n.ToString() + "," + m.ToString() + "," + k.ToString() + ")";

            Prog.Add(comand);
        }
    public Node Prog()
    {
        var result = Exp();
        var node   = new Prog();

        node.Add(result);
        Expect(TokenCategory.EOF);
        return(node);
    }
Esempio n. 5
0
        public Node Program()
        {
            var programNode = new Prog();

            while (CurrentToken == TokenType.VAR || CurrentToken == TokenType.IDENTIFIER)
            {
                if (CurrentToken == TokenType.IDENTIFIER)
                {
                    programNode.Add(FunctionDefinition());
                    Expect(TokenType.BLOCK_END);
                }
                else
                {
                    programNode.Add(GlobalVariableDefinition());
                }
            }

            Expect(TokenType.EOF);
            // Console.WriteLine (programNode.ToString ());
            return(programNode);
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            //System.Console.WriteLine(  );

            First_name.name_1 ob1 = new First_name.name_1();
            ob1.Show();

            name_1 ob2 = new name_1();
            ob2.Show();

            Prog ob = new Prog();
            Console.WriteLine(ob.Add(3,5);

            Console.ReadKey();
        }
Esempio n. 7
0
        public void PrinReg()
        {
            string regist = "| ";
            int    i      = 0;

            while (Register[i] != null)
            {
                regist += i + ". " + Register[i] + " | ";
                i++;
            }
            Prog.Add(" ");
            Prog.Add("Стан регістрів на даний момент");
            Prog.Add(regist);
            Prog.Add(" ");
        }