Beispiel #1
0
        public Result getValueOf(string value)
        {
            Symbole s = null;

            try
            {
                s = this.symboles[value];
            }
            catch (Exception e)
            {}
            if (s != null)
            {
                try
                {
                    return(this.symboles[value].checkValue(new Contexte())?Result.TRUE:Result.FALSE);
                }
                catch (UndefinedValueException)
                {
                    return(Result.UNDEFINED);
                }
            }
            else
            {
                Console.WriteLine("Impossible de trouver le symbole " + value);
                return(Result.FALSE);
            }
        }
Beispiel #2
0
        private static Core initCore()
        {
            Core.resetCore();
            Core core = Core.getCore();

            Symbole symA = new Symbole("A");
            Symbole symB = new Symbole("B");

            symB.addRelation(new RightNormal(symA));
            return(core);
        }
Beispiel #3
0
 public void addSymbole(string value, Symbole s)
 {
     this.symboles[value] = s;
 }
Beispiel #4
0
 public RightAnd(Symbole rightSymbole, ProgramObject leftObject)
 {
     this.rightSymbole = rightSymbole;
     this.leftObject   = leftObject;
 }