Beispiel #1
0
        //Rule: Robert and John are male
        public static IExpression GetMaleExpression()
        {
            var robert = new TerminalExpression("Robert");
            var john   = new TerminalExpression("John");

            return(new OrExpression(robert, john));
        }
Beispiel #2
0
        //Rule: Julie is a married woman
        public static IExpression GetMarriedWomanExpression()
        {
            var julie   = new TerminalExpression("Julie");
            var married = new TerminalExpression("Married");

            return(new AndExpression(julie, married));
        }