Beispiel #1
0
        public LispOperator <TBb> Compile(TBb blackboard, LispParser.Node parseTree)
        {
            foreach (LispOperator <TBb> lispOperator in Operators)
            {
                LispOperator <TBb> result = lispOperator.CreateOperator(blackboard, parseTree, this);
                if (result != null)
                {
                    return(result);
                }
            }

            throw new InvalidOperationException(
                      string.Format("Unrecognized token: {0}.", parseTree));
        }