aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs34
1 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs
index 2912ab9..a03cd30 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/YP.cs
@@ -1,20 +1,20 @@
1/* 1/*
2 * Copyright (C) 2007-2008, Jeff Thompson 2 * Copyright (C) 2007-2008, Jeff Thompson
3 * 3 *
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright 11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * * Neither the name of the copyright holder nor the names of its contributors 14 * * Neither the name of the copyright holder nor the names of its contributors
15 * may be used to endorse or promote products derived from this software 15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission. 16 * without specific prior written permission.
17 * 17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -650,8 +650,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
650 if (term1TypeCode == -2) 650 if (term1TypeCode == -2)
651 { 651 {
652 // Variable. 652 // Variable.
653 // We always check for equality first because we want to be sure 653 // We always check for equality first because we want to be sure
654 // that less than returns false if the terms are equal, in 654 // that less than returns false if the terms are equal, in
655 // case that the less than check really behaves like less than or equal. 655 // case that the less than check really behaves like less than or equal.
656 if ((Variable)Term1 != (Variable)Term2) 656 if ((Variable)Term1 != (Variable)Term2)
657 // The hash code should be unique to a Variable object. 657 // The hash code should be unique to a Variable object.
@@ -694,8 +694,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
694 } 694 }
695 695
696 /// <summary> 696 /// <summary>
697 /// Type code is -2 if term is a Variable, 0 if it is an Atom, 697 /// Type code is -2 if term is a Variable, 0 if it is an Atom,
698 /// 1 if it is a Functor1, 2 if it is a Functor2, 3 if it is a Functor3, 698 /// 1 if it is a Functor1, 2 if it is a Functor2, 3 if it is a Functor3,
699 /// 4 if it is Functor. 699 /// 4 if it is Functor.
700 /// Otherwise, type code is -1. 700 /// Otherwise, type code is -1.
701 /// This does not call YP.getValue(term). 701 /// This does not call YP.getValue(term).
@@ -1115,7 +1115,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
1115 IndexedAnswers indexedAnswers; 1115 IndexedAnswers indexedAnswers;
1116 if (!_predicatesStore.TryGetValue(nameArity, out clauses)) 1116 if (!_predicatesStore.TryGetValue(nameArity, out clauses))
1117 { 1117 {
1118 // Create an IndexedAnswers as the first clause of the predicate. 1118 // Create an IndexedAnswers as the first clause of the predicate.
1119 _predicatesStore[nameArity] = (clauses = new List<IClause>()); 1119 _predicatesStore[nameArity] = (clauses = new List<IClause>());
1120 clauses.Add(indexedAnswers = new IndexedAnswers()); 1120 clauses.Add(indexedAnswers = new IndexedAnswers());
1121 } 1121 }
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
1135 List<IClause> clauses; 1135 List<IClause> clauses;
1136 if (!_predicatesStore.TryGetValue(new NameArity(name, arguments.Length), out clauses)) 1136 if (!_predicatesStore.TryGetValue(new NameArity(name, arguments.Length), out clauses))
1137 throw new UndefinedPredicateException 1137 throw new UndefinedPredicateException
1138 ("Undefined fact: " + name + "/" + arguments.Length, name, 1138 ("Undefined fact: " + name + "/" + arguments.Length, name,
1139 arguments.Length); 1139 arguments.Length);
1140 1140
1141 if (clauses.Count == 1) 1141 if (clauses.Count == 1)
@@ -1209,7 +1209,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
1209 } 1209 }
1210 1210
1211 /// <summary> 1211 /// <summary>
1212 /// Use YP.getFunctorName(Goal) and invoke the static method of this name in the 1212 /// Use YP.getFunctorName(Goal) and invoke the static method of this name in the
1213 /// declaringClass, using arguments from YP.getFunctorArgs(Goal). 1213 /// declaringClass, using arguments from YP.getFunctorArgs(Goal).
1214 /// Note that Goal must be a simple functor, not a complex expression. 1214 /// Note that Goal must be a simple functor, not a complex expression.
1215 /// If not found, this throws UndefinedPredicateException. 1215 /// If not found, this throws UndefinedPredicateException.