Beispiel #1
0
        public Expr Term()
        {
            Expr expr = this.Unary();

            while (_look.TagValue == '*' || _look.TagValue == '/')
            {
                Token tok = _look;
                this.Move();
                expr = new Arith(tok, expr, this.Unary());
            }
            return(expr);
        }
Beispiel #2
0
        public Expr Expr()
        {
            Expr expr = this.Term();

            while (_look.TagValue == '+' || _look.TagValue == '-')
            {
                Token tok = _look;
                this.Move();
                expr = new Arith(tok, expr, this.Term());
            }
            return(expr);
        }