Example #1
0
        public Node ExpMax()
        {
            Node n = ExpSimple();

            while (CurrentToken == TokenCategory.MAXIMUM)
            {
                Node n1 = new Max()
                {
                    GetToken = Expect(TokenCategory.MAXIMUM)
                };

                n1.Add(n);
                n1.Add(ExpSimple());
                n = n1;
            }
            return(n);
        }
Example #2
0
        public Node Max()
        {
            var exp1 = Simple();

            //console.writeLine(exp1);
            while (CurrentToken == Token.MAX)
            {
                var max = new Max();
                //max.AnchorToken =
                //Console.WriteLine("aqui3");
                Expect(Token.MAX);
                var exp2 = Max();
                max.Add(exp1);
                max.Add(exp2);
                exp1 = max;
                //exp2.Add(exp1);
                //exp2.Add(MasExp());
            }
            //exp1 = exp2;
            return(exp1);
        }