Ejemplo n.º 1
0
        public Expr term()
        {
            Expr x = unary();

            while (look.tag == '*' || look.tag == '/')
            {
                Token tok = look;
                move();
                x = new Arith(tok, x, unary());
            }
            return(x);
        }
Ejemplo n.º 2
0
        public Expr expr()
        {
            Expr x = term();

            while (look.tag == '+' || look.tag == '-')
            {
                Token tok = look;
                move();
                x = new Arith(tok, x, term());
            }
            return(x);
        }