Example #1
0
        void Relational(out PredicativeExpressionElement elem)
        {
            var xelem = new Relational(SP); elem = xelem;

            Additive(out var d);
            xelem.Left = d;
            if (StartOf(7))
            {
                if (la.kind == 34)
                {
                    Get();
                    xelem.Operator = Relation.Greater;
                }
                else if (la.kind == 35)
                {
                    Get();
                    xelem.Operator = Relation.GreaterOrEqual;
                }
                else if (la.kind == 36)
                {
                    Get();
                    xelem.Operator = Relation.Less;
                }
                else
                {
                    Get();
                    xelem.Operator = Relation.LessOrEqual;
                }
                Relational(out d);
                xelem.Right = d;
            }
        }
Example #2
0
        void Conjunct(out PredicativeExpressionElement elem)
        {
            var xelem = new Relational(SP); elem = xelem;

            Relational(out var d);
            xelem.Left = d;
            if (la.kind == 38 || la.kind == 39)
            {
                if (la.kind == 38)
                {
                    Get();
                    xelem.Operator = Relation.Equal;
                }
                else
                {
                    Get();
                    xelem.Operator = Relation.NotEqual;
                }
                Conjunct(out d);
                xelem.Right = d;
            }
        }