Example #1
0
        override public void ExitComparisonExpressionWithOperator(
            ComparisonExpressionWithOperatorContext ctx)
        {
            // popping order matters
            ComparisonOperand    right = this.comparisonOperands.Pop();
            ComparisonOperand    left  = this.comparisonOperands.Pop();
            String               op    = ctx.GetChild(1).GetText();
            ComparisonExpression expr  = new ComparisonExpression(op, left, right);

            this.logicalExpressions.Push(expr);
        }
 public ComparisonExpression(String _operator, ComparisonOperand left, ComparisonOperand right) : base("comp")
 {
     this._operator = _operator;
     this.left      = left;
     this.right     = right;
 }
Example #3
0
 public BinaryComparison(ComparisonOperand op)
 {
     Operand = op;
 }