Ejemplo n.º 1
0
        private bool TryBinaryOperator(string word)
        {
            BinaryOperatorDef def = this.ctx.GetBinaryOperator(word);

            if (def == null)
            {
                return(false);
            }

            IExpressionElement left = this.stk_parse.PopOperand(def.prioL, def.assocR);

            if (left == null)
            {
                return(false);
            }

            this.stk_parse.Push(new BinaryPrefixElement(def, left));
            return(true);
        }
Ejemplo n.º 2
0
 public BinaryPrefixElement(BinaryOperatorDef def, IExpressionElement left)
 {
     this.priority = def.prioR;
     this.op       = def.word;
     this.left     = left.Expression;
 }