예제 #1
0
        public override bool checkValue(Contexte contexte)
        {
            bool left = leftObject.checkValue(contexte);
            bool and;

            try {
                and = rightSymbole.checkValue(contexte);
            }
            catch (UndefinedValueException e) {
                and = false;
            }
            if (left)
            {
                return(true);
            }
            //          if (and)
            return(false);
            //         throw new UndefinedValueException();
        }
예제 #2
0
        public override bool checkValue(Contexte contexte)
        {
            if (this.value)
            {
                return(this.value);
            }
            bool isSet = false;
            bool res   = false;
            bool error = false;

            for (var i = 0; i < this.relations.Count; i++)
            {
                var rel = this.relations[i];
                ContexteComponent component = new ContexteComponent(this.name, i);
                if (contexte.addContextComponent(component))
                {
                    isSet = true;
                    continue;
                }
                try
                {
                    res   = rel.checkValue(contexte);
                    isSet = true;
                }
                catch (UndefinedValueException)
                {}
                if (res)
                {
                    return(true);
                }
            }

            if (!isSet && this.relations.Count != 0)
            {
                throw new UndefinedValueException();
            }
            return((this.relations.Count == 0)?this.value:res);
        }
예제 #3
0
 public override bool checkValue(Contexte contexte)
 {
     return(s1.checkValue(contexte.copy()) && s2.checkValue(contexte.copy()));
 }
예제 #4
0
 public override bool checkValue(Contexte contexte)
 {
     return(false);
 }