Esempio n. 1
0
        private bool TrySuffixOperator(Word w)
        {
            SuffixOperatorDef def = this.ctx.GetSuffixOperator(w.word);

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

            return(def.TryParse(w, this));
        }
Esempio n. 2
0
        private bool TrySuffixOperator(string word)
        {
            SuffixOperatorDef def = this.ctx.GetSuffixOperator(word);

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

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

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

            this.stk_parse.Push(new UnaryExpressionElement(def.word, left));
            return(true);
        }