From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- .../Region/ScriptEngine/Interfaces/ICompiler.cs | 31 +- .../Region/ScriptEngine/Interfaces/IScriptApi.cs | 17 +- .../ScriptEngine/Interfaces/IScriptEngine.cs | 45 +- .../ScriptEngine/Interfaces/IScriptInstance.cs | 45 +- .../Api/Implementation/AsyncCommandManager.cs | 329 +- .../Shared/Api/Implementation/LSL_Api.cs | 6111 ++++-- .../Shared/Api/Implementation/LS_Api.cs | 431 +- .../Shared/Api/Implementation/MOD_Api.cs | 79 +- .../Shared/Api/Implementation/OSSL_Api.cs | 488 +- .../Api/Implementation/Plugins/SensorRepeat.cs | 18 +- .../Api/Implementation/Properties/AssemblyInfo.cs | 4 +- .../ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 9 +- .../ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 26 + .../ScriptEngine/Shared/Api/Runtime/Executor.cs | 2 + .../Shared/Api/Runtime/LSL_Constants.cs | 75 +- .../ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 39 +- .../ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 60 +- .../Shared/Api/Runtime/Properties/AssemblyInfo.cs | 2 +- .../Shared/Api/Runtime/YieldProlog/Atom.cs | 218 - .../Shared/Api/Runtime/YieldProlog/BagofAnswers.cs | 239 - .../Api/Runtime/YieldProlog/FindallAnswers.cs | 108 - .../Shared/Api/Runtime/YieldProlog/Functor.cs | 196 - .../Shared/Api/Runtime/YieldProlog/Functor1.cs | 124 - .../Shared/Api/Runtime/YieldProlog/Functor2.cs | 163 - .../Shared/Api/Runtime/YieldProlog/Functor3.cs | 141 - .../Api/Runtime/YieldProlog/IndexedAnswers.cs | 385 - .../Shared/Api/Runtime/YieldProlog/ListPair.cs | 166 - .../Shared/Api/Runtime/YieldProlog/Parser.cs | 4575 ----- .../Api/Runtime/YieldProlog/PrologException.cs | 159 - .../Runtime/YieldProlog/Properties/AssemblyInfo.cs | 33 - .../YieldProlog/UndefinedPredicateException.cs | 62 - .../Shared/Api/Runtime/YieldProlog/Variable.cs | 222 - .../Shared/Api/Runtime/YieldProlog/YP.cs | 2701 --- .../Shared/Api/Runtime/YieldProlog/YPCompiler.cs | 6382 ------- .../Shared/CodeTools/CSCodeGenerator.cs | 151 +- .../ScriptEngine/Shared/CodeTools/Compiler.cs | 314 +- .../Shared/CodeTools/LSL2CSCodeTransformer.cs | 10 + .../Shared/CodeTools/Properties/AssemblyInfo.cs | 4 +- .../Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | 1 + .../Shared/CodeTools/Tests/CompilerTest.cs | 124 +- .../Shared/CodeTools/Tests/LSL_EventTests.cs | 359 + .../Shared/CodeTools/YP2CSConverter.cs | 117 - .../ScriptEngine/Shared/CodeTools/lsl.lexer.cs | 3669 ++-- .../ScriptEngine/Shared/CodeTools/lsl.parser.cs | 18530 +++++++++++-------- OpenSim/Region/ScriptEngine/Shared/Helpers.cs | 18 + .../Shared/Instance/Properties/AssemblyInfo.cs | 4 +- .../ScriptEngine/Shared/Instance/ScriptInstance.cs | 806 +- .../Shared/Instance/Tests/CoopTerminationTests.cs | 513 + OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 274 +- .../ScriptEngine/Shared/Properties/AssemblyInfo.cs | 2 +- .../Shared/Tests/LSL_ApiAvatarTests.cs | 158 + .../ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs | 248 + .../Shared/Tests/LSL_ApiInventoryTests.cs | 126 +- .../Shared/Tests/LSL_ApiLinkingTests.cs | 50 +- .../ScriptEngine/Shared/Tests/LSL_ApiListTests.cs | 4 +- .../Shared/Tests/LSL_ApiNotecardTests.cs | 269 + .../Shared/Tests/LSL_ApiObjectTests.cs | 398 + .../ScriptEngine/Shared/Tests/LSL_ApiTest.cs | 240 +- .../ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs | 157 + .../Shared/Tests/OSSL_ApiAppearanceTest.cs | 4 +- .../Shared/Tests/OSSL_ApiAttachmentTests.cs | 17 +- .../ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | 7 +- .../XEngine/Api/Runtime/XEngineScriptBase.cs | 61 + .../Region/ScriptEngine/XEngine/EventManager.cs | 10 +- .../XEngine/Properties/AssemblyInfo.cs | 7 +- .../XEngine/Resources/XEngine.addin.xml | 13 - .../XEngine/Tests/XEngineBasicTests.cs | 129 + .../XEngine/Tests/XEngineCrossingTests.cs | 195 + .../XEngine/Tests/XEnginePersistenceTests.cs | 152 + .../ScriptEngine/XEngine/Tests/XEngineTest.cs | 130 - OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 609 +- OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs | 10 +- 72 files changed, 23213 insertions(+), 28362 deletions(-) delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Atom.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/ListPair.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/PrologException.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/UndefinedPredicateException.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs delete mode 100644 OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs create mode 100644 OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs create mode 100644 OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs delete mode 100644 OpenSim/Region/ScriptEngine/XEngine/Resources/XEngine.addin.xml create mode 100644 OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs create mode 100644 OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs create mode 100644 OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs delete mode 100644 OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs mode change 100644 => 100755 OpenSim/Region/ScriptEngine/XEngine/XEngine.cs (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs index e4ca635..a7fa502 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/ICompiler.cs @@ -34,7 +34,36 @@ namespace OpenSim.Region.ScriptEngine.Interfaces { public interface ICompiler { - void PerformScriptCompile(string source, string asset, UUID ownerID, out string assembly, out Dictionary, KeyValuePair> linemap); + /// + /// Performs the script compile. + /// + /// + /// + /// + /// + /// If set to true then always recompile the script, even if we have a DLL already cached. + /// + /// + /// + void PerformScriptCompile( + string source, string asset, UUID ownerID, + out string assembly, out Dictionary, KeyValuePair> linemap); + + /// + /// Performs the script compile. + /// + /// + /// + /// + /// + /// If set to true then always recompile the script, even if we have a DLL already cached. + /// + /// + /// + void PerformScriptCompile( + string source, string asset, UUID ownerID, bool alwaysRecompile, + out string assembly, out Dictionary, KeyValuePair> linemap); + string[] GetWarnings(); } } diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs index 2027ca6..b9970bf 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs @@ -26,9 +26,11 @@ */ using System; +using System.Threading; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; namespace OpenSim.Region.ScriptEngine.Interfaces { @@ -38,11 +40,12 @@ namespace OpenSim.Region.ScriptEngine.Interfaces /// Initialize the API /// /// - /// Each API has an identifier, which is used to load the - /// proper runtime assembly at load time. - /// /param> - /// - /// - void Initialize(IScriptEngine engine, SceneObjectPart part, TaskInventoryItem item); + /// Each API has an identifier, which is used to load the proper runtime assembly at load time. + /// /param> + /// /param> + /// /param> + /// /param> + void Initialize( + IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item); } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 17c2708..6355669 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs @@ -25,16 +25,17 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using log4net; using System; -using OpenSim.Region.ScriptEngine.Shared; +using System.Reflection; +using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; -using OpenMetaverse; -using Nini.Config; using OpenSim.Region.ScriptEngine.Interfaces; +using OpenSim.Region.ScriptEngine.Shared; using Amib.Threading; -using OpenSim.Framework; +using log4net; +using Nini.Config; +using OpenMetaverse; namespace OpenSim.Region.ScriptEngine.Interfaces { @@ -76,6 +77,40 @@ namespace OpenSim.Region.ScriptEngine.Interfaces IConfigSource ConfigSource { get; } string ScriptEngineName { get; } string ScriptEnginePath { get; } + + /// + /// Return the name of the class that will be used for all running scripts. + /// + /// + /// Each class goes in its own assembly so we don't need to otherwise distinguish the class name. + /// + string ScriptClassName { get; } + + /// + /// Return the name of the base class that will be used for all running scripts. + /// + string ScriptBaseClassName { get; } + + /// + /// Assemblies that need to be referenced when compiling scripts. + /// + /// + /// These are currently additional to those always referenced by the compiler, BUT THIS MAY CHANGE IN THE + /// FUTURE. + /// This can be null if there are no additional assemblies. + /// + string[] ScriptReferencedAssemblies { get; } + + /// + /// Parameters for the generated script's constructor. + /// + /// + /// Can be null if there are no parameters + /// + ParameterInfo[] ScriptBaseClassParameters { get; } + IScriptApi GetApi(UUID itemID, string name); + + void SleepScript(UUID itemID, int delay); } } diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 2f5b526..e4297c4 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs @@ -28,9 +28,12 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Threading; +using System.Diagnostics; using OpenMetaverse; using log4net; using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Interfaces; @@ -49,8 +52,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces public interface IScriptWorkItem { bool Cancel(); - void Abort(); - bool Wait(TimeSpan t); + bool Abort(); + + /// + /// Wait for the work item to complete. + /// + /// The number of milliseconds to wait. Must be >= -1 (Timeout.Infinite). + bool Wait(int t); } /// @@ -86,24 +94,35 @@ namespace OpenSim.Region.ScriptEngine.Interfaces bool ShuttingDown { get; set; } /// + /// When stopping the script: should it remain stopped permanently (i.e., save !Running in its state)? + /// + bool StayStopped { get; set; } + + /// /// Script state /// string State { get; set; } /// + /// If true then the engine is responsible for persisted state. If false then some other component may + /// persist state (e.g. attachments persisting in assets). + /// + bool StatePersistedHere { get; } + + /// /// Time the script was last started /// DateTime TimeStarted { get; } /// - /// Tick the last measurement period was started. + /// Collects information about how long the script was executed. /// - long MeasurementPeriodTickStart { get; } + MetricsCollectorTime ExecutionTime { get; } /// - /// Ticks spent executing in the last measurement period. + /// Scene part in which this script instance is contained. /// - long MeasurementPeriodExecutionTime { get; } + SceneObjectPart Part { get; } IScriptEngine Engine { get; } UUID AppDomain { get; set; } @@ -124,6 +143,12 @@ namespace OpenSim.Region.ScriptEngine.Interfaces uint LocalID { get; } UUID AssetID { get; } + + /// + /// Inventory item containing the script used. + /// + TaskInventoryItem ScriptTask { get; } + Queue EventQueue { get; } /// @@ -139,6 +164,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces void ClearQueue(); int StartParam { get; set; } + WaitHandle CoopWaitHandle { get; } + Stopwatch ExecutionTimer { get; } + void RemoveState(); void Init(); @@ -154,8 +182,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces /// /// How many milliseconds we will wait for an existing script event to finish before /// forcibly aborting that event. + /// If true then the event queue is also cleared /// true if the script was successfully stopped, false otherwise - bool Stop(int timeout); + bool Stop(int timeout, bool clearEventQueue = false); void SetState(string state); @@ -204,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces void SetVars(Dictionary vars); DetectParams GetDetectParams(int idx); UUID GetDetectID(int idx); - void SaveState(string assembly); + void SaveState(); void DestroyScriptInstance(); IScriptApi GetApi(string name); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 47a9cdc..036cb5d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs @@ -28,7 +28,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using System.Threading; +using log4net; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Monitoring; @@ -45,15 +47,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public class AsyncCommandManager { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static Thread cmdHandlerThread; private static int cmdHandlerThreadCycleSleepms; - private static List m_Scenes = new List(); + /// + /// Lock for reading/writing static components of AsyncCommandManager. + /// + /// + /// This lock exists so that multiple threads from different engines and/or different copies of the same engine + /// are prevented from running non-thread safe code (e.g. read/write of lists) concurrently. + /// + private static object staticLock = new object(); + private static List m_ScriptEngines = new List(); public IScriptEngine m_ScriptEngine; - private IScene m_Scene; private static Dictionary m_Dataserver = new Dictionary(); @@ -70,67 +81,99 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public Dataserver DataserverPlugin { - get { return m_Dataserver[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_Dataserver[m_ScriptEngine]; + } } public Timer TimerPlugin { - get { return m_Timer[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_Timer[m_ScriptEngine]; + } } public HttpRequest HttpRequestPlugin { - get { return m_HttpRequest[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_HttpRequest[m_ScriptEngine]; + } } public Listener ListenerPlugin { - get { return m_Listener[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_Listener[m_ScriptEngine]; + } } public SensorRepeat SensorRepeatPlugin { - get { return m_SensorRepeat[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_SensorRepeat[m_ScriptEngine]; + } } public XmlRequest XmlRequestPlugin { - get { return m_XmlRequest[m_ScriptEngine]; } + get + { + lock (staticLock) + return m_XmlRequest[m_ScriptEngine]; + } } public IScriptEngine[] ScriptEngines { - get { return m_ScriptEngines.ToArray(); } + get + { + lock (staticLock) + return m_ScriptEngines.ToArray(); + } } public AsyncCommandManager(IScriptEngine _ScriptEngine) { m_ScriptEngine = _ScriptEngine; - m_Scene = m_ScriptEngine.World; - - if (m_Scenes.Count == 0) - ReadConfig(); - - if (!m_Scenes.Contains(m_Scene)) - m_Scenes.Add(m_Scene); - if (!m_ScriptEngines.Contains(m_ScriptEngine)) - m_ScriptEngines.Add(m_ScriptEngine); - - // Create instances of all plugins - if (!m_Dataserver.ContainsKey(m_ScriptEngine)) - m_Dataserver[m_ScriptEngine] = new Dataserver(this); - if (!m_Timer.ContainsKey(m_ScriptEngine)) - m_Timer[m_ScriptEngine] = new Timer(this); - if (!m_HttpRequest.ContainsKey(m_ScriptEngine)) - m_HttpRequest[m_ScriptEngine] = new HttpRequest(this); - if (!m_Listener.ContainsKey(m_ScriptEngine)) - m_Listener[m_ScriptEngine] = new Listener(this); - if (!m_SensorRepeat.ContainsKey(m_ScriptEngine)) - m_SensorRepeat[m_ScriptEngine] = new SensorRepeat(this); - if (!m_XmlRequest.ContainsKey(m_ScriptEngine)) - m_XmlRequest[m_ScriptEngine] = new XmlRequest(this); - - StartThread(); + + // If there is more than one scene in the simulator or multiple script engines are used on the same region + // then more than one thread could arrive at this block of code simultaneously. However, it cannot be + // executed concurrently both because concurrent list operations are not thread-safe and because of other + // race conditions such as the later check of cmdHandlerThread == null. + lock (staticLock) + { + if (m_ScriptEngines.Count == 0) + ReadConfig(); + + if (!m_ScriptEngines.Contains(m_ScriptEngine)) + m_ScriptEngines.Add(m_ScriptEngine); + + // Create instances of all plugins + if (!m_Dataserver.ContainsKey(m_ScriptEngine)) + m_Dataserver[m_ScriptEngine] = new Dataserver(this); + if (!m_Timer.ContainsKey(m_ScriptEngine)) + m_Timer[m_ScriptEngine] = new Timer(this); + if (!m_HttpRequest.ContainsKey(m_ScriptEngine)) + m_HttpRequest[m_ScriptEngine] = new HttpRequest(this); + if (!m_Listener.ContainsKey(m_ScriptEngine)) + m_Listener[m_ScriptEngine] = new Listener(this); + if (!m_SensorRepeat.ContainsKey(m_ScriptEngine)) + m_SensorRepeat[m_ScriptEngine] = new SensorRepeat(this); + if (!m_XmlRequest.ContainsKey(m_ScriptEngine)) + m_XmlRequest[m_ScriptEngine] = new XmlRequest(this); + + StartThread(); + } } private static void StartThread() @@ -139,7 +182,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // Start the thread that will be doing the work cmdHandlerThread - = Watchdog.StartThread( + = WorkManager.StartThread( CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true); } } @@ -179,42 +222,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { try { - while (true) - { - Thread.Sleep(cmdHandlerThreadCycleSleepms); + Thread.Sleep(cmdHandlerThreadCycleSleepms); - DoOneCmdHandlerPass(); + DoOneCmdHandlerPass(); - Watchdog.UpdateThread(); - } + Watchdog.UpdateThread(); } - catch + catch (Exception e) { + m_log.Error("[ASYNC COMMAND MANAGER]: Exception in command handler pass: ", e); } } } private static void DoOneCmdHandlerPass() { - // Check HttpRequests - m_HttpRequest[m_ScriptEngines[0]].CheckHttpRequests(); + lock (staticLock) + { + // Check HttpRequests + m_HttpRequest[m_ScriptEngines[0]].CheckHttpRequests(); - // Check XMLRPCRequests - m_XmlRequest[m_ScriptEngines[0]].CheckXMLRPCRequests(); + // Check XMLRPCRequests + m_XmlRequest[m_ScriptEngines[0]].CheckXMLRPCRequests(); - foreach (IScriptEngine s in m_ScriptEngines) - { - // Check Listeners - m_Listener[s].CheckListeners(); + foreach (IScriptEngine s in m_ScriptEngines) + { + // Check Listeners + m_Listener[s].CheckListeners(); - // Check timers - m_Timer[s].CheckTimerEvents(); + // Check timers + m_Timer[s].CheckTimerEvents(); - // Check Sensors - m_SensorRepeat[s].CheckSenseRepeaterEvents(); + // Check Sensors + m_SensorRepeat[s].CheckSenseRepeaterEvents(); - // Check dataserver - m_Dataserver[s].ExpireRequests(); + // Check dataserver + m_Dataserver[s].ExpireRequests(); + } } } @@ -225,19 +269,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public static void RemoveScript(IScriptEngine engine, uint localID, UUID itemID) { +// m_log.DebugFormat("[ASYNC COMMAND MANAGER]: Removing facilities for script {0}", itemID); + + lock (staticLock) + { + // Remove dataserver events + m_Dataserver[engine].RemoveEvents(localID, itemID); + + // Remove from: Timers + m_Timer[engine].UnSetTimerEvents(localID, itemID); + + // Remove from: HttpRequest + IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface(); + if (iHttpReq != null) + iHttpReq.StopHttpRequestsForScript(itemID); + + IWorldComm comms = engine.World.RequestModuleInterface(); + if (comms != null) + comms.DeleteListener(itemID); + + IXMLRPC xmlrpc = engine.World.RequestModuleInterface(); + if (xmlrpc != null) + { + xmlrpc.DeleteChannels(itemID); + xmlrpc.CancelSRDRequests(itemID); + } + + // Remove Sensors + m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); + } + } + + public static void StateChange(IScriptEngine engine, uint localID, UUID itemID) + { // Remove a specific script // Remove dataserver events m_Dataserver[engine].RemoveEvents(localID, itemID); - // Remove from: Timers - m_Timer[engine].UnSetTimerEvents(localID, itemID); - - // Remove from: HttpRequest - IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface(); - if (iHttpReq != null) - iHttpReq.StopHttpRequest(localID, itemID); - IWorldComm comms = engine.World.RequestModuleInterface(); if (comms != null) comms.DeleteListener(itemID); @@ -248,9 +317,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api xmlrpc.DeleteChannels(itemID); xmlrpc.CancelSRDRequests(itemID); } - // Remove Sensors m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); + } /// @@ -260,10 +329,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public static SensorRepeat GetSensorRepeatPlugin(IScriptEngine engine) { - if (m_SensorRepeat.ContainsKey(engine)) - return m_SensorRepeat[engine]; - else - return null; + lock (staticLock) + { + if (m_SensorRepeat.ContainsKey(engine)) + return m_SensorRepeat[engine]; + else + return null; + } } /// @@ -273,10 +345,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public static Dataserver GetDataserverPlugin(IScriptEngine engine) { - if (m_Dataserver.ContainsKey(engine)) - return m_Dataserver[engine]; - else - return null; + lock (staticLock) + { + if (m_Dataserver.ContainsKey(engine)) + return m_Dataserver[engine]; + else + return null; + } } /// @@ -286,10 +361,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public static Timer GetTimerPlugin(IScriptEngine engine) { - if (m_Timer.ContainsKey(engine)) - return m_Timer[engine]; - else - return null; + lock (staticLock) + { + if (m_Timer.ContainsKey(engine)) + return m_Timer[engine]; + else + return null; + } } /// @@ -299,38 +377,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public static Listener GetListenerPlugin(IScriptEngine engine) { - if (m_Listener.ContainsKey(engine)) - return m_Listener[engine]; - else - return null; + lock (staticLock) + { + if (m_Listener.ContainsKey(engine)) + return m_Listener[engine]; + else + return null; + } } public static Object[] GetSerializationData(IScriptEngine engine, UUID itemID) { List data = new List(); - Object[] listeners = m_Listener[engine].GetSerializationData(itemID); - if (listeners.Length > 0) + lock (staticLock) { - data.Add("listener"); - data.Add(listeners.Length); - data.AddRange(listeners); - } + Object[] listeners = m_Listener[engine].GetSerializationData(itemID); + if (listeners.Length > 0) + { + data.Add("listener"); + data.Add(listeners.Length); + data.AddRange(listeners); + } - Object[] timers=m_Timer[engine].GetSerializationData(itemID); - if (timers.Length > 0) - { - data.Add("timer"); - data.Add(timers.Length); - data.AddRange(timers); - } + Object[] timers=m_Timer[engine].GetSerializationData(itemID); + if (timers.Length > 0) + { + data.Add("timer"); + data.Add(timers.Length); + data.AddRange(timers); + } - Object[] sensors = m_SensorRepeat[engine].GetSerializationData(itemID); - if (sensors.Length > 0) - { - data.Add("sensor"); - data.Add(sensors.Length); - data.AddRange(sensors); + Object[] sensors = m_SensorRepeat[engine].GetSerializationData(itemID); + if (sensors.Length > 0) + { + data.Add("sensor"); + data.Add(sensors.Length); + data.AddRange(sensors); + } } return data.ToArray(); @@ -355,41 +439,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api idx+=len; + lock (staticLock) + { switch (type) { - case "listener": - m_Listener[engine].CreateFromData(localID, itemID, - hostID, item); - break; - case "timer": - m_Timer[engine].CreateFromData(localID, itemID, - hostID, item); - break; - case "sensor": - m_SensorRepeat[engine].CreateFromData(localID, - itemID, hostID, item); - break; + case "listener": + m_Listener[engine].CreateFromData(localID, itemID, + hostID, item); + break; + case "timer": + m_Timer[engine].CreateFromData(localID, itemID, + hostID, item); + break; + case "sensor": + m_SensorRepeat[engine].CreateFromData(localID, + itemID, hostID, item); + break; + } } } } } - - #region Check llRemoteData channels - - #endregion - - #region Check llListeners - - #endregion - - /// - /// If set to true then threads and stuff should try to make a graceful exit - /// - public bool PleaseShutdown - { - get { return _PleaseShutdown; } - set { _PleaseShutdown = value; } - } - private bool _PleaseShutdown = false; } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1ab107a..4eda443 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -28,6 +28,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Imaging; using System.Runtime.Remoting.Lifetime; using System.Text; using System.Threading; @@ -35,7 +38,9 @@ using System.Text.RegularExpressions; using Nini.Config; using log4net; using OpenMetaverse; +using OpenMetaverse.Assets; using OpenMetaverse.Packets; +using OpenMetaverse.Rendering; using OpenSim; using OpenSim.Framework; @@ -45,7 +50,8 @@ using OpenSim.Region.CoreModules.World.Terrain; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Animation; -using OpenSim.Region.Physics.Manager; +using OpenSim.Region.Framework.Scenes.Scripting; +using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; @@ -66,6 +72,8 @@ using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; using System.Reflection; +using System.Linq; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ScriptEngine.Shared.Api { @@ -83,15 +91,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + public int LlRequestAgentDataCacheTimeoutMs { get; set; } + protected IScriptEngine m_ScriptEngine; protected SceneObjectPart m_host; /// + /// Used for script sleeps when we are using co-operative script termination. + /// + /// null if co-operative script termination is not active + /// /// The item that hosts this script /// protected TaskInventoryItem m_item; - protected bool throwErrorOnNotImplemented = true; + protected bool throwErrorOnNotImplemented = false; protected AsyncCommandManager AsyncCommands = null; protected float m_ScriptDelayFactor = 1.0f; protected float m_ScriptDistanceFactor = 1.0f; @@ -108,49 +123,260 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected IUrlModule m_UrlModule = null; protected Dictionary m_userInfoCache = new Dictionary(); protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp. + protected int m_sleepMsOnSetTexture = 200; + protected int m_sleepMsOnSetLinkTexture = 200; + protected int m_sleepMsOnScaleTexture = 200; + protected int m_sleepMsOnOffsetTexture = 200; + protected int m_sleepMsOnRotateTexture = 200; + protected int m_sleepMsOnSetPos = 200; + protected int m_sleepMsOnSetRot = 200; + protected int m_sleepMsOnSetLocalRot = 200; + protected int m_sleepMsOnPreloadSound = 1000; + protected int m_sleepMsOnMakeExplosion = 100; + protected int m_sleepMsOnMakeFountain = 100; + protected int m_sleepMsOnMakeSmoke = 100; + protected int m_sleepMsOnMakeFire = 100; + protected int m_sleepMsOnRezAtRoot = 100; + protected int m_sleepMsOnInstantMessage = 2000; + protected int m_sleepMsOnEmail = 20000; + protected int m_sleepMsOnCreateLink = 1000; + protected int m_sleepMsOnGiveInventory = 3000; + protected int m_sleepMsOnRequestAgentData = 100; + protected int m_sleepMsOnRequestInventoryData = 1000; + protected int m_sleepMsOnSetDamage = 5000; + protected int m_sleepMsOnTextBox = 1000; + protected int m_sleepMsOnAdjustSoundVolume = 100; + protected int m_sleepMsOnEjectFromLand = 5000; + protected int m_sleepMsOnAddToLandPassList = 100; + protected int m_sleepMsOnDialog = 1000; + protected int m_sleepMsOnRemoteLoadScript = 3000; + protected int m_sleepMsOnRemoteLoadScriptPin = 3000; + protected int m_sleepMsOnOpenRemoteDataChannel = 1000; + protected int m_sleepMsOnSendRemoteData = 3000; + protected int m_sleepMsOnRemoteDataReply = 3000; + protected int m_sleepMsOnCloseRemoteDataChannel = 1000; + protected int m_sleepMsOnSetPrimitiveParams = 200; + protected int m_sleepMsOnSetLinkPrimitiveParams = 200; + protected int m_sleepMsOnXorBase64Strings = 300; + protected int m_sleepMsOnSetParcelMusicURL = 2000; + protected int m_sleepMsOnGetPrimMediaParams = 1000; + protected int m_sleepMsOnGetLinkMedia = 1000; + protected int m_sleepMsOnSetPrimMediaParams = 1000; + protected int m_sleepMsOnSetLinkMedia = 1000; + protected int m_sleepMsOnClearPrimMedia = 1000; + protected int m_sleepMsOnClearLinkMedia = 1000; + protected int m_sleepMsOnRequestSimulatorData = 1000; + protected int m_sleepMsOnLoadURL = 10000; + protected int m_sleepMsOnParcelMediaCommandList = 2000; + protected int m_sleepMsOnParcelMediaQuery = 2000; + protected int m_sleepMsOnModPow = 1000; + protected int m_sleepMsOnSetPrimURL = 2000; + protected int m_sleepMsOnRefreshPrimURL = 20000; + protected int m_sleepMsOnMapDestination = 1000; + protected int m_sleepMsOnAddToLandBanList = 100; + protected int m_sleepMsOnRemoveFromLandPassList = 100; + protected int m_sleepMsOnRemoveFromLandBanList = 100; + protected int m_sleepMsOnResetLandBanList = 100; + protected int m_sleepMsOnResetLandPassList = 100; + protected int m_sleepMsOnGetParcelPrimOwners = 2000; + protected int m_sleepMsOnGetNumberOfNotecardLines = 100; + protected int m_sleepMsOnGetNotecardLine = 100; + protected string m_internalObjectHost = "lsl.opensim.local"; + protected bool m_restrictEmail = false; protected ISoundModule m_SoundModule = null; - public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) + protected float m_avatarHeightCorrection = 0.2f; + protected bool m_useSimpleBoxesInGetBoundingBox = false; + protected bool m_addStatsInGetBoundingBox = false; + + //LSL Avatar Bounding Box (lABB), lower (1) and upper (2), + //standing (Std), Groundsitting (Grs), Sitting (Sit), + //along X, Y and Z axes, constants (0) and coefficients (1) + protected float m_lABB1StdX0 = -0.275f; + protected float m_lABB2StdX0 = 0.275f; + protected float m_lABB1StdY0 = -0.35f; + protected float m_lABB2StdY0 = 0.35f; + protected float m_lABB1StdZ0 = -0.1f; + protected float m_lABB1StdZ1 = -0.5f; + protected float m_lABB2StdZ0 = 0.1f; + protected float m_lABB2StdZ1 = 0.5f; + protected float m_lABB1GrsX0 = -0.3875f; + protected float m_lABB2GrsX0 = 0.3875f; + protected float m_lABB1GrsY0 = -0.5f; + protected float m_lABB2GrsY0 = 0.5f; + protected float m_lABB1GrsZ0 = -0.05f; + protected float m_lABB1GrsZ1 = -0.375f; + protected float m_lABB2GrsZ0 = 0.5f; + protected float m_lABB2GrsZ1 = 0.0f; + protected float m_lABB1SitX0 = -0.5875f; + protected float m_lABB2SitX0 = 0.1875f; + protected float m_lABB1SitY0 = -0.35f; + protected float m_lABB2SitY0 = 0.35f; + protected float m_lABB1SitZ0 = -0.35f; + protected float m_lABB1SitZ1 = -0.375f; + protected float m_lABB2SitZ0 = -0.25f; + protected float m_lABB2SitZ1 = 0.25f; + + protected float m_primSafetyCoeffX = 2.414214f; + protected float m_primSafetyCoeffY = 2.414214f; + protected float m_primSafetyCoeffZ = 1.618034f; + protected bool m_useCastRayV3 = false; + protected float m_floatToleranceInCastRay = 0.00001f; + protected float m_floatTolerance2InCastRay = 0.001f; + protected DetailLevel m_primLodInCastRay = DetailLevel.Medium; + protected DetailLevel m_sculptLodInCastRay = DetailLevel.Medium; + protected DetailLevel m_meshLodInCastRay = DetailLevel.Highest; + protected DetailLevel m_avatarLodInCastRay = DetailLevel.Medium; + protected int m_maxHitsInCastRay = 16; + protected int m_maxHitsPerPrimInCastRay = 16; + protected int m_maxHitsPerObjectInCastRay = 16; + protected bool m_detectExitsInCastRay = false; + protected bool m_filterPartsInCastRay = false; + protected bool m_doAttachmentsInCastRay = false; + protected int m_msThrottleInCastRay = 200; + protected int m_msPerRegionInCastRay = 40; + protected int m_msPerAvatarInCastRay = 10; + protected int m_msMinInCastRay = 2; + protected int m_msMaxInCastRay = 40; + protected static List m_castRayCalls = new List(); + protected bool m_useMeshCacheInCastRay = true; + protected static Dictionary m_cachedMeshes = new Dictionary(); + + //An array of HTTP/1.1 headers that are not allowed to be used + //as custom headers by llHTTPRequest. + private string[] HttpStandardHeaders = + { + "Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", + "Accept-Ranges", "Age", "Allow", "Authorization", "Cache-Control", + "Connection", "Content-Encoding", "Content-Language", + "Content-Length", "Content-Location", "Content-MD5", + "Content-Range", "Content-Type", "Date", "ETag", "Expect", + "Expires", "From", "Host", "If-Match", "If-Modified-Since", + "If-None-Match", "If-Range", "If-Unmodified-Since", "Last-Modified", + "Location", "Max-Forwards", "Pragma", "Proxy-Authenticate", + "Proxy-Authorization", "Range", "Referer", "Retry-After", "Server", + "TE", "Trailer", "Transfer-Encoding", "Upgrade", "User-Agent", + "Vary", "Via", "Warning", "WWW-Authenticate" + }; + + public void Initialize( + IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) { - m_ScriptEngine = ScriptEngine; + m_ScriptEngine = scriptEngine; m_host = host; m_item = item; - LoadLimits(); // read script limits from config. + LoadConfig(); m_TransferModule = m_ScriptEngine.World.RequestModuleInterface(); m_UrlModule = m_ScriptEngine.World.RequestModuleInterface(); m_SoundModule = m_ScriptEngine.World.RequestModuleInterface(); - AsyncCommands = new AsyncCommandManager(ScriptEngine); + AsyncCommands = new AsyncCommandManager(m_ScriptEngine); } - /* load configuration items that affect script, object and run-time behavior. */ - private void LoadLimits() + /// + /// Load configuration items that affect script, object and run-time behavior. */ + /// + private void LoadConfig() { - m_ScriptDelayFactor = - m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); - m_ScriptDistanceFactor = - m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); - m_MinTimerInterval = - m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f); - m_automaticLinkPermission = - m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false); - m_notecardLineReadCharsMax = - m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255); + LlRequestAgentDataCacheTimeoutMs = 20000; + + IConfig seConfig = m_ScriptEngine.Config; + + if (seConfig != null) + { + m_ScriptDelayFactor = + seConfig.GetFloat("ScriptDelayFactor", m_ScriptDelayFactor); + m_ScriptDistanceFactor = + seConfig.GetFloat("ScriptDistanceLimitFactor", m_ScriptDistanceFactor); + m_MinTimerInterval = + seConfig.GetFloat("MinTimerInterval", m_MinTimerInterval); + m_automaticLinkPermission = + seConfig.GetBoolean("AutomaticLinkPermission", m_automaticLinkPermission); + m_notecardLineReadCharsMax = + seConfig.GetInt("NotecardLineReadCharsMax", m_notecardLineReadCharsMax); + + // Rezzing an object with a velocity can create recoil. This feature seems to have been + // removed from recent versions of SL. The code computes recoil (vel*mass) and scales + // it by this factor. May be zero to turn off recoil all together. + m_recoilScaleFactor = m_ScriptEngine.Config.GetFloat("RecoilScaleFactor", m_recoilScaleFactor); + } + if (m_notecardLineReadCharsMax > 65535) m_notecardLineReadCharsMax = 65535; + // load limits for particular subsystems. - IConfig SMTPConfig; - if ((SMTPConfig = m_ScriptEngine.ConfigSource.Configs["SMTP"]) != null) { - // there's an smtp config, so load in the snooze time. - EMAIL_PAUSE_TIME = SMTPConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME); - } - // Rezzing an object with a velocity can create recoil. This feature seems to have been - // removed from recent versions of SL. The code computes recoil (vel*mass) and scales - // it by this factor. May be zero to turn off recoil all together. - m_recoilScaleFactor = m_ScriptEngine.Config.GetFloat("RecoilScaleFactor", m_recoilScaleFactor); + IConfigSource seConfigSource = m_ScriptEngine.ConfigSource; + + if (seConfigSource != null) + { + IConfig lslConfig = seConfigSource.Configs["LL-Functions"]; + if (lslConfig != null) + { + m_restrictEmail = lslConfig.GetBoolean("RestrictEmail", m_restrictEmail); + m_avatarHeightCorrection = lslConfig.GetFloat("AvatarHeightCorrection", m_avatarHeightCorrection); + m_useSimpleBoxesInGetBoundingBox = lslConfig.GetBoolean("UseSimpleBoxesInGetBoundingBox", m_useSimpleBoxesInGetBoundingBox); + m_addStatsInGetBoundingBox = lslConfig.GetBoolean("AddStatsInGetBoundingBox", m_addStatsInGetBoundingBox); + m_lABB1StdX0 = lslConfig.GetFloat("LowerAvatarBoundingBoxStandingXconst", m_lABB1StdX0); + m_lABB2StdX0 = lslConfig.GetFloat("UpperAvatarBoundingBoxStandingXconst", m_lABB2StdX0); + m_lABB1StdY0 = lslConfig.GetFloat("LowerAvatarBoundingBoxStandingYconst", m_lABB1StdY0); + m_lABB2StdY0 = lslConfig.GetFloat("UpperAvatarBoundingBoxStandingYconst", m_lABB2StdY0); + m_lABB1StdZ0 = lslConfig.GetFloat("LowerAvatarBoundingBoxStandingZconst", m_lABB1StdZ0); + m_lABB1StdZ1 = lslConfig.GetFloat("LowerAvatarBoundingBoxStandingZcoeff", m_lABB1StdZ1); + m_lABB2StdZ0 = lslConfig.GetFloat("UpperAvatarBoundingBoxStandingZconst", m_lABB2StdZ0); + m_lABB2StdZ1 = lslConfig.GetFloat("UpperAvatarBoundingBoxStandingZcoeff", m_lABB2StdZ1); + m_lABB1GrsX0 = lslConfig.GetFloat("LowerAvatarBoundingBoxGroundsittingXconst", m_lABB1GrsX0); + m_lABB2GrsX0 = lslConfig.GetFloat("UpperAvatarBoundingBoxGroundsittingXconst", m_lABB2GrsX0); + m_lABB1GrsY0 = lslConfig.GetFloat("LowerAvatarBoundingBoxGroundsittingYconst", m_lABB1GrsY0); + m_lABB2GrsY0 = lslConfig.GetFloat("UpperAvatarBoundingBoxGroundsittingYconst", m_lABB2GrsY0); + m_lABB1GrsZ0 = lslConfig.GetFloat("LowerAvatarBoundingBoxGroundsittingZconst", m_lABB1GrsZ0); + m_lABB1GrsZ1 = lslConfig.GetFloat("LowerAvatarBoundingBoxGroundsittingZcoeff", m_lABB1GrsZ1); + m_lABB2GrsZ0 = lslConfig.GetFloat("UpperAvatarBoundingBoxGroundsittingZconst", m_lABB2GrsZ0); + m_lABB2GrsZ1 = lslConfig.GetFloat("UpperAvatarBoundingBoxGroundsittingZcoeff", m_lABB2GrsZ1); + m_lABB1SitX0 = lslConfig.GetFloat("LowerAvatarBoundingBoxSittingXconst", m_lABB1SitX0); + m_lABB2SitX0 = lslConfig.GetFloat("UpperAvatarBoundingBoxSittingXconst", m_lABB2SitX0); + m_lABB1SitY0 = lslConfig.GetFloat("LowerAvatarBoundingBoxSittingYconst", m_lABB1SitY0); + m_lABB2SitY0 = lslConfig.GetFloat("UpperAvatarBoundingBoxSittingYconst", m_lABB2SitY0); + m_lABB1SitZ0 = lslConfig.GetFloat("LowerAvatarBoundingBoxSittingZconst", m_lABB1SitZ0); + m_lABB1SitZ1 = lslConfig.GetFloat("LowerAvatarBoundingBoxSittingZcoeff", m_lABB1SitZ1); + m_lABB2SitZ0 = lslConfig.GetFloat("UpperAvatarBoundingBoxSittingZconst", m_lABB2SitZ0); + m_lABB2SitZ1 = lslConfig.GetFloat("UpperAvatarBoundingBoxSittingZcoeff", m_lABB2SitZ1); + m_primSafetyCoeffX = lslConfig.GetFloat("PrimBoundingBoxSafetyCoefficientX", m_primSafetyCoeffX); + m_primSafetyCoeffY = lslConfig.GetFloat("PrimBoundingBoxSafetyCoefficientY", m_primSafetyCoeffY); + m_primSafetyCoeffZ = lslConfig.GetFloat("PrimBoundingBoxSafetyCoefficientZ", m_primSafetyCoeffZ); + m_useCastRayV3 = lslConfig.GetBoolean("UseLlCastRayV3", m_useCastRayV3); + m_floatToleranceInCastRay = lslConfig.GetFloat("FloatToleranceInLlCastRay", m_floatToleranceInCastRay); + m_floatTolerance2InCastRay = lslConfig.GetFloat("FloatTolerance2InLlCastRay", m_floatTolerance2InCastRay); + m_primLodInCastRay = (DetailLevel)lslConfig.GetInt("PrimDetailLevelInLlCastRay", (int)m_primLodInCastRay); + m_sculptLodInCastRay = (DetailLevel)lslConfig.GetInt("SculptDetailLevelInLlCastRay", (int)m_sculptLodInCastRay); + m_meshLodInCastRay = (DetailLevel)lslConfig.GetInt("MeshDetailLevelInLlCastRay", (int)m_meshLodInCastRay); + m_avatarLodInCastRay = (DetailLevel)lslConfig.GetInt("AvatarDetailLevelInLlCastRay", (int)m_avatarLodInCastRay); + m_maxHitsInCastRay = lslConfig.GetInt("MaxHitsInLlCastRay", m_maxHitsInCastRay); + m_maxHitsPerPrimInCastRay = lslConfig.GetInt("MaxHitsPerPrimInLlCastRay", m_maxHitsPerPrimInCastRay); + m_maxHitsPerObjectInCastRay = lslConfig.GetInt("MaxHitsPerObjectInLlCastRay", m_maxHitsPerObjectInCastRay); + m_detectExitsInCastRay = lslConfig.GetBoolean("DetectExitHitsInLlCastRay", m_detectExitsInCastRay); + m_filterPartsInCastRay = lslConfig.GetBoolean("FilterPartsInLlCastRay", m_filterPartsInCastRay); + m_doAttachmentsInCastRay = lslConfig.GetBoolean("DoAttachmentsInLlCastRay", m_doAttachmentsInCastRay); + m_msThrottleInCastRay = lslConfig.GetInt("ThrottleTimeInMsInLlCastRay", m_msThrottleInCastRay); + m_msPerRegionInCastRay = lslConfig.GetInt("AvailableTimeInMsPerRegionInLlCastRay", m_msPerRegionInCastRay); + m_msPerAvatarInCastRay = lslConfig.GetInt("AvailableTimeInMsPerAvatarInLlCastRay", m_msPerAvatarInCastRay); + m_msMinInCastRay = lslConfig.GetInt("RequiredAvailableTimeInMsInLlCastRay", m_msMinInCastRay); + m_msMaxInCastRay = lslConfig.GetInt("MaximumAvailableTimeInMsInLlCastRay", m_msMaxInCastRay); + m_useMeshCacheInCastRay = lslConfig.GetBoolean("UseMeshCacheInLlCastRay", m_useMeshCacheInCastRay); + } + + IConfig smtpConfig = seConfigSource.Configs["SMTP"]; + if (smtpConfig != null) + { + // there's an smtp config, so load in the snooze time. + EMAIL_PAUSE_TIME = smtpConfig.GetInt("email_pause_time", EMAIL_PAUSE_TIME); + + m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost); + } + } + m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000; } public override Object InitializeLifetimeService() @@ -171,9 +397,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api delay = (int)((float)delay * m_ScriptDelayFactor); if (delay == 0) return; - System.Threading.Thread.Sleep(delay); + + Sleep(delay); + } + + protected virtual void Sleep(int delay) + { + if (m_item == null) // Some unit tests don't set this + { + Thread.Sleep(delay); + return; + } + + m_ScriptEngine.SleepScript(m_item.ItemID, delay); } + /// + /// Check for co-operative termination. + /// + /// If called with 0, then just the check is performed with no wait. + public Scene World { get { return m_ScriptEngine.World; } @@ -209,7 +452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((item = GetScriptByName(name)) != UUID.Zero) m_ScriptEngine.ResetScript(item); else - ShoutError("llResetOtherScript: script "+name+" not found"); + Error("llResetOtherScript", "Can't find script '" + name + "'"); } public LSL_Integer llGetScriptState(string name) @@ -223,7 +466,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return m_ScriptEngine.GetScriptState(item) ?1:0; } - ShoutError("llGetScriptState: script "+name+" not found"); + Error("llGetScriptState", "Can't find script '" + name + "'"); // If we didn't find it, then it's safe to // assume it is not running. @@ -246,7 +489,78 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { - ShoutError("llSetScriptState: script "+name+" not found"); + Error("llSetScriptState", "Can't find script '" + name + "'"); + } + } + + /// + /// Get a given link entity from a linkset (linked objects and any sitting avatars). + /// + /// + /// If there are any ScenePresence's in the linkset (i.e. because they are sat upon one of the prims), then + /// these are counted as extra entities that correspond to linknums beyond the number of prims in the linkset. + /// The ScenePresences receive linknums in the order in which they sat. + /// + /// + /// The link entity. null if not found. + /// + /// + /// + /// Can be either a non-negative integer or ScriptBaseClass.LINK_THIS (-4). + /// If ScriptBaseClass.LINK_THIS then the entity containing the script is returned. + /// If the linkset has one entity and a linknum of zero is given, then the single entity is returned. If any + /// positive integer is given in this case then null is returned. + /// If the linkset has more than one entity and a linknum greater than zero but equal to or less than the number + /// of entities, then the entity which corresponds to that linknum is returned. + /// Otherwise, if a positive linknum is given which is greater than the number of entities in the linkset, then + /// null is returned. + /// + public ISceneEntity GetLinkEntity(SceneObjectPart part, int linknum) + { + if (linknum < 0) + { + if (linknum == ScriptBaseClass.LINK_THIS) + return part; + else + return null; + } + + int actualPrimCount = part.ParentGroup.PrimCount; + List sittingAvatars = part.ParentGroup.GetSittingAvatars(); + int adjustedPrimCount = actualPrimCount + sittingAvatars.Count; + + // Special case for a single prim. In this case the linknum is zero. However, this will not match a single + // prim that has any avatars sat upon it (in which case the root prim is link 1). + if (linknum == 0) + { + if (actualPrimCount == 1 && sittingAvatars.Count == 0) + return part; + + return null; + } + // Special case to handle a single prim with sitting avatars. GetLinkPart() would only match zero but + // here we must match 1 (ScriptBaseClass.LINK_ROOT). + else if (linknum == ScriptBaseClass.LINK_ROOT && actualPrimCount == 1) + { + if (sittingAvatars.Count > 0) + return part.ParentGroup.RootPart; + else + return null; + } + else if (linknum <= adjustedPrimCount) + { + if (linknum <= actualPrimCount) + { + return part.ParentGroup.GetLinkNumPart(linknum); + } + else + { + return sittingAvatars[linknum - actualPrimCount - 1]; + } + } + else + { + return null; } } @@ -301,77 +615,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - protected UUID InventoryKey(string name, int type) + public List GetLinkEntities(int linkType) { - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); - - if (item != null && item.Type == type) - return item.AssetID; - else - return UUID.Zero; + return GetLinkEntities(m_host, linkType); } - /// - /// accepts a valid UUID, -or- a name of an inventory item. - /// Returns a valid UUID or UUID.Zero if key invalid and item not found - /// in prim inventory. - /// - /// - /// - protected UUID KeyOrName(string k) + public List GetLinkEntities(SceneObjectPart part, int linkType) { - UUID key; + List ret; - // if we can parse the string as a key, use it. - // else try to locate the name in inventory of object. found returns key, - // not found returns UUID.Zero - if (!UUID.TryParse(k, out key)) + switch (linkType) { - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(k); + case ScriptBaseClass.LINK_SET: + return new List(part.ParentGroup.Parts); - if (item != null) - key = item.AssetID; - else - key = UUID.Zero; - } + case ScriptBaseClass.LINK_ROOT: + return new List() { part.ParentGroup.RootPart }; - return key; - } + case ScriptBaseClass.LINK_ALL_OTHERS: + ret = new List(part.ParentGroup.Parts); - /// - /// Return the UUID of the asset matching the specified key or name - /// and asset type. - /// - /// - /// - /// - protected UUID KeyOrName(string k, AssetType type) - { - UUID key; + if (ret.Contains(part)) + ret.Remove(part); - if (!UUID.TryParse(k, out key)) - { - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(k); - if (item != null && item.Type == (int)type) - key = item.AssetID; - } - else - { - lock (m_host.TaskInventory) - { - foreach (KeyValuePair item in m_host.TaskInventory) - { - if (item.Value.Type == (int)type && item.Value.Name == k) - { - key = item.Value.ItemID; - break; - } - } - } - } + return ret; + + case ScriptBaseClass.LINK_ALL_CHILDREN: + ret = new List(part.ParentGroup.Parts); + + if (ret.Contains(part.ParentGroup.RootPart)) + ret.Remove(part.ParentGroup.RootPart); + + return ret; + + case ScriptBaseClass.LINK_THIS: + return new List() { part }; + + default: + if (linkType < 0) + return new List(); + ISceneEntity target = GetLinkEntity(part, linkType); + if (target == null) + return new List(); - return key; + return new List() { target }; + } } //These are the implementations of the various ll-functions used by the LSL scripts. @@ -430,10 +719,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llFrand(double mag) { m_host.AddScriptLPS(1); - lock (Util.RandomClass) - { - return Util.RandomClass.NextDouble() * mag; - } + + return Util.RandomClass.NextDouble() * mag; } public LSL_Integer llFloor(double f) @@ -837,7 +1124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (channelID == 0) { - LSLError("Cannot use llRegionSay() on channel 0"); + Error("llRegionSay", "Cannot use on channel 0"); return; } @@ -846,6 +1133,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); + World.SimChat(Utils.StringToBytes(text), + ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); @@ -866,6 +1156,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID TargetID; UUID.TryParse(target, out TargetID); + World.SimChatToAgent(TargetID, Utils.StringToBytes(msg), + channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg); @@ -1255,12 +1548,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB) - { - if (value != 0) - m_host.SetBlockGrab(true); - else - m_host.SetBlockGrab(false); - } + m_host.BlockGrab = value != 0; + + if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT) == ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT) + m_host.ParentGroup.BlockGrabOverride = value != 0; if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE) { @@ -1321,10 +1612,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return 0; case ScriptBaseClass.STATUS_BLOCK_GRAB: - if (m_host.GetBlockGrab()) - return 1; - else - return 0; + return m_host.BlockGrab ? 1 : 0; + + case ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT: + return m_host.ParentGroup.BlockGrabOverride ? 1 : 0; case ScriptBaseClass.STATUS_DIE_AT_EDGE: if (m_host.GetDieAtEdge()) @@ -1427,6 +1718,73 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.SetFaceColorAlpha(face, color, null); } + public void llSetContentType(LSL_Key id, LSL_Integer type) + { + m_host.AddScriptLPS(1); + + if (m_UrlModule == null) + return; + + // Make sure the content type is text/plain to start with + m_UrlModule.HttpContentType(new UUID(id), "text/plain"); + + // Is the object owner online and in the region + ScenePresence agent = World.GetScenePresence(m_host.ParentGroup.OwnerID); + if (agent == null || agent.IsChildAgent) + return; // Fail if the owner is not in the same region + + // Is it the embeded browser? + string userAgent = m_UrlModule.GetHttpHeader(new UUID(id), "user-agent"); + if (userAgent.IndexOf("SecondLife") < 0) + return; // Not the embedded browser. Is this check good enough? + + // Use the IP address of the client and check against the request + // seperate logins from the same IP will allow all of them to get non-text/plain as long + // as the owner is in the region. Same as SL! + string logonFromIPAddress = agent.ControllingClient.RemoteEndPoint.Address.ToString(); + string requestFromIPAddress = m_UrlModule.GetHttpHeader(new UUID(id), "remote_addr"); + //m_log.Debug("IP from header='" + requestFromIPAddress + "' IP from endpoint='" + logonFromIPAddress + "'"); + if (requestFromIPAddress == null || requestFromIPAddress.Trim() == "") + return; + if (logonFromIPAddress == null || logonFromIPAddress.Trim() == "") + return; + + // If the request isnt from the same IP address then the request cannot be from the owner + if (!requestFromIPAddress.Trim().Equals(logonFromIPAddress.Trim())) + return; + + switch (type) + { + case ScriptBaseClass.CONTENT_TYPE_HTML: + m_UrlModule.HttpContentType(new UUID(id), "text/html"); + break; + case ScriptBaseClass.CONTENT_TYPE_XML: + m_UrlModule.HttpContentType(new UUID(id), "application/xml"); + break; + case ScriptBaseClass.CONTENT_TYPE_XHTML: + m_UrlModule.HttpContentType(new UUID(id), "application/xhtml+xml"); + break; + case ScriptBaseClass.CONTENT_TYPE_ATOM: + m_UrlModule.HttpContentType(new UUID(id), "application/atom+xml"); + break; + case ScriptBaseClass.CONTENT_TYPE_JSON: + m_UrlModule.HttpContentType(new UUID(id), "application/json"); + break; + case ScriptBaseClass.CONTENT_TYPE_LLSD: + m_UrlModule.HttpContentType(new UUID(id), "application/llsd+xml"); + break; + case ScriptBaseClass.CONTENT_TYPE_FORM: + m_UrlModule.HttpContentType(new UUID(id), "application/x-www-form-urlencoded"); + break; + case ScriptBaseClass.CONTENT_TYPE_RSS: + m_UrlModule.HttpContentType(new UUID(id), "application/rss+xml"); + break; + default: + m_UrlModule.HttpContentType(new UUID(id), "text/plain"); + break; + } + } + public void SetTexGen(SceneObjectPart part, int face,int style) { Primitive.TextureEntry tex = part.Shape.Textures; @@ -1522,7 +1880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (tex.FaceTextures[i] != null) { tex.FaceTextures[i].Shiny = sval; - tex.FaceTextures[i].Bump = bump;; + tex.FaceTextures[i].Bump = bump; } tex.DefaultTexture.Shiny = sval; tex.DefaultTexture.Bump = bump; @@ -1631,7 +1989,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); tex.DefaultTexture.RGBA = texcolor; } - + part.UpdateTextureEntry(tex.GetBytes()); return; } @@ -1703,9 +2061,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api part.Shape.LightColorR = Util.Clip((float)color.x, 0.0f, 1.0f); part.Shape.LightColorG = Util.Clip((float)color.y, 0.0f, 1.0f); part.Shape.LightColorB = Util.Clip((float)color.z, 0.0f, 1.0f); - part.Shape.LightIntensity = intensity; - part.Shape.LightRadius = radius; - part.Shape.LightFalloff = falloff; + part.Shape.LightIntensity = Util.Clip((float)intensity, 0.0f, 1.0f); + part.Shape.LightRadius = Util.Clip((float)radius, 0.1f, 20.0f); + part.Shape.LightFalloff = Util.Clip((float)falloff, 0.01f, 2.0f); } else { @@ -1752,7 +2110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api rgb.x = texcolor.R; rgb.y = texcolor.G; rgb.z = texcolor.B; - + return rgb; } else @@ -1765,7 +2123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); SetTexture(m_host, texture, face); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetTexture); } public void llSetLinkTexture(int linknumber, string texture, int face) @@ -1777,19 +2135,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (SceneObjectPart part in parts) SetTexture(part, texture, face); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetLinkTexture); } protected void SetTexture(SceneObjectPart part, string texture, int face) { UUID textureID = new UUID(); - textureID = InventoryKey(texture, (int)AssetType.Texture); - if (textureID == UUID.Zero) - { - if (!UUID.TryParse(texture, out textureID)) - return; - } + textureID = ScriptUtils.GetAssetIdFromItemName(m_host, texture, (int)AssetType.Texture); + if (textureID == UUID.Zero) + { + if (!UUID.TryParse(texture, out textureID)) + return; + } Primitive.TextureEntry tex = part.Shape.Textures; @@ -1821,7 +2179,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); ScaleTexture(m_host, u, v, face); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnScaleTexture); } protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) @@ -1857,7 +2215,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); OffsetTexture(m_host, u, v, face); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnOffsetTexture); } protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) @@ -1893,7 +2251,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); RotateTexture(m_host, rotation, face); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnRotateTexture); } protected void RotateTexture(SceneObjectPart part, double rotation, int face) @@ -1968,7 +2326,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SetPos(m_host, pos, true); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetPos); } /// @@ -1986,8 +2344,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. // // This workaround is to prevent silent failure of this function. - // According to the specification on the SL Wiki, providing a position outside of the - if (pos.x < 0 || pos.x > Constants.RegionSize || pos.y < 0 || pos.y > Constants.RegionSize) + // According to the specification on the SL Wiki, providing a position outside of the + if (pos.x < 0 || pos.x > World.RegionInfo.RegionSizeX || pos.y < 0 || pos.y > World.RegionInfo.RegionSizeY) { return 0; } @@ -1997,9 +2355,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.ParentGroup.IsAttachment || // return FALSE if attachment ( pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. - pos.x > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a east-adjacent region. + pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region. pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. - pos.y > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a north-adjacent region. + pos.y > (World.RegionInfo.RegionSizeY + 10) || // return FALSE if more than 10 meters into a north-adjacent region. pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m ) ) @@ -2151,14 +2509,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetRot); } public void llSetLocalRot(LSL_Rotation rot) { m_host.AddScriptLPS(1); SetRot(m_host, rot); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetLocalRot); } protected void SetRot(SceneObjectPart part, Quaternion rot) @@ -2195,7 +2553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { return llGetRootRotation(); } - + m_host.AddScriptLPS(1); Quaternion q = m_host.GetWorldRotation(); return new LSL_Rotation(q.X, q.Y, q.Z, q.W); @@ -2214,23 +2572,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) q = avatar.CameraRotation; // Mouselook else - q = avatar.Rotation; // Currently infrequently updated so may be inaccurate + q = avatar.GetWorldRotation(); // Currently infrequently updated so may be inaccurate } else q = part.ParentGroup.GroupRotation; // Likely never get here but just in case } else q = part.ParentGroup.GroupRotation; // just the group rotation - return new LSL_Rotation(q.X, q.Y, q.Z, q.W); + + return new LSL_Rotation(q); } - q = part.GetWorldRotation(); - return new LSL_Rotation(q.X, q.Y, q.Z, q.W); + + return new LSL_Rotation(part.GetWorldRotation()); } public LSL_Rotation llGetLocalRot() { m_host.AddScriptLPS(1); - return new LSL_Rotation(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); + + return new LSL_Rotation(m_host.RotationOffset); } public void llSetForce(LSL_Vector force, int local) @@ -2260,6 +2620,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return force; } + public void llSetVelocity(LSL_Vector velocity, int local) + { + m_host.AddScriptLPS(1); + + if (!m_host.ParentGroup.IsDeleted) + { + if (local != 0) + velocity *= llGetRot(); + + m_host.ParentGroup.RootPart.Velocity = velocity; + } + } + + public void llSetAngularVelocity(LSL_Vector angularVelocity, int local) + { + m_host.AddScriptLPS(1); + + if (!m_host.ParentGroup.IsDeleted) + { + if (local != 0) + angularVelocity *= llGetRot(); + + m_host.ParentGroup.RootPart.AngularVelocity = angularVelocity; + } + } + public LSL_Integer llTarget(LSL_Vector position, double range) { m_host.AddScriptLPS(1); @@ -2325,8 +2711,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetTorque() { m_host.AddScriptLPS(1); - Vector3 torque = m_host.ParentGroup.GetTorque(); - return new LSL_Vector(torque.X,torque.Y,torque.Z); + + return new LSL_Vector(m_host.ParentGroup.GetTorque()); } public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) @@ -2345,26 +2731,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_host.ParentGroup.IsAttachment) { ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar); - vel = avatar.Velocity; + vel = avatar.GetWorldVelocity(); } else { vel = m_host.Velocity; } - return new LSL_Vector(vel.X, vel.Y, vel.Z); + return new LSL_Vector(vel); } public LSL_Vector llGetAccel() { m_host.AddScriptLPS(1); - return new LSL_Vector(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z); + + return new LSL_Vector(m_host.Acceleration); } public LSL_Vector llGetOmega() { m_host.AddScriptLPS(1); - return new LSL_Vector(m_host.AngularVelocity.X, m_host.AngularVelocity.Y, m_host.AngularVelocity.Z); + + return new LSL_Vector(m_host.AngularVelocity); } public LSL_Float llGetTimeOfDay() @@ -2403,9 +2791,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSound(string sound, double volume, int queue, int loop) { m_host.AddScriptLPS(1); - // This function has been deprecated - // see http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSound - Deprecated("llSound"); + Deprecated("llSound", "Use llPlaySound instead"); } // Xantor 20080528 PlaySound updated so it accepts an objectinventory name -or- a key to a sound @@ -2417,9 +2803,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // send the sound, once, to all clients in range if (m_SoundModule != null) { - m_SoundModule.SendSound(m_host.UUID, - KeyOrName(sound, AssetType.Sound), volume, false, 0, - 0, false, false); + m_SoundModule.SendSound( + m_host.UUID, + ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), + volume, false, m_host.SoundQueueing ? (byte)SoundFlags.Queue : (byte)SoundFlags.None, + 0, false, false); } } @@ -2428,7 +2816,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_SoundModule != null) { - m_SoundModule.LoopSound(m_host.UUID, KeyOrName(sound), + m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), volume, 20, false); } } @@ -2438,7 +2826,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_SoundModule != null) { - m_SoundModule.LoopSound(m_host.UUID, KeyOrName(sound), + m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), volume, 20, true); } } @@ -2460,7 +2848,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_SoundModule != null) { m_SoundModule.SendSound(m_host.UUID, - KeyOrName(sound, AssetType.Sound), volume, false, 0, + ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, false, 0, 0, true, false); } } @@ -2472,7 +2860,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_SoundModule != null) { m_SoundModule.SendSound(m_host.UUID, - KeyOrName(sound, AssetType.Sound), volume, true, 0, 0, + ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, true, 0, 0, false, false); } } @@ -2489,8 +2877,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); if (m_SoundModule != null) - m_SoundModule.PreloadSound(m_host.UUID, KeyOrName(sound), 0); - ScriptSleep(1000); + m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0); + ScriptSleep(m_sleepMsOnPreloadSound); } /// @@ -2723,70 +3111,68 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return src.ToLower(); } - public LSL_Integer llGiveMoney(string destination, int amount) + public void llGiveMoney(string destination, int amount) { - m_host.AddScriptLPS(1); - - if (m_item.PermsGranter == UUID.Zero) - return 0; - - if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) + Util.FireAndForget(x => { - LSLError("No permissions to give money"); - return 0; - } + m_host.AddScriptLPS(1); - UUID toID = new UUID(); + if (m_item.PermsGranter == UUID.Zero) + return; - if (!UUID.TryParse(destination, out toID)) - { - LSLError("Bad key in llGiveMoney"); - return 0; - } + if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) + { + Error("llGiveMoney", "No permissions to give money"); + return; + } - IMoneyModule money = World.RequestModuleInterface(); + UUID toID = new UUID(); - if (money == null) - { - NotImplemented("llGiveMoney"); - return 0; - } + if (!UUID.TryParse(destination, out toID)) + { + Error("llGiveMoney", "Bad key in llGiveMoney"); + return; + } - bool result = money.ObjectGiveMoney( - m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount); + IMoneyModule money = World.RequestModuleInterface(); - if (result) - return 1; + if (money == null) + { + NotImplemented("llGiveMoney"); + return; + } - return 0; + money.ObjectGiveMoney( + m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount); + }, null, "LSL_Api.llGiveMoney"); } public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { m_host.AddScriptLPS(1); - Deprecated("llMakeExplosion"); - ScriptSleep(100); + Deprecated("llMakeExplosion", "Use llParticleSystem instead"); + ScriptSleep(m_sleepMsOnMakeExplosion); } public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) { m_host.AddScriptLPS(1); - Deprecated("llMakeFountain"); - ScriptSleep(100); + Deprecated("llMakeFountain", "Use llParticleSystem instead"); + ScriptSleep(m_sleepMsOnMakeFountain); } public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { m_host.AddScriptLPS(1); - Deprecated("llMakeSmoke"); - ScriptSleep(100); + Deprecated("llMakeSmoke", "Use llParticleSystem instead"); + ScriptSleep(m_sleepMsOnMakeSmoke); } public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { m_host.AddScriptLPS(1); - Deprecated("llMakeFire"); - ScriptSleep(100); + Deprecated("llMakeFire", "Use llParticleSystem instead"); + ScriptSleep(m_sleepMsOnMakeFire); } public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -2807,54 +3193,57 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (item == null) { - llSay(0, "Could not find object " + inventory); + Error("llRezAtRoot", "Can't find object '" + inventory + "'"); return; } if (item.InvType != (int)InventoryType.Object) { - llSay(0, "Unable to create requested object. Object is missing from database."); + Error("llRezAtRoot", "Can't create requested object; object is missing from database"); return; } // need the magnitude later // float velmag = (float)Util.GetMagnitude(llvel); - SceneObjectGroup new_group = World.RezObject(m_host, item, pos, rot, vel, param); + List new_groups = World.RezObject(m_host, item, pos, rot, vel, param); // If either of these are null, then there was an unknown error. - if (new_group == null) + if (new_groups == null) return; - // objects rezzed with this method are die_at_edge by default. - new_group.RootPart.SetDieAtEdge(true); + foreach (SceneObjectGroup group in new_groups) + { + // objects rezzed with this method are die_at_edge by default. + group.RootPart.SetDieAtEdge(true); - new_group.ResumeScripts(); + group.ResumeScripts(); - m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( - "object_rez", new Object[] { - new LSL_String( - new_group.RootPart.UUID.ToString()) }, - new DetectParams[0])); + m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( + "object_rez", new Object[] { + new LSL_String( + group.RootPart.UUID.ToString()) }, + new DetectParams[0])); - float groupmass = new_group.GetMass(); + float groupmass = group.GetMass(); - PhysicsActor pa = new_group.RootPart.PhysActor; + PhysicsActor pa = group.RootPart.PhysActor; - //Recoil. - if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) - { - Vector3 recoil = -vel * groupmass * m_recoilScaleFactor; - if (recoil != Vector3.Zero) + //Recoil. + if (pa != null && pa.IsPhysical && (Vector3)vel != Vector3.Zero) { - llApplyImpulse(recoil, 0); + Vector3 recoil = -vel * groupmass * m_recoilScaleFactor; + if (recoil != Vector3.Zero) + { + llApplyImpulse(recoil, 0); + } } + // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) } - // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) - }); + }, null, "LSL_Api.llRezAtRoot"); //ScriptSleep((int)((groupmass * velmag) / 10)); - ScriptSleep(100); + ScriptSleep(m_sleepMsOnRezAtRoot); } public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -2868,26 +3257,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Determine where we are looking from LSL_Vector from = llGetPos(); - // Work out the normalised vector from the source to the target - LSL_Vector delta = llVecNorm(target - from); - LSL_Vector angle = new LSL_Vector(0,0,0); - - // Calculate the yaw - // subtracting PI_BY_TWO is required to compensate for the odd SL co-ordinate system - angle.x = llAtan2(delta.z, delta.y) - ScriptBaseClass.PI_BY_TWO; + // normalized direction to target + LSL_Vector dir = llVecNorm(target - from); + // use vertical to help compute left axis + LSL_Vector up = new LSL_Vector(0.0, 0.0, 1.0); + // find normalized left axis parallel to horizon + LSL_Vector left = llVecNorm(LSL_Vector.Cross(up, dir)); + // make up orthogonal to left and dir + up = LSL_Vector.Cross(dir, left); - // Calculate pitch - angle.y = llAtan2(delta.x, llSqrt((delta.y * delta.y) + (delta.z * delta.z))); + // compute rotation based on orthogonal axes + LSL_Rotation rot = new LSL_Rotation(0.0, 0.707107, 0.0, 0.707107) * llAxes2Rot(dir, left, up); - // we need to convert from a vector describing - // the angles of rotation in radians into rotation value - LSL_Rotation rot = llEuler2Rot(angle); - // Per discussion with Melanie, for non-physical objects llLookAt appears to simply // set the rotation of the object, copy that behavior PhysicsActor pa = m_host.PhysActor; - if (strength == 0 || pa == null || !pa.IsPhysical) + if (m_host.ParentGroup.IsAttachment || strength == 0 || pa == null || !pa.IsPhysical) { llSetRot(rot); } @@ -2900,7 +3286,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopLookAt() { m_host.AddScriptLPS(1); -// NotImplemented("llStopLookAt"); m_host.StopLookAt(); } @@ -2917,7 +3302,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // m_log.Info("llSleep snoozing " + sec + "s."); m_host.AddScriptLPS(1); - Thread.Sleep((int)(sec * 1000)); + + Sleep((int)(sec * 1000)); } public LSL_Float llGetMass() @@ -2950,6 +3336,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + public LSL_Float llGetMassMKS() + { + // this is what the wiki says it does! + // http://wiki.secondlife.com/wiki/LlGetMassMKS + return llGetMass() * 100.0; + } + public void llCollisionFilter(string name, string id, int accept) { m_host.AddScriptLPS(1); @@ -2958,7 +3351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!UUID.TryParse(id, out objectID)) objectID = UUID.Zero; - + if (objectID == UUID.Zero && name == "") return; @@ -3026,7 +3419,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; if (attachmentsModule != null) - return attachmentsModule.AttachObject(presence, grp, (uint)attachmentPoint, false, false); + return attachmentsModule.AttachObject(presence, grp, (uint)attachmentPoint, false, true, true); else return false; } @@ -3039,7 +3432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void DetachFromAvatar() { - Util.FireAndForget(DetachWrapper, m_host); + Util.FireAndForget(DetachWrapper, m_host, "LSL_Api.DetachFromAvatar"); } private void DetachWrapper(object o) @@ -3083,13 +3476,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTakeCamera(string avatar) { m_host.AddScriptLPS(1); - Deprecated("llTakeCamera"); + Deprecated("llTakeCamera", "Use llSetCameraParams instead"); } public void llReleaseCamera(string avatar) { m_host.AddScriptLPS(1); - Deprecated("llReleaseCamera"); + Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); } public LSL_String llGetOwner() @@ -3112,14 +3505,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // TODO: figure out values for client, fromSession, and imSessionID // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); - UUID friendTransactionID = UUID.Random(); - - //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); GridInstantMessage msg = new GridInstantMessage(); - msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; + msg.fromAgentID = new Guid(m_host.OwnerID.ToString()); // fromAgentID.Guid; msg.toAgentID = new Guid(user); // toAgentID.Guid; - msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here + msg.imSessionID = new Guid(m_host.UUID.ToString()); // This is the item we're mucking with here // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; @@ -3142,20 +3532,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api msg.ParentEstateID = 0; //ParentEstateID; msg.Position = new Vector3(m_host.AbsolutePosition); msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; - msg.binaryBucket + + Vector3 pos = m_host.AbsolutePosition; + msg.binaryBucket = Util.StringToBytes256( - "{0}/{1}/{2}/{3}", - World.RegionInfo.RegionName, - (int)Math.Floor(m_host.AbsolutePosition.X), - (int)Math.Floor(m_host.AbsolutePosition.Y), - (int)Math.Floor(m_host.AbsolutePosition.Z)); + "{0}/{1}/{2}/{3}", + World.RegionInfo.RegionName, + (int)Math.Floor(pos.X), + (int)Math.Floor(pos.Y), + (int)Math.Floor(pos.Z)); if (m_TransferModule != null) { m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - - ScriptSleep(2000); + + ScriptSleep(m_sleepMsOnInstantMessage); } public void llEmail(string address, string subject, string message) @@ -3164,12 +3556,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { - ShoutError("llEmail: email module not configured"); + Error("llEmail", "Email module not configured"); return; } + //Restrict email destination to the avatars registered email address? + //The restriction only applies if the destination address is not local. + if (m_restrictEmail == true && address.Contains(m_internalObjectHost) == false) + { + UserAccount account = + World.UserAccountService.GetUserAccount( + World.RegionInfo.ScopeID, + m_host.OwnerID); + + if (account == null) + { + Error("llEmail", "Can't find user account for '" + m_host.OwnerID.ToString() + "'"); + return; + } + + if (String.IsNullOrEmpty(account.Email)) + { + Error("llEmail", "User account has not registered an email address."); + return; + } + + address = account.Email; + } + emailModule.SendEmail(m_host.UUID, address, subject, message); - llSleep(EMAIL_PAUSE_TIME); + ScriptSleep(m_sleepMsOnEmail); } public void llGetNextEmail(string address, string subject) @@ -3178,7 +3594,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { - ShoutError("llGetNextEmail: email module not configured"); + Error("llGetNextEmail", "Email module not configured"); return; } Email email; @@ -3263,23 +3679,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api catch (NotImplementedException) { // Currently not implemented in DotNetEngine only XEngine - NotImplemented("llMinEventDelay in DotNetEngine"); + NotImplemented("llMinEventDelay", "In DotNetEngine"); } } - /// - /// llSoundPreload is deprecated. In SL this appears to do absolutely nothing - /// and is documented to have no delay. - /// public void llSoundPreload(string sound) { m_host.AddScriptLPS(1); + Deprecated("llSoundPreload", "Use llPreloadSound instead"); } public void llRotLookAt(LSL_Rotation target, double strength, double damping) { m_host.AddScriptLPS(1); - + // Per discussion with Melanie, for non-physical objects llLookAt appears to simply // set the rotation of the object, copy that behavior PhysicsActor pa = m_host.PhysActor; @@ -3321,7 +3734,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence != null) { // Do NOT try to parse UUID, animations cannot be triggered by ID - UUID animID = InventoryKey(anim, (int)AssetType.Animation); + UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); if (animID == UUID.Zero) presence.Animator.AddAnimation(anim, m_host.UUID); else @@ -3343,7 +3756,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence != null) { - UUID animID = KeyOrName(anim); + UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim); if (animID == UUID.Zero) presence.Animator.RemoveAnimation(anim); @@ -3371,6 +3784,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain) { + PhysicsActor pa = part.PhysActor; + if ( ( pa == null || !pa.IsPhysical ) && gain == 0.0d ) + spinrate = 0.0d; part.UpdateAngularVelocity(axis * spinrate); } @@ -3415,11 +3831,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | ScriptBaseClass.PERMISSION_CONTROL_CAMERA | + ScriptBaseClass.PERMISSION_TRACK_CAMERA | ScriptBaseClass.PERMISSION_ATTACH; } else { - if (m_host.ParentGroup.GetSittingAvatars().Contains(agentID)) + if (m_host.ParentGroup.GetSittingAvatars().SingleOrDefault(sp => sp.UUID == agentID) != null) { // When agent is sitting, certain permissions are implicit if requested from sitting agent implicitPerms = ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | @@ -3451,10 +3868,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } ScenePresence presence = World.GetScenePresence(agentID); + if (presence != null) { // If permissions are being requested from an NPC and were not implicitly granted above then - // auto grant all reuqested permissions if the script is owned by the NPC or the NPCs owner + // auto grant all requested permissions if the script is owned by the NPC or the NPCs owner INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null && npcModule.IsNPC(agentID, World)) { @@ -3570,22 +3988,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCreateLink(string target, int parent) { m_host.AddScriptLPS(1); - UUID targetID; - - if (!UUID.TryParse(target, out targetID)) - return; if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 && !m_automaticLinkPermission) { - ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); + Error("llCreateLink", "PERMISSION_CHANGE_LINKS permission not set"); return; } - IClientAPI client = null; - ScenePresence sp = World.GetScenePresence(m_item.PermsGranter); - if (sp != null) - client = sp.ControllingClient; + CreateLink(target, parent); + } + + public void CreateLink(string target, int parent) + { + UUID targetID; + + if (!UUID.TryParse(target, out targetID)) + return; SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID); @@ -3620,10 +4039,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api parentPrim.HasGroupChanged = true; parentPrim.ScheduleGroupForFullUpdate(); + IClientAPI client = null; + ScenePresence sp = World.GetScenePresence(m_host.OwnerID); + if (sp != null) + client = sp.ControllingClient; + if (client != null) parentPrim.SendPropertiesToClient(client); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnCreateLink); } public void llBreakLink(int linknum) @@ -3633,10 +4057,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 && !m_automaticLinkPermission) { - ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); + Error("llBreakLink", "PERMISSION_CHANGE_LINKS permission not set"); return; } + BreakLink(linknum); + } + + public void BreakLink(int linknum) + { if (linknum < ScriptBaseClass.LINK_THIS) return; @@ -3712,6 +4141,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llBreakAllLinks() { m_host.AddScriptLPS(1); + + if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 + && !m_automaticLinkPermission) + { + Error("llBreakAllLinks", "PERMISSION_CHANGE_LINKS permission not set"); + return; + } + + BreakAllLinks(); + } + + public void BreakAllLinks() + { SceneObjectGroup parentPrim = m_host.ParentGroup; if (parentPrim.AttachmentPoint != 0) return; // Fail silently if attached @@ -3732,47 +4174,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - if (linknum < 0) - { - if (linknum == ScriptBaseClass.LINK_THIS) - return m_host.UUID.ToString(); - else - return ScriptBaseClass.NULL_KEY; - } - - int actualPrimCount = m_host.ParentGroup.PrimCount; - List sittingAvatarIds = m_host.ParentGroup.GetSittingAvatars(); - int adjustedPrimCount = actualPrimCount + sittingAvatarIds.Count; - - // Special case for a single prim. In this case the linknum is zero. However, this will not match a single - // prim that has any avatars sat upon it (in which case the root prim is link 1). - if (linknum == 0) - { - if (actualPrimCount == 1 && sittingAvatarIds.Count == 0) - return m_host.UUID.ToString(); + ISceneEntity entity = GetLinkEntity(m_host, linknum); - return ScriptBaseClass.NULL_KEY; - } - // Special case to handle a single prim with sitting avatars. GetLinkPart() would only match zero but - // here we must match 1 (ScriptBaseClass.LINK_ROOT). - else if (linknum == 1 && actualPrimCount == 1) - { - if (sittingAvatarIds.Count > 0) - return m_host.ParentGroup.RootPart.UUID.ToString(); - else - return ScriptBaseClass.NULL_KEY; - } - else if (linknum <= adjustedPrimCount) - { - if (linknum <= actualPrimCount) - return m_host.ParentGroup.GetLinkNumPart(linknum).UUID.ToString(); - else - return sittingAvatarIds[linknum - actualPrimCount - 1].ToString(); - } + if (entity != null) + return entity.UUID.ToString(); else - { return ScriptBaseClass.NULL_KEY; - } } /// @@ -3818,55 +4225,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - if (linknum < 0) - { - if (linknum == ScriptBaseClass.LINK_THIS) - return m_host.Name; - else - return ScriptBaseClass.NULL_KEY; - } - - int actualPrimCount = m_host.ParentGroup.PrimCount; - List sittingAvatarIds = m_host.ParentGroup.GetSittingAvatars(); - int adjustedPrimCount = actualPrimCount + sittingAvatarIds.Count; - - // Special case for a single prim. In this case the linknum is zero. However, this will not match a single - // prim that has any avatars sat upon it (in which case the root prim is link 1). - if (linknum == 0) - { - if (actualPrimCount == 1 && sittingAvatarIds.Count == 0) - return m_host.Name; + ISceneEntity entity = GetLinkEntity(m_host, linknum); - return ScriptBaseClass.NULL_KEY; - } - // Special case to handle a single prim with sitting avatars. GetLinkPart() would only match zero but - // here we must match 1 (ScriptBaseClass.LINK_ROOT). - else if (linknum == 1 && actualPrimCount == 1) - { - if (sittingAvatarIds.Count > 0) - return m_host.ParentGroup.RootPart.Name; - else - return ScriptBaseClass.NULL_KEY; - } - else if (linknum <= adjustedPrimCount) - { - if (linknum <= actualPrimCount) - { - return m_host.ParentGroup.GetLinkNumPart(linknum).Name; - } - else - { - ScenePresence sp = World.GetScenePresence(sittingAvatarIds[linknum - actualPrimCount - 1]); - if (sp != null) - return sp.Name; - else - return ScriptBaseClass.NULL_KEY; - } - } + if (entity != null) + return entity.Name; else - { return ScriptBaseClass.NULL_KEY; - } } public LSL_Integer llGetInventoryNumber(int type) @@ -3931,7 +4295,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!UUID.TryParse(destination, out destId)) { - llSay(0, "Could not parse key " + destination); + Error("llGiveInventory", "Can't parse destination key '" + destination + "'"); return; } @@ -3939,8 +4303,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (item == null) { - llSay(0, String.Format("Could not find object '{0}'", inventory)); - throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); + Error("llGiveInventory", "Can't find inventory object '" + inventory + "'"); + return; } UUID objId = item.ItemID; @@ -3964,15 +4328,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (account == null) { - llSay(0, "Can't find destination "+destId.ToString()); - return; + GridUserInfo info = World.GridUserService.GetGridUserInfo(destId.ToString()); + if(info == null || info.Online == false) + { + Error("llGiveInventory", "Can't find destination '" + destId.ToString() + "'"); + return; + } } } // destination is an avatar - InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId); + string message; + InventoryItemBase agentItem = World.MoveTaskInventoryItem(destId, UUID.Zero, m_host, objId, out message); if (agentItem == null) + { + llSay(0, message); return; + } if (m_TransferModule != null) { @@ -3991,7 +4363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - ScriptSleep(3000); + ScriptSleep(m_sleepMsOnGiveInventory); } } @@ -4054,87 +4426,98 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UserAccount account; UserInfoCacheEntry ce; - if (!m_userInfoCache.TryGetValue(uuid, out ce)) + + lock (m_userInfoCache) { - account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); - if (account == null) + if (!m_userInfoCache.TryGetValue(uuid, out ce)) { - m_userInfoCache[uuid] = null; // Cache negative - return UUID.Zero.ToString(); - } - + account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); + if (account == null) + { + m_userInfoCache[uuid] = null; // Cache negative + return UUID.Zero.ToString(); + } - PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); - if (pinfos != null && pinfos.Length > 0) - { - foreach (PresenceInfo p in pinfos) + PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); + if (pinfos != null && pinfos.Length > 0) { - if (p.RegionID != UUID.Zero) + foreach (PresenceInfo p in pinfos) { - pinfo = p; + if (p.RegionID != UUID.Zero) + { + pinfo = p; + } } } - } - - ce = new UserInfoCacheEntry(); - ce.time = Util.EnvironmentTickCount(); - ce.account = account; - ce.pinfo = pinfo; - } - else - { - if (ce == null) - return UUID.Zero.ToString(); - account = ce.account; - pinfo = ce.pinfo; - } + ce = new UserInfoCacheEntry(); + ce.time = Util.EnvironmentTickCount(); + ce.account = account; + ce.pinfo = pinfo; - if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) - { - PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); - if (pinfos != null && pinfos.Length > 0) + m_userInfoCache[uuid] = ce; + } + else { - foreach (PresenceInfo p in pinfos) + if (ce == null) + return UUID.Zero.ToString(); + + account = ce.account; + + if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) + >= LlRequestAgentDataCacheTimeoutMs) { - if (p.RegionID != UUID.Zero) + PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); + if (pinfos != null && pinfos.Length > 0) + { + foreach (PresenceInfo p in pinfos) + { + if (p.RegionID != UUID.Zero) + { + pinfo = p; + } + } + } + else { - pinfo = p; + pinfo = null; } + + ce.time = Util.EnvironmentTickCount(); + ce.pinfo = pinfo; + } + else + { + pinfo = ce.pinfo; } } - else - pinfo = null; - - ce.time = Util.EnvironmentTickCount(); - ce.pinfo = pinfo; } string reply = String.Empty; switch (data) { - case 1: // DATA_ONLINE (0|1) + case ScriptBaseClass.DATA_ONLINE: if (pinfo != null && pinfo.RegionID != UUID.Zero) reply = "1"; else reply = "0"; break; - case 2: // DATA_NAME (First Last) + case ScriptBaseClass.DATA_NAME: // (First Last) reply = account.FirstName + " " + account.LastName; break; - case 3: // DATA_BORN (YYYY-MM-DD) + case ScriptBaseClass.DATA_BORN: // (YYYY-MM-DD) DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0); born = born.AddSeconds(account.Created); reply = born.ToString("yyyy-MM-dd"); break; - case 4: // DATA_RATING (0,0,0,0,0,0) + case ScriptBaseClass.DATA_RATING: // (0,0,0,0,0,0) reply = "0,0,0,0,0,0"; break; - case 7: // DATA_USERLEVEL (integer) + case 7: // DATA_USERLEVEL (integer). This is not available in LL and so has no constant. reply = account.UserLevel.ToString(); break; - case 8: // DATA_PAYINFO (0|1|2|3) + case ScriptBaseClass.DATA_PAYINFO: // (0|1|2|3) reply = "0"; break; default: @@ -4150,7 +4533,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(100); + ScriptSleep(m_sleepMsOnRequestAgentData); return tid.ToString(); } @@ -4166,10 +4549,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, item.AssetID.ToString()); - Vector3 region = new Vector3( - World.RegionInfo.RegionLocX * Constants.RegionSize, - World.RegionInfo.RegionLocY * Constants.RegionSize, - 0); + Vector3 region = new Vector3(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); World.AssetService.Get(item.AssetID.ToString(), this, delegate(string i, object sender, AssetBase a) @@ -4186,12 +4566,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply); }); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestInventoryData); return tid.ToString(); } } - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestInventoryData); return String.Empty; } @@ -4211,14 +4591,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence != null) { // agent must be over the owners land - if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) + if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) { World.TeleportClientHome(agentId, presence.ControllingClient); } } } - ScriptSleep(5000); + + ScriptSleep(m_sleepMsOnSetDamage); } public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) @@ -4238,8 +4618,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api destination = World.RegionInfo.RegionName; // agent must be over the owners land - if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) + if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) { DoLLTeleport(presence, destination, targetPos, targetLookAt); } @@ -4259,7 +4638,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); UUID agentId = new UUID(); - ulong regionHandle = Utils.UIntsToLong((uint)global_coords.x, (uint)global_coords.y); + ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); if (UUID.TryParse(agent, out agentId)) { @@ -4270,8 +4649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence.GodLevel >= 200) return; // agent must be over the owners land - if (m_host.OwnerID == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) + if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) { World.RequestTeleportLocation(presence.ControllingClient, regionHandle, targetPos, targetLookAt, (uint)TeleportFlags.ViaLocation); } @@ -4288,7 +4666,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void DoLLTeleport(ScenePresence sp, string destination, Vector3 targetPos, Vector3 targetLookAt) { - UUID assetID = KeyOrName(destination); + UUID assetID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, destination); // The destinaion is not an asset ID and also doesn't name a landmark. // Use it as a sim name @@ -4321,22 +4699,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID av = new UUID(); if (!UUID.TryParse(agent,out av)) { - LSLError("First parameter to llDialog needs to be a key"); + Error("llTextBox", "First parameter must be a key"); return; } if (message == string.Empty) { - ShoutError("Trying to use llTextBox with empty message."); + Error("llTextBox", "Empty message"); } else if (message.Length > 512) { - ShoutError("Trying to use llTextBox with message over 512 characters."); + Error("llTextBox", "Message more than 512 characters"); } else { dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnTextBox); } } @@ -4353,9 +4731,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSound(string impact_sound, double impact_volume) { m_host.AddScriptLPS(1); - + // TODO: Parameter check logic required. - m_host.CollisionSound = KeyOrName(impact_sound, AssetType.Sound); + m_host.CollisionSound = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, impact_sound, AssetType.Sound); m_host.CollisionSoundVolume = (float)impact_volume; } @@ -4475,7 +4853,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (pushrestricted) { - ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos.X, PusheePos.Y); + ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos); // We didn't find the parcel but region is push restricted so assume it is NOT ok if (targetlandObj == null) @@ -4490,7 +4868,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { - ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos.X, PusheePos.Y); + ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos); if (targetlandObj == null) { // We didn't find the parcel but region isn't push restricted so assume it's ok @@ -4520,6 +4898,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } + if (pushAllowed) { float distance = (PusheePos - m_host.AbsolutePosition).Length(); @@ -4548,17 +4927,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api applied_linear_impulse *= scaling_factor; } + if (pusheeIsAvatar) { if (pusheeav != null) { - if (pusheeav.PhysicsActor != null) + PhysicsActor pa = pusheeav.PhysicsActor; + + if (pa != null) { if (local != 0) { applied_linear_impulse *= m_host.GetWorldRotation(); } - pusheeav.PhysicsActor.AddForce(applied_linear_impulse, true); + + pa.AddForce(applied_linear_impulse, true); } } } @@ -4666,6 +5049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api s = Math.Cos(angle * 0.5); t = Math.Sin(angle * 0.5); // temp value to avoid 2 more sin() calcs + axis = LSL_Vector.Norm(axis); x = axis.x * t; y = axis.y * t; z = axis.z * t; @@ -4673,41 +5057,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return new LSL_Rotation(x,y,z,s); } - - // Xantor 29/apr/2008 - // converts a Quaternion to X,Y,Z axis rotations + /// + /// Returns the axis of rotation for a quaternion + /// + /// + /// public LSL_Vector llRot2Axis(LSL_Rotation rot) { m_host.AddScriptLPS(1); - double x,y,z; - - if (rot.s > 1) // normalization needed - { - double length = Math.Sqrt(rot.x * rot.x + rot.y * rot.y + - rot.z * rot.z + rot.s * rot.s); - rot.x /= length; - rot.y /= length; - rot.z /= length; - rot.s /= length; + if (Math.Abs(rot.s) > 1) // normalization needed + rot.Normalize(); - } - - // double angle = 2 * Math.Acos(rot.s); double s = Math.Sqrt(1 - rot.s * rot.s); if (s < 0.001) { - x = 1; - y = z = 0; + return new LSL_Vector(1, 0, 0); } else { - x = rot.x / s; // normalise axis - y = rot.y / s; - z = rot.z / s; + double invS = 1.0 / s; + if (rot.s < 0) invS = -invS; + return new LSL_Vector(rot.x * invS, rot.y * invS, rot.z * invS); } - - return new LSL_Vector(x,y,z); } @@ -4716,18 +5088,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - if (rot.s > 1) // normalization needed - { - double length = Math.Sqrt(rot.x * rot.x + rot.y * rot.y + - rot.z * rot.z + rot.s * rot.s); - - rot.x /= length; - rot.y /= length; - rot.z /= length; - rot.s /= length; - } + if (Math.Abs(rot.s) > 1) // normalization needed + rot.Normalize(); double angle = 2 * Math.Acos(rot.s); + if (angle > Math.PI) + angle = 2 * Math.PI - angle; return angle; } @@ -4907,8 +5273,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetCenterOfMass() { m_host.AddScriptLPS(1); - Vector3 center = m_host.GetGeometricCenter(); - return new LSL_Vector(center.X,center.Y,center.Z); + + return new LSL_Vector(m_host.GetCenterOfMass()); } public LSL_List llListSort(LSL_List src, int stride, int ascending) @@ -5043,10 +5409,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // SL spits out an empty string for types other than key & string // At the time of patching, LSL_Key is currently LSL_String, // so the OR check may be a little redundant, but it's being done - // for completion and should LSL_Key ever be implemented + // for completion and should LSL_Key ever be implemented // as it's own struct + // NOTE: 3rd case is needed because a NULL_KEY comes through as + // type 'obj' and wrongly returns "" else if (!(src.Data[index] is LSL_String || - src.Data[index] is LSL_Key)) + src.Data[index] is LSL_Key || + src.Data[index].ToString() == "00000000-0000-0000-0000-000000000000")) { return ""; } @@ -5179,8 +5548,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - return string.Join(", ", - (new List(src.Data)).ConvertAll(o => + return string.Join(", ", + (new List(src.Data)).ConvertAll(o => { return o.ToString(); }).ToArray()); @@ -5254,7 +5623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llListRandomize(LSL_List src, int stride) { LSL_List result; - Random rand = new Random(); + BetterRandom rand = new BetterRandom(); int chunkk; int[] chunks; @@ -5270,24 +5639,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // If not, then return the src list. This also // traps those cases where stride > length. - if (src.Length != stride && src.Length%stride == 0) + if (src.Length != stride && src.Length % stride == 0) { chunkk = src.Length/stride; chunks = new int[chunkk]; for (int i = 0; i < chunkk; i++) + { chunks[i] = i; + } // Knuth shuffle the chunkk index - for (int i = chunkk - 1; i >= 1; i--) + for (int i = chunkk - 1; i > 0; i--) { // Elect an unrandomized chunk to swap int index = rand.Next(i + 1); - int tmp; // and swap position with first unrandomized chunk - tmp = chunks[i]; + int tmp = chunks[i]; chunks[i] = chunks[index]; chunks[index] = tmp; } @@ -5300,7 +5670,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { for (int j = 0; j < stride; j++) { - result.Add(src.Data[chunks[i]*stride+j]); + result.Add(src.Data[chunks[i] * stride + j]); } } } @@ -5417,7 +5787,72 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRegionCorner() { m_host.AddScriptLPS(1); - return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); + return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); + } + + public LSL_String llGetEnv(LSL_String name) + { + m_host.AddScriptLPS(1); + if (name == "agent_limit") + { + return World.RegionInfo.RegionSettings.AgentLimit.ToString(); + } + else if (name == "dynamic_pathfinding") + { + return "0"; + } + else if (name == "estate_id") + { + return World.RegionInfo.EstateSettings.EstateID.ToString(); + } + else if (name == "estate_name") + { + return World.RegionInfo.EstateSettings.EstateName; + } + else if (name == "frame_number") + { + return World.Frame.ToString(); + } + else if (name == "region_cpu_ratio") + { + return "1"; + } + else if (name == "region_idle") + { + return "0"; + } + else if (name == "region_product_name") + { + if (World.RegionInfo.RegionType != String.Empty) + return World.RegionInfo.RegionType; + else + return ""; + } + else if (name == "region_product_sku") + { + return "OpenSim"; + } + else if (name == "region_start_time") + { + return World.UnixStartTime.ToString(); + } + else if (name == "sim_channel") + { + return "OpenSim"; + } + else if (name == "sim_version") + { + return World.GetSimulatorVersion(); + } + else if (name == "simulator_hostname") + { + IUrlModule UrlModule = World.RequestModuleInterface(); + return UrlModule.ExternalHostNameForLSL; + } + else + { + return ""; + } } /// @@ -5429,8 +5864,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index) { - LSL_List pref = null; - LSL_List suff = null; + LSL_List pref; + LSL_List suff; m_host.AddScriptLPS(1); @@ -5564,7 +5999,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Float mag; if (dir.x > 0) { - mag = (Constants.RegionSize - pos.x) / dir.x; + mag = (World.RegionInfo.RegionSizeX - pos.x) / dir.x; } else { @@ -5575,7 +6010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api edge.y = pos.y + (dir.y * mag); - if (edge.y > Constants.RegionSize || edge.y < 0) + if (edge.y > World.RegionInfo.RegionSizeY || edge.y < 0) { // Y goes out of bounds first edge.y = dir.y / Math.Abs(dir.y); @@ -5704,12 +6139,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetAgentLanguage(string id) { - // This should only return a value if the avatar is in the same region - //ckrinke 1-30-09 : This needs to parse the XMLRPC language field supplied - //by the client at login. Currently returning only en-us until our I18N - //effort gains momentum + // This should only return a value if the avatar is in the same region, but eh. idc. m_host.AddScriptLPS(1); - return "en-us"; + if (World.AgentPreferencesService == null) + { + Error("llGetAgentLanguage", "No AgentPreferencesService present"); + } + else + { + UUID key = new UUID(); + if (UUID.TryParse(id, out key)) + { + return new LSL_String(World.AgentPreferencesService.GetLang(key)); + } + } + return new LSL_String("en-us"); } /// /// http://wiki.secondlife.com/wiki/LlGetAgentList @@ -5739,12 +6183,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } ILandObject land; - Vector3 pos; UUID id = UUID.Zero; + if (parcel || parcelOwned) { - pos = m_host.ParentGroup.RootPart.GetWorldPosition(); - land = World.LandChannel.GetLandObject(pos.X, pos.Y); + land = World.LandChannel.GetLandObject(m_host.ParentGroup.RootPart.GetWorldPosition()); if (land == null) { id = UUID.Zero; @@ -5770,8 +6213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (!regionWide) { - pos = ssp.AbsolutePosition; - land = World.LandChannel.GetLandObject(pos.X, pos.Y); + land = World.LandChannel.GetLandObject(ssp.AbsolutePosition); if (land != null) { if (parcelOwned && land.LandData.OwnerID == id || @@ -5800,7 +6242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); m_host.AdjustSoundGain(volume); - ScriptSleep(100); + ScriptSleep(m_sleepMsOnAdjustSoundVolume); } public void llSetSoundRadius(double radius) @@ -5881,7 +6323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_SoundModule != null) { m_SoundModule.TriggerSoundLimited(m_host.UUID, - KeyOrName(sound, AssetType.Sound), volume, + ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound, AssetType.Sound), volume, bottom_south_west, top_north_east); } } @@ -5896,7 +6338,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (presence != null) { // agent must be over the owners land - ILandObject land = World.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(presence.AbsolutePosition); if (land == null) return; @@ -5906,7 +6348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(5000); + ScriptSleep(m_sleepMsOnEjectFromLand); } public LSL_Integer llOverMyLand(string id) @@ -5918,19 +6360,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence presence = World.GetScenePresence(key); if (presence != null) // object is an avatar { - if (m_host.OwnerID - == World.LandChannel.GetLandObject( - presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) + if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) return 1; } else // object is not an avatar { SceneObjectPart obj = World.GetSceneObjectPart(key); + if (obj != null) - if (m_host.OwnerID - == World.LandChannel.GetLandObject( - obj.AbsolutePosition.X, obj.AbsolutePosition.Y).LandData.OwnerID) + { + if (m_host.OwnerID == World.LandChannel.GetLandObject(obj.AbsolutePosition).LandData.OwnerID) return 1; + } } } @@ -5962,8 +6403,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { - agentSize = new LSL_Vector(0.45, 0.6, avatar.Appearance.AvatarHeight); + agentSize = GetAgentSize(avatar); } + return agentSize; } @@ -5991,10 +6433,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (UUID.TryParse(id, out key)) { ScenePresence av = World.GetScenePresence(key); + List sittingAvatars = m_host.ParentGroup.GetSittingAvatars(); if (av != null) { - if (llAvatarOnSitTarget() == id) + if (sittingAvatars.Contains(av)) { // if the avatar is sitting on this object, then // we can unsit them. We don't want random scripts unsitting random people @@ -6008,8 +6451,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // if the land is group owned and the object is group owned by the same group // or // if the object is owned by a person with estate access. - - ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); + ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition); if (parcel != null) { if (m_host.OwnerID == parcel.LandData.OwnerID || @@ -6021,14 +6463,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - } - } public LSL_Vector llGroundSlope(LSL_Vector offset) { m_host.AddScriptLPS(1); + //Get the slope normal. This gives us the equation of the plane tangent to the slope. LSL_Vector vsn = llGroundNormal(offset); @@ -6039,7 +6480,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api vsl.Normalize(); //Normalization might be overkill here - return new LSL_Vector(vsl.X, vsl.Y, vsl.Z); + vsn.x = vsl.X; + vsn.y = vsl.Y; + vsn.z = vsl.Z; + + return vsn; } public LSL_Vector llGroundNormal(LSL_Vector offset) @@ -6089,7 +6534,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //I believe the crossproduct of two normalized vectors is a normalized vector so //this normalization may be overkill - return new LSL_Vector(vsn.X, vsn.Y, vsn.Z); + return new LSL_Vector(vsn); } public LSL_Vector llGroundContour(LSL_Vector offset) @@ -6105,11 +6550,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return m_host.ParentGroup.AttachmentPoint; } - public LSL_Integer llGetFreeMemory() + public virtual LSL_Integer llGetFreeMemory() { m_host.AddScriptLPS(1); - // Make scripts designed for LSO happy - return 16384; + // Make scripts designed for Mono happy + return 65536; } public LSL_Integer llGetFreeURLs() @@ -6176,7 +6621,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api PSYS_SRC_TARGET_KEY = 20, PSYS_SRC_OMEGA = 21, PSYS_SRC_ANGLE_BEGIN = 22, - PSYS_SRC_ANGLE_END = 23 + PSYS_SRC_ANGLE_END = 23, + PSYS_PART_BLEND_FUNC_SOURCE = 24, + PSYS_PART_BLEND_FUNC_DEST = 25, + PSYS_PART_START_GLOW = 26, + PSYS_PART_END_GLOW = 27 } internal Primitive.ParticleSystem.ParticleDataFlags ConvertUINTtoFlags(uint flags) @@ -6202,6 +6651,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ps.BurstRate = 0.1f; ps.PartMaxAge = 10.0f; ps.BurstPartCount = 1; + ps.BlendFuncSource = ScriptBaseClass.PSYS_PART_BF_SOURCE_ALPHA; + ps.BlendFuncDest = ScriptBaseClass.PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA; + ps.PartStartGlow = 0.0f; + ps.PartEndGlow = 0.0f; + return ps; } @@ -6213,17 +6667,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (SceneObjectPart part in parts) { - SetParticleSystem(part, rules); + SetParticleSystem(part, rules, "llLinkParticleSystem"); } } public void llParticleSystem(LSL_List rules) { m_host.AddScriptLPS(1); - SetParticleSystem(m_host, rules); + SetParticleSystem(m_host, rules, "llParticleSystem"); } - private void SetParticleSystem(SceneObjectPart part, LSL_List rules) + private void SetParticleSystem(SceneObjectPart part, LSL_List rules, string originFunc) { if (rules.Length == 0) { @@ -6236,65 +6690,156 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Vector tempv = new LSL_Vector(); float tempf = 0; + int tmpi = 0; for (int i = 0; i < rules.Length; i += 2) { - switch (rules.GetLSLIntegerItem(i)) + int psystype; + try + { + psystype = rules.GetLSLIntegerItem(i); + } + catch (InvalidCastException) + { + Error(originFunc, string.Format("Error running particle system params index #{0}: particle system parameter type must be integer", i)); + return; + } + switch (psystype) { case (int)ScriptBaseClass.PSYS_PART_FLAGS: - prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); + try + { + prules.PartDataFlags = (Primitive.ParticleSystem.ParticleDataFlags)(uint)rules.GetLSLIntegerItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_FLAGS: arg #{0} - parameter 1 must be integer", i + 1)); + return; + } break; case (int)ScriptBaseClass.PSYS_PART_START_COLOR: - tempv = rules.GetVector3Item(i + 1); + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_START_COLOR: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } prules.PartStartColor.R = (float)tempv.x; prules.PartStartColor.G = (float)tempv.y; prules.PartStartColor.B = (float)tempv.z; break; case (int)ScriptBaseClass.PSYS_PART_START_ALPHA: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_START_ALPHA: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.PartStartColor.A = tempf; break; case (int)ScriptBaseClass.PSYS_PART_END_COLOR: - tempv = rules.GetVector3Item(i + 1); + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_END_COLOR: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } prules.PartEndColor.R = (float)tempv.x; prules.PartEndColor.G = (float)tempv.y; prules.PartEndColor.B = (float)tempv.z; break; case (int)ScriptBaseClass.PSYS_PART_END_ALPHA: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_END_ALPHA: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.PartEndColor.A = tempf; break; case (int)ScriptBaseClass.PSYS_PART_START_SCALE: - tempv = rules.GetVector3Item(i + 1); - prules.PartStartScaleX = (float)tempv.x; - prules.PartStartScaleY = (float)tempv.y; + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_START_SCALE: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } + prules.PartStartScaleX = validParticleScale((float)tempv.x); + prules.PartStartScaleY = validParticleScale((float)tempv.y); break; case (int)ScriptBaseClass.PSYS_PART_END_SCALE: - tempv = rules.GetVector3Item(i + 1); - prules.PartEndScaleX = (float)tempv.x; - prules.PartEndScaleY = (float)tempv.y; + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_END_SCALE: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } + prules.PartEndScaleX = validParticleScale((float)tempv.x); + prules.PartEndScaleY = validParticleScale((float)tempv.y); break; case (int)ScriptBaseClass.PSYS_PART_MAX_AGE: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_MAX_AGE: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.PartMaxAge = tempf; break; case (int)ScriptBaseClass.PSYS_SRC_ACCEL: - tempv = rules.GetVector3Item(i + 1); + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_ACCEL: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } prules.PartAcceleration.X = (float)tempv.x; prules.PartAcceleration.Y = (float)tempv.y; prules.PartAcceleration.Z = (float)tempv.z; break; case (int)ScriptBaseClass.PSYS_SRC_PATTERN: - int tmpi = (int)rules.GetLSLIntegerItem(i + 1); + try + { + tmpi = (int)rules.GetLSLIntegerItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_PATTERN: arg #{0} - parameter 1 must be integer", i + 1)); + return; + } prules.Pattern = (Primitive.ParticleSystem.SourcePattern)tmpi; break; @@ -6303,47 +6848,171 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // client tells the difference between the two by looking at the 0x02 bit in // the PartFlags variable. case (int)ScriptBaseClass.PSYS_SRC_INNERANGLE: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_INNERANGLE: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.InnerAngle = (float)tempf; prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. break; case (int)ScriptBaseClass.PSYS_SRC_OUTERANGLE: - tempf = (float)rules.GetLSLFloatItem(i + 1); - prules.OuterAngle = (float)tempf; - prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. - break; + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_OUTERANGLE: arg #{0} - parameter 1 must be float", i + 1)); + return; + } + prules.OuterAngle = (float)tempf; + prules.PartFlags &= 0xFFFFFFFD; // Make sure new angle format is off. + break; + + case (int)ScriptBaseClass.PSYS_PART_BLEND_FUNC_SOURCE: + try + { + tmpi = (int)rules.GetLSLIntegerItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_BLEND_FUNC_SOURCE: arg #{0} - parameter 1 must be integer", i + 1)); + return; + } + prules.BlendFuncSource = (byte)tmpi; + break; + + case (int)ScriptBaseClass.PSYS_PART_BLEND_FUNC_DEST: + try + { + tmpi = (int)rules.GetLSLIntegerItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_BLEND_FUNC_DEST: arg #{0} - parameter 1 must be integer", i + 1)); + return; + } + prules.BlendFuncDest = (byte)tmpi; + break; + + case (int)ScriptBaseClass.PSYS_PART_START_GLOW: + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_START_GLOW: arg #{0} - parameter 1 must be float", i + 1)); + return; + } + prules.PartStartGlow = (float)tempf; + break; + + case (int)ScriptBaseClass.PSYS_PART_END_GLOW: + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_PART_END_GLOW: arg #{0} - parameter 1 must be float", i + 1)); + return; + } + prules.PartEndGlow = (float)tempf; + break; case (int)ScriptBaseClass.PSYS_SRC_TEXTURE: - prules.Texture = KeyOrName(rules.GetLSLStringItem(i + 1)); + try + { + prules.Texture = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, rules.GetLSLStringItem(i + 1)); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_TEXTURE: arg #{0} - parameter 1 must be string or key", i + 1)); + return; + } break; case (int)ScriptBaseClass.PSYS_SRC_BURST_RATE: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_BURST_RATE: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.BurstRate = (float)tempf; break; case (int)ScriptBaseClass.PSYS_SRC_BURST_PART_COUNT: - prules.BurstPartCount = (byte)(int)rules.GetLSLIntegerItem(i + 1); + try + { + prules.BurstPartCount = (byte)(int)rules.GetLSLIntegerItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_BURST_PART_COUNT: arg #{0} - parameter 1 must be integer", i + 1)); + return; + } break; case (int)ScriptBaseClass.PSYS_SRC_BURST_RADIUS: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_BURST_RADIUS: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.BurstRadius = (float)tempf; break; case (int)ScriptBaseClass.PSYS_SRC_BURST_SPEED_MIN: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_BURST_SPEED_MIN: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.BurstSpeedMin = (float)tempf; break; case (int)ScriptBaseClass.PSYS_SRC_BURST_SPEED_MAX: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_BURST_SPEED_MAX: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.BurstSpeedMax = (float)tempf; break; case (int)ScriptBaseClass.PSYS_SRC_MAX_AGE: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_MAX_AGE: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.MaxAge = (float)tempf; break; @@ -6361,20 +7030,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PSYS_SRC_OMEGA: // AL: This is an assumption, since it is the only thing that would match. - tempv = rules.GetVector3Item(i + 1); + try + { + tempv = rules.GetVector3Item(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_OMEGA: arg #{0} - parameter 1 must be vector", i + 1)); + return; + } prules.AngularVelocity.X = (float)tempv.x; prules.AngularVelocity.Y = (float)tempv.y; prules.AngularVelocity.Z = (float)tempv.z; break; case (int)ScriptBaseClass.PSYS_SRC_ANGLE_BEGIN: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_ANGLE_BEGIN: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.InnerAngle = (float)tempf; prules.PartFlags |= 0x02; // Set new angle format. break; case (int)ScriptBaseClass.PSYS_SRC_ANGLE_END: - tempf = (float)rules.GetLSLFloatItem(i + 1); + try + { + tempf = (float)rules.GetLSLFloatItem(i + 1); + } + catch (InvalidCastException) + { + Error(originFunc, string.Format("Error running rule PSYS_SRC_ANGLE_END: arg #{0} - parameter 1 must be float", i + 1)); + return; + } prules.OuterAngle = (float)tempf; prules.PartFlags |= 0x02; // Set new angle format. break; @@ -6389,6 +7082,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api part.SendFullUpdateToAllClients(); } + private float validParticleScale(float value) + { + if (value > 4.0f) return 4.0f; + return value; + } + public void llGroundRepel(double height, int water, double tau) { m_host.AddScriptLPS(1); @@ -6460,7 +7159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.OwnerID, m_host.Name, destID, (byte)InstantMessageDialog.TaskInventoryOffered, false, string.Format("'{0}'", category), -// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06 +// We won't go so far as to add a SLURL, but this is the format used by LL as of 2012-10-06 // false, string.Format("'{0}' ( http://slurl.com/secondlife/{1}/{2}/{3}/{4} )", category, World.Name, (int)pos.X, (int)pos.Y, (int)pos.Z), folderID, false, pos, bucket, false); @@ -6575,12 +7274,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llAvatarOnLinkSitTarget(int linknum) { m_host.AddScriptLPS(1); - if(linknum == ScriptBaseClass.LINK_SET || + if(linknum == ScriptBaseClass.LINK_SET || linknum == ScriptBaseClass.LINK_ALL_CHILDREN || linknum == ScriptBaseClass.LINK_ALL_OTHERS) return UUID.Zero.ToString(); - + List parts = GetLinkParts(linknum); - if (parts.Count == 0) return UUID.Zero.ToString(); + if (parts.Count == 0) return UUID.Zero.ToString(); return parts[0].SitTargetAvatar.ToString(); } @@ -6589,7 +7288,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID key; - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); + if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) { int expires = 0; @@ -6623,7 +7323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnAddToLandPassList); } public void llSetTouchText(string text) @@ -6642,12 +7342,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); m_host.SetCameraEyeOffset(offset); + + if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) + m_host.ParentGroup.RootPart.SetCameraEyeOffset(offset); } public void llSetCameraAtOffset(LSL_Vector offset) { m_host.AddScriptLPS(1); m_host.SetCameraAtOffset(offset); + + if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) + m_host.ParentGroup.RootPart.SetCameraAtOffset(offset); } public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) @@ -6722,17 +7428,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID av = new UUID(); if (!UUID.TryParse(avatar,out av)) { - LSLError("First parameter to llDialog needs to be a key"); + Error("llDialog", "First parameter must be a key"); return; } if (buttons.Length < 1) { - LSLError("No less than 1 button can be shown"); + Error("llDialog", "At least 1 button must be shown"); return; } if (buttons.Length > 12) { - LSLError("No more than 12 buttons can be shown"); + Error("llDialog", "No more than 12 buttons can be shown"); return; } string[] buts = new string[buttons.Length]; @@ -6740,12 +7446,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (buttons.Data[i].ToString() == String.Empty) { - LSLError("button label cannot be blank"); + Error("llDialog", "Button label cannot be blank"); return; } if (buttons.Data[i].ToString().Length > 24) { - LSLError("button label cannot be longer than 24 characters"); + Error("llDialog", "Button label cannot be longer than 24 characters"); return; } buts[i] = buttons.Data[i].ToString(); @@ -6755,7 +7461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnDialog); } public void llVolumeDetect(int detect) @@ -6766,16 +7472,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); } - /// - /// This is a depecated function so this just replicates the result of - /// invoking it in SL - /// public void llRemoteLoadScript(string target, string name, int running, int start_param) { m_host.AddScriptLPS(1); - // Report an error as it does in SL - ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead."); - ScriptSleep(3000); + Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); + ScriptSleep(m_sleepMsOnRemoteLoadScript); } public void llSetRemoteScriptAccessPin(int pin) @@ -6792,7 +7493,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!UUID.TryParse(target, out destId)) { - llSay(0, "Could not parse key " + target); + Error("llRemoteLoadScriptPin", "Can't parse key '" + target + "'"); return; } @@ -6808,7 +7509,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // make sure the object is a script if (item == null || item.Type != 10) { - llSay(0, "Could not find script " + name); + Error("llRemoteLoadScriptPin", "Can't find script '" + name + "'"); return; } @@ -6816,14 +7517,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.RezScriptFromPrim(item.ItemID, m_host, destId, pin, running, start_param); // this will cause the delay even if the script pin or permissions were wrong - seems ok - ScriptSleep(3000); + ScriptSleep(m_sleepMsOnRemoteLoadScriptPin); } public void llOpenRemoteDataChannel() { m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - if (xmlrpcMod.IsEnabled()) + if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) { UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface(); @@ -6847,14 +7548,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, new DetectParams[0])); } - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); } public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) { m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - ScriptSleep(3000); + ScriptSleep(m_sleepMsOnSendRemoteData); + if (xmlrpcMod == null) + return ""; return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); } @@ -6862,8 +7565,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); - ScriptSleep(3000); + if (xmlrpcMod != null) + xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); + ScriptSleep(m_sleepMsOnRemoteDataReply); } public void llCloseRemoteDataChannel(string channel) @@ -6877,8 +7581,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - xmlrpcMod.CloseXMLRPCChannel((UUID)channel); - ScriptSleep(1000); + if (xmlrpcMod != null) + xmlrpcMod.CloseXMLRPCChannel((UUID)channel); + ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); } public LSL_String llMD5String(string src, int nonce) @@ -6924,13 +7629,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { cut.y = 1f; } - if (cut.y - cut.x < 0.05f) + if (cut.y - cut.x < 0.02f) { - cut.x = cut.y - 0.05f; + cut.x = cut.y - 0.02f; if (cut.x < 0.0f) { cut.x = 0.0f; - cut.y = 0.05f; + cut.y = 0.02f; } } shapeBlock.ProfileBegin = (ushort)(50000 * cut.x); @@ -6952,12 +7657,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api hollow = 0.70f; } } - // Otherwise, hollow is limited to 95%. + // Otherwise, hollow is limited to 99%. else { - if (hollow > 0.95f) + if (hollow > 0.99f) { - hollow = 0.95f; + hollow = 0.99f; } } shapeBlock.ProfileHollow = (ushort)(50000 * hollow); @@ -7081,9 +7786,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { dimple.y = 1f; } - if (dimple.y - cut.x < 0.05f) + if (dimple.y - dimple.x < 0.02f) { - dimple.x = cut.y - 0.05f; + dimple.x = dimple.y - 0.02f; + if (dimple.x < 0.0f) + { + dimple.x = 0.0f; + dimple.y = 0.02f; + } } shapeBlock.ProfileBegin = (ushort)(50000 * dimple.x); shapeBlock.ProfileEnd = (ushort)(50000 * (1 - dimple.y)); @@ -7104,17 +7814,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api shapeBlock.PathBegin = shapeBlock.ProfileBegin; shapeBlock.PathEnd = shapeBlock.ProfileEnd; - if (holesize.x < 0.05f) + if (holesize.x < 0.01f) { - holesize.x = 0.05f; + holesize.x = 0.01f; } if (holesize.x > 1f) { holesize.x = 1f; } - if (holesize.y < 0.05f) + if (holesize.y < 0.01f) { - holesize.y = 0.05f; + holesize.y = 0.01f; } if (holesize.y > 0.5f) { @@ -7160,13 +7870,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { profilecut.y = 1f; } - if (profilecut.y - profilecut.x < 0.05f) + if (profilecut.y - profilecut.x < 0.02f) { - profilecut.x = profilecut.y - 0.05f; + profilecut.x = profilecut.y - 0.02f; if (profilecut.x < 0.0f) { profilecut.x = 0.0f; - profilecut.y = 0.05f; + profilecut.y = 0.02f; } } shapeBlock.ProfileBegin = (ushort)(50000 * profilecut.x); @@ -7234,9 +7944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID sculptId; if (!UUID.TryParse(map, out sculptId)) - { - sculptId = InventoryKey(map, (int)AssetType.Texture); - } + sculptId = ScriptUtils.GetAssetIdFromItemName(m_host, map, (int)AssetType.Texture); if (sculptId == UUID.Zero) return; @@ -7266,45 +7974,205 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - setLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); + SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetPrimitiveParams); } public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) { m_host.AddScriptLPS(1); - setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); + SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); - ScriptSleep(200); + ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); } public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) { m_host.AddScriptLPS(1); - setLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); + SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); } - protected void setLinkPrimParams(int linknumber, LSL_List rules, string originFunc) + protected void SetLinkPrimParams(int linknumber, LSL_List rules, string originFunc) { - List parts = GetLinkParts(linknumber); + SetEntityParams(GetLinkEntities(linknumber), rules, originFunc); + } - LSL_List remaining = null; + protected void SetEntityParams(List entities, LSL_List rules, string originFunc) + { + LSL_List remaining = new LSL_List(); uint rulesParsed = 0; - foreach (SceneObjectPart part in parts) - remaining = SetPrimParams(part, rules, originFunc, ref rulesParsed); + foreach (ISceneEntity entity in entities) + { + if (entity is SceneObjectPart) + remaining = SetPrimParams((SceneObjectPart)entity, rules, originFunc, ref rulesParsed); + else + remaining = SetAgentParams((ScenePresence)entity, rules, originFunc, ref rulesParsed); + } - while (remaining != null && remaining.Length > 2) + while (remaining.Length > 2) { - linknumber = remaining.GetLSLIntegerItem(0); + int linknumber; + try + { + linknumber = remaining.GetLSLIntegerItem(0); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_LINK_TARGET: parameter 2 must be integer", rulesParsed)); + return; + } + rules = remaining.GetSublist(1, -1); - parts = GetLinkParts(linknumber); + entities = GetLinkEntities(linknumber); - foreach (SceneObjectPart part in parts) - remaining = SetPrimParams(part, rules, originFunc, ref rulesParsed); + foreach (ISceneEntity entity in entities) + { + if (entity is SceneObjectPart) + remaining = SetPrimParams((SceneObjectPart)entity, rules, originFunc, ref rulesParsed); + else + remaining = SetAgentParams((ScenePresence)entity, rules, originFunc, ref rulesParsed); + } + } + } + + public void llSetKeyframedMotion(LSL_List frames, LSL_List options) + { + SceneObjectGroup group = m_host.ParentGroup; + + if (group.RootPart.PhysActor != null && group.RootPart.PhysActor.IsPhysical) + return; + if (group.IsAttachment) + return; + + if (frames.Data.Length > 0) // We are getting a new motion + { + if (group.RootPart.KeyframeMotion != null) + group.RootPart.KeyframeMotion.Delete(); + group.RootPart.KeyframeMotion = null; + + int idx = 0; + + KeyframeMotion.PlayMode mode = KeyframeMotion.PlayMode.Forward; + KeyframeMotion.DataFormat data = KeyframeMotion.DataFormat.Translation | KeyframeMotion.DataFormat.Rotation; + + while (idx < options.Data.Length) + { + int option = (int)options.GetLSLIntegerItem(idx++); + int remain = options.Data.Length - idx; + + switch (option) + { + case ScriptBaseClass.KFM_MODE: + if (remain < 1) + break; + int modeval = (int)options.GetLSLIntegerItem(idx++); + switch(modeval) + { + case ScriptBaseClass.KFM_FORWARD: + mode = KeyframeMotion.PlayMode.Forward; + break; + case ScriptBaseClass.KFM_REVERSE: + mode = KeyframeMotion.PlayMode.Reverse; + break; + case ScriptBaseClass.KFM_LOOP: + mode = KeyframeMotion.PlayMode.Loop; + break; + case ScriptBaseClass.KFM_PING_PONG: + mode = KeyframeMotion.PlayMode.PingPong; + break; + } + break; + case ScriptBaseClass.KFM_DATA: + if (remain < 1) + break; + int dataval = (int)options.GetLSLIntegerItem(idx++); + data = (KeyframeMotion.DataFormat)dataval; + break; + } + } + + group.RootPart.KeyframeMotion = new KeyframeMotion(group, mode, data); + + idx = 0; + + int elemLength = 2; + if (data == (KeyframeMotion.DataFormat.Translation | KeyframeMotion.DataFormat.Rotation)) + elemLength = 3; + + List keyframes = new List(); + while (idx < frames.Data.Length) + { + int remain = frames.Data.Length - idx; + + if (remain < elemLength) + break; + + KeyframeMotion.Keyframe frame = new KeyframeMotion.Keyframe(); + frame.Position = null; + frame.Rotation = null; + + if ((data & KeyframeMotion.DataFormat.Translation) != 0) + { + LSL_Types.Vector3 tempv = frames.GetVector3Item(idx++); + frame.Position = new Vector3((float)tempv.x, (float)tempv.y, (float)tempv.z); + } + if ((data & KeyframeMotion.DataFormat.Rotation) != 0) + { + LSL_Types.Quaternion tempq = frames.GetQuaternionItem(idx++); + Quaternion q = new Quaternion((float)tempq.x, (float)tempq.y, (float)tempq.z, (float)tempq.s); + q.Normalize(); + frame.Rotation = q; + } + + float tempf = (float)frames.GetLSLFloatItem(idx++); + frame.TimeMS = (int)(tempf * 1000.0f); + + keyframes.Add(frame); + } + + group.RootPart.KeyframeMotion.SetKeyframes(keyframes.ToArray()); + group.RootPart.KeyframeMotion.Start(); + } + else + { + if (group.RootPart.KeyframeMotion == null) + return; + + if (options.Data.Length == 0) + { + group.RootPart.KeyframeMotion.Stop(); + return; + } + + int idx = 0; + + while (idx < options.Data.Length) + { + int option = (int)options.GetLSLIntegerItem(idx++); + + switch (option) + { + case ScriptBaseClass.KFM_COMMAND: + int cmd = (int)options.GetLSLIntegerItem(idx++); + switch (cmd) + { + case ScriptBaseClass.KFM_CMD_PLAY: + group.RootPart.KeyframeMotion.Start(); + break; + case ScriptBaseClass.KFM_CMD_STOP: + group.RootPart.KeyframeMotion.Stop(); + break; + case ScriptBaseClass.KFM_CMD_PAUSE: + group.RootPart.KeyframeMotion.Pause(); + break; + } + break; + } + } } } @@ -7331,29 +8199,48 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api switch (code) { - case (int)ScriptBaseClass.PRIM_POSITION: - case (int)ScriptBaseClass.PRIM_POS_LOCAL: + case ScriptBaseClass.PRIM_POSITION: + case ScriptBaseClass.PRIM_POS_LOCAL: if (remain < 1) - return null; + return new LSL_List(); - v=rules.GetVector3Item(idx++); + try + { + v = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + if(code == ScriptBaseClass.PRIM_POSITION) + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POSITION: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1)); + else + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 1 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } positionChanged = true; currentPosition = GetSetPosTarget(part, v, currentPosition); break; - case (int)ScriptBaseClass.PRIM_SIZE: + case ScriptBaseClass.PRIM_SIZE: if (remain < 1) - return null; + return new LSL_List(); v=rules.GetVector3Item(idx++); SetScale(part, v); break; - case (int)ScriptBaseClass.PRIM_ROTATION: + case ScriptBaseClass.PRIM_ROTATION: if (remain < 1) - return null; - - LSL_Rotation q = rules.GetQuaternionItem(idx++); + return new LSL_List(); + LSL_Rotation q; + try + { + q = rules.GetQuaternionItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 1 must be rotation", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } // try to let this work as in SL... if (part.ParentID == 0) { @@ -7369,11 +8256,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; - case (int)ScriptBaseClass.PRIM_TYPE: + case ScriptBaseClass.PRIM_TYPE: if (remain < 3) - return null; + return new LSL_List(); - code = (int)rules.GetLSLIntegerItem(idx++); + try + { + code = (int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE: arg #{1} - parameter 1 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } remain = rules.Length - idx; float hollow; @@ -7388,140 +8283,625 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api switch (code) { - case (int)ScriptBaseClass.PRIM_TYPE_BOX: + case ScriptBaseClass.PRIM_TYPE_BOX: if (remain < 6) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); - v = rules.GetVector3Item(idx++); // cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); // cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 5 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_BOX: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, (byte)ProfileShape.Square, (byte)Extrusion.Straight); break; - case (int)ScriptBaseClass.PRIM_TYPE_CYLINDER: + case ScriptBaseClass.PRIM_TYPE_CYLINDER: if (remain < 6) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); // cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); // cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_CYLINDER: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, (byte)ProfileShape.Circle, (byte)Extrusion.Straight); break; - case (int)ScriptBaseClass.PRIM_TYPE_PRISM: + case ScriptBaseClass.PRIM_TYPE_PRISM: if (remain < 6) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); //cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); //cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_PRISM: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Straight); break; - case (int)ScriptBaseClass.PRIM_TYPE_SPHERE: + case ScriptBaseClass.PRIM_TYPE_SPHERE: if (remain < 5) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); // cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); // dimple + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); // cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); // dimple + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SPHERE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, (byte)ProfileShape.HalfCircle, (byte)Extrusion.Curve1); break; - case (int)ScriptBaseClass.PRIM_TYPE_TORUS: + case ScriptBaseClass.PRIM_TYPE_TORUS: if (remain < 11) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); //cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - holesize = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); - profilecut = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); // taper_a - revolutions = (float)rules.GetLSLFloatItem(idx++); - radiusoffset = (float)rules.GetLSLFloatItem(idx++); - skew = (float)rules.GetLSLFloatItem(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); //cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + holesize = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + profilecut = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); // taper_a + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + revolutions = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + radiusoffset = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + skew = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TORUS: arg #{1} - parameter 13 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, (byte)ProfileShape.Circle, (byte)Extrusion.Curve1); break; - case (int)ScriptBaseClass.PRIM_TYPE_TUBE: + case ScriptBaseClass.PRIM_TYPE_TUBE: if (remain < 11) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); //cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - holesize = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); - profilecut = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); // taper_a - revolutions = (float)rules.GetLSLFloatItem(idx++); - radiusoffset = (float)rules.GetLSLFloatItem(idx++); - skew = (float)rules.GetLSLFloatItem(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); //cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + holesize = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + profilecut = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); // taper_a + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + revolutions = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + radiusoffset = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + skew = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_TUBE: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, (byte)ProfileShape.Square, (byte)Extrusion.Curve1); break; - case (int)ScriptBaseClass.PRIM_TYPE_RING: + case ScriptBaseClass.PRIM_TYPE_RING: if (remain < 11) - return null; - - face = (int)rules.GetLSLIntegerItem(idx++); // holeshape - v = rules.GetVector3Item(idx++); //cut - hollow = (float)rules.GetLSLFloatItem(idx++); - twist = rules.GetVector3Item(idx++); - holesize = rules.GetVector3Item(idx++); - topshear = rules.GetVector3Item(idx++); - profilecut = rules.GetVector3Item(idx++); - taper_b = rules.GetVector3Item(idx++); // taper_a - revolutions = (float)rules.GetLSLFloatItem(idx++); - radiusoffset = (float)rules.GetLSLFloatItem(idx++); - skew = (float)rules.GetLSLFloatItem(idx++); + return new LSL_List(); + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // holeshape + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + v = rules.GetVector3Item(idx++); //cut + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + hollow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + twist = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 6 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + holesize = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 7 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + topshear = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + profilecut = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 9 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + taper_b = rules.GetVector3Item(idx++); // taper_a + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 10 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + revolutions = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 11 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + radiusoffset = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 12 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + skew = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_RING: arg #{1} - parameter 13 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, (byte)ProfileShape.EquilateralTriangle, (byte)Extrusion.Curve1); break; - case (int)ScriptBaseClass.PRIM_TYPE_SCULPT: + case ScriptBaseClass.PRIM_TYPE_SCULPT: if (remain < 2) - return null; + return new LSL_List(); string map = rules.Data[idx++].ToString(); - face = (int)rules.GetLSLIntegerItem(idx++); // type + try + { + face = (int)rules.GetLSLIntegerItem(idx++); // type + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TYPE, PRIM_TYPE_SCULPT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetPrimitiveShapeParams(part, map, face, (byte)Extrusion.Curve1); break; } break; - case (int)ScriptBaseClass.PRIM_TEXTURE: + case ScriptBaseClass.PRIM_TEXTURE: if (remain < 5) - return null; + return new LSL_List(); face=(int)rules.GetLSLIntegerItem(idx++); - string tex=rules.Data[idx++].ToString(); - LSL_Vector repeats=rules.GetVector3Item(idx++); - LSL_Vector offsets=rules.GetVector3Item(idx++); - double rotation=(double)rules.GetLSLFloatItem(idx++); + string tex; + LSL_Vector repeats; + LSL_Vector offsets; + double rotation; + + tex = rules.Data[idx++].ToString(); + try + { + repeats = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + offsets = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 4 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + rotation = (double)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXTURE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetTexture(part, tex, face); ScaleTexture(part, repeats.x, repeats.y, face); @@ -7530,180 +8910,525 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; - case (int)ScriptBaseClass.PRIM_COLOR: + case ScriptBaseClass.PRIM_COLOR: if (remain < 3) - return null; + return new LSL_List(); - face=(int)rules.GetLSLIntegerItem(idx++); - LSL_Vector color=rules.GetVector3Item(idx++); - double alpha=(double)rules.GetLSLFloatItem(idx++); + LSL_Vector color; + double alpha; + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + color = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + alpha = (double)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_COLOR: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } part.SetFaceColorAlpha(face, color, alpha); break; - case (int)ScriptBaseClass.PRIM_FLEXIBLE: + case ScriptBaseClass.PRIM_FLEXIBLE: if (remain < 7) - return null; - - bool flexi = rules.GetLSLIntegerItem(idx++); - int softness = rules.GetLSLIntegerItem(idx++); - float gravity = (float)rules.GetLSLFloatItem(idx++); - float friction = (float)rules.GetLSLFloatItem(idx++); - float wind = (float)rules.GetLSLFloatItem(idx++); - float tension = (float)rules.GetLSLFloatItem(idx++); - LSL_Vector force = rules.GetVector3Item(idx++); + return new LSL_List(); + bool flexi; + int softness; + float gravity; + float friction; + float wind; + float tension; + LSL_Vector force; + + try + { + flexi = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + softness = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + gravity = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + friction = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + wind = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + tension = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 7 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + force = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FLEXIBLE: arg #{1} - parameter 8 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force); break; - case (int)ScriptBaseClass.PRIM_POINT_LIGHT: + case ScriptBaseClass.PRIM_POINT_LIGHT: if (remain < 5) - return null; - bool light = rules.GetLSLIntegerItem(idx++); - LSL_Vector lightcolor = rules.GetVector3Item(idx++); - float intensity = (float)rules.GetLSLFloatItem(idx++); - float radius = (float)rules.GetLSLFloatItem(idx++); - float falloff = (float)rules.GetLSLFloatItem(idx++); - - SetPointLight(part, light, lightcolor, intensity, radius, falloff); - - break; - - case (int)ScriptBaseClass.PRIM_GLOW: - if (remain < 2) - return null; - face = rules.GetLSLIntegerItem(idx++); - float glow = (float)rules.GetLSLFloatItem(idx++); - - SetGlow(part, face, glow); - - break; - - case (int)ScriptBaseClass.PRIM_BUMP_SHINY: - if (remain < 3) - return null; - face = (int)rules.GetLSLIntegerItem(idx++); - int shiny = (int)rules.GetLSLIntegerItem(idx++); - Bumpiness bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++); - + return new LSL_List(); + bool light; + LSL_Vector lightcolor; + float intensity; + float radius; + float falloff; + + try + { + light = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + lightcolor = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + intensity = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + radius = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 5 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + falloff = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POINT_LIGHT: arg #{1} - parameter 6 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + + SetPointLight(part, light, lightcolor, intensity, radius, falloff); + + break; + + case ScriptBaseClass.PRIM_GLOW: + if (remain < 2) + return new LSL_List(); + + float glow; + + try + { + face = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + glow = (float)rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_GLOW: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + + SetGlow(part, face, glow); + + break; + + case ScriptBaseClass.PRIM_BUMP_SHINY: + if (remain < 3) + return new LSL_List(); + + int shiny; + Bumpiness bump; + + try + { + face = (int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + shiny = (int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + bump = (Bumpiness)(int)rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_BUMP_SHINY: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + SetShiny(part, face, shiny, bump); break; - case (int)ScriptBaseClass.PRIM_FULLBRIGHT: - if (remain < 2) - return null; - face = rules.GetLSLIntegerItem(idx++); - bool st = rules.GetLSLIntegerItem(idx++); - SetFullBright(part, face , st); - break; + case ScriptBaseClass.PRIM_FULLBRIGHT: + if (remain < 2) + return new LSL_List(); + bool st; + + try + { + face = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + st = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_FULLBRIGHT: arg #{1} - parameter 4 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + SetFullBright(part, face , st); + break; + + case ScriptBaseClass.PRIM_MATERIAL: + if (remain < 1) + return new LSL_List(); + int mat; + + try + { + mat = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_MATERIAL: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + if (mat < 0 || mat > 7) + return new LSL_List(); - case (int)ScriptBaseClass.PRIM_MATERIAL: - if (remain < 1) - return null; - int mat = rules.GetLSLIntegerItem(idx++); - if (mat < 0 || mat > 7) - return null; + part.Material = Convert.ToByte(mat); + break; - part.Material = Convert.ToByte(mat); - break; + case ScriptBaseClass.PRIM_PHANTOM: + if (remain < 1) + return new LSL_List(); - case (int)ScriptBaseClass.PRIM_PHANTOM: - if (remain < 1) - return null; + string ph = rules.Data[idx++].ToString(); + part.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); - string ph = rules.Data[idx++].ToString(); - m_host.ParentGroup.ScriptSetPhantomStatus(ph.Equals("1")); + break; - break; + case ScriptBaseClass.PRIM_PHYSICS: + if (remain < 1) + return new LSL_List(); + string phy = rules.Data[idx++].ToString(); + part.ScriptSetPhysicsStatus(phy.Equals("1")); + break; - case (int)ScriptBaseClass.PRIM_PHYSICS: + case ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE: if (remain < 1) - return null; - string phy = rules.Data[idx++].ToString(); - bool physics; + return new LSL_List(); - if (phy.Equals("1")) - physics = true; - else - physics = false; + int shape_type; + + try + { + shape_type = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_PHYSICS_SHAPE_TYPE: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } - part.ScriptSetPhysicsStatus(physics); - break; + ExtraPhysicsData physdata = new ExtraPhysicsData(); + physdata.Density = part.Density; + physdata.Bounce = part.Restitution; + physdata.GravitationModifier = part.GravityModifier; + physdata.PhysShapeType = (PhysShapeType)shape_type; - case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: + part.UpdateExtraPhysics(physdata); + + break; + + case ScriptBaseClass.PRIM_TEMP_ON_REZ: if (remain < 1) - return null; + return new LSL_List(); string temp = rules.Data[idx++].ToString(); - m_host.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); + part.ParentGroup.ScriptSetTemporaryStatus(temp.Equals("1")); break; - case (int)ScriptBaseClass.PRIM_TEXGEN: + case ScriptBaseClass.PRIM_TEXGEN: if (remain < 2) - return null; + return new LSL_List(); //face,type - face = rules.GetLSLIntegerItem(idx++); - int style = rules.GetLSLIntegerItem(idx++); + int style; + + try + { + face = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 2 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + style = rules.GetLSLIntegerItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXGEN: arg #{1} - parameter 3 must be integer", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } SetTexGen(part, face, style); break; - case (int)ScriptBaseClass.PRIM_TEXT: + case ScriptBaseClass.PRIM_TEXT: if (remain < 3) - return null; - string primText = rules.GetLSLStringItem(idx++); - LSL_Vector primTextColor = rules.GetVector3Item(idx++); - LSL_Float primTextAlpha = rules.GetLSLFloatItem(idx++); + return new LSL_List(); + string primText; + LSL_Vector primTextColor; + LSL_Float primTextAlpha; + + try + { + primText = rules.GetLSLStringItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + primTextColor = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 3 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + primTextAlpha = rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_TEXT: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } Vector3 av3 = Util.Clip(primTextColor, 0.0f, 1.0f); part.SetText(primText, av3, Util.Clip((float)primTextAlpha, 0.0f, 1.0f)); break; - case (int)ScriptBaseClass.PRIM_NAME: + + case ScriptBaseClass.PRIM_NAME: if (remain < 1) - return null; - string primName = rules.GetLSLStringItem(idx++); - part.Name = primName; + return new LSL_List(); + try + { + string primName = rules.GetLSLStringItem(idx++); + part.Name = primName; + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_NAME: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } break; - case (int)ScriptBaseClass.PRIM_DESC: + case ScriptBaseClass.PRIM_DESC: if (remain < 1) - return null; - string primDesc = rules.GetLSLStringItem(idx++); - part.Description = primDesc; + return new LSL_List(); + try + { + string primDesc = rules.GetLSLStringItem(idx++); + part.Description = primDesc; + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_DESC: arg #{1} - parameter 2 must be string", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } break; - case (int)ScriptBaseClass.PRIM_ROT_LOCAL: + case ScriptBaseClass.PRIM_ROT_LOCAL: if (remain < 1) - return null; - SetRot(part, rules.GetQuaternionItem(idx++)); + return new LSL_List(); + LSL_Rotation rot; + try + { + rot = rules.GetQuaternionItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + SetRot(part, rot); break; - case (int)ScriptBaseClass.PRIM_OMEGA: + + case ScriptBaseClass.PRIM_OMEGA: if (remain < 3) - return null; - LSL_Vector axis = rules.GetVector3Item(idx++); - LSL_Float spinrate = rules.GetLSLFloatItem(idx++); - LSL_Float gain = rules.GetLSLFloatItem(idx++); + return new LSL_List(); + LSL_Vector axis; + LSL_Float spinrate; + LSL_Float gain; + + try + { + axis = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + spinrate = rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 3 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + try + { + gain = rules.GetLSLFloatItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_OMEGA: arg #{1} - parameter 4 must be float", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } TargetOmega(part, axis, (double)spinrate, (double)gain); break; - case (int)ScriptBaseClass.PRIM_SLICE: + + case ScriptBaseClass.PRIM_SLICE: if (remain < 1) - return null; - LSL_Vector slice = rules.GetVector3Item(idx++); + return new LSL_List(); + LSL_Vector slice; + try + { + slice = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_SLICE: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } part.UpdateSlice((float)slice.x, (float)slice.y); break; - case (int)ScriptBaseClass.PRIM_LINK_TARGET: + + case ScriptBaseClass.PRIM_LINK_TARGET: if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. - return null; + return new LSL_List(); return rules.GetSublist(idx, -1); + + default: + Error(originFunc, string.Format("Error running rule #{0}: arg #{1} - unsupported parameter", rulesParsed, idx - idxStart)); + return new LSL_List(); } } } catch (InvalidCastException e) { - ShoutError(string.Format( - "{0} error running rule #{1}: arg #{2} ", - originFunc, rulesParsed, idx - idxStart) + e.Message); + Error(originFunc, string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message); } finally { @@ -7723,7 +9448,118 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - return null; + + return new LSL_List(); + } + + protected LSL_List SetAgentParams(ScenePresence sp, LSL_List rules, string originFunc, ref uint rulesParsed) + { + int idx = 0; + int idxStart = 0; + + try + { + while (idx < rules.Length) + { + ++rulesParsed; + int code = rules.GetLSLIntegerItem(idx++); + + int remain = rules.Length - idx; + idxStart = idx; + + switch (code) + { + case ScriptBaseClass.PRIM_POSITION: + case ScriptBaseClass.PRIM_POS_LOCAL: + if (remain < 1) + return new LSL_List(); + + try + { + sp.OffsetPosition = rules.GetVector3Item(idx++); + } + catch(InvalidCastException) + { + if (code == ScriptBaseClass.PRIM_POSITION) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POSITION: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); + } + else + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_POS_LOCAL: arg #{1} - parameter 2 must be vector", rulesParsed, idx - idxStart - 1)); + } + return new LSL_List(); + } + break; + + case ScriptBaseClass.PRIM_ROTATION: + if (remain < 1) + return new LSL_List(); + + Quaternion inRot; + + try + { + inRot = rules.GetQuaternionItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROTATION: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + + SceneObjectPart parentPart = sp.ParentPart; + + if (parentPart != null) + sp.Rotation = m_host.GetWorldRotation() * inRot; + + break; + + case ScriptBaseClass.PRIM_ROT_LOCAL: + if (remain < 1) + return new LSL_List(); + + try + { + sp.Rotation = rules.GetQuaternionItem(idx++); + } + catch(InvalidCastException) + { + Error(originFunc, string.Format("Error running rule #{0} -> PRIM_ROT_LOCAL: arg #{1} - parameter 2 must be rotation", rulesParsed, idx - idxStart - 1)); + return new LSL_List(); + } + + break; + + case ScriptBaseClass.PRIM_TYPE: + Error(originFunc, "PRIM_TYPE disallowed on agent"); + return new LSL_List(); + + case ScriptBaseClass.PRIM_OMEGA: + Error(originFunc, "PRIM_OMEGA disallowed on agent"); + return new LSL_List(); + + case ScriptBaseClass.PRIM_LINK_TARGET: + if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. + return new LSL_List(); + + return rules.GetSublist(idx, -1); + + default: + Error(originFunc, + string.Format("Error running rule #{0} on agent: arg #{1} - disallowed on agent", rulesParsed, idx - idxStart)); + return new LSL_List(); + } + } + } + catch (InvalidCastException e) + { + Error( + originFunc, + string.Format("Error running rule #{0}: arg #{1} - ", rulesParsed, idx - idxStart) + e.Message); + } + + return new LSL_List(); } public LSL_String llStringToBase64(string str) @@ -7731,14 +9567,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); try { - byte[] encData_byte = new byte[str.Length]; + byte[] encData_byte; encData_byte = Util.UTF8.GetBytes(str); string encodedData = Convert.ToBase64String(encData_byte); return encodedData; } - catch (Exception e) + catch { - throw new Exception("Error in base64Encode" + e.Message); + Error("llBase64ToString", "Error encoding string"); + return String.Empty; } } @@ -7747,26 +9584,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); try { - return Util.Base64ToString(str); + byte[] b = Convert.FromBase64String(str); + return Encoding.UTF8.GetString(b); } - catch (Exception e) + catch { - throw new Exception("Error in base64Decode" + e.Message); + Error("llBase64ToString", "Error decoding string"); + return String.Empty; } } public LSL_String llXorBase64Strings(string str1, string str2) { m_host.AddScriptLPS(1); - Deprecated("llXorBase64Strings"); - ScriptSleep(300); + Deprecated("llXorBase64Strings", "Use llXorBase64 instead"); + ScriptSleep(m_sleepMsOnXorBase64Strings); return String.Empty; } public void llRemoteDataSetRegion() { m_host.AddScriptLPS(1); - Deprecated("llRemoteDataSetRegion"); + Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); } public LSL_Float llLog10(double val) @@ -7800,21 +9639,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) return; land.SetMusicUrl(url); - ScriptSleep(2000); + ScriptSleep(m_sleepMsOnSetParcelMusicURL); } public LSL_String llGetParcelMusicURL() { m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) return String.Empty; @@ -7825,8 +9664,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRootPosition() { m_host.AddScriptLPS(1); - return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, - m_host.ParentGroup.AbsolutePosition.Z); + + return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); } /// @@ -7849,13 +9688,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) q = avatar.CameraRotation; // Mouselook else - q = avatar.Rotation; // Currently infrequently updated so may be inaccurate + q = avatar.GetWorldRotation(); // Currently infrequently updated so may be inaccurate else q = m_host.ParentGroup.GroupRotation; // Likely never get here but just in case } else q = m_host.ParentGroup.GroupRotation; // just the group rotation - return new LSL_Rotation(q.X, q.Y, q.Z, q.W); + + return new LSL_Rotation(q); } public LSL_String llGetObjectDesc() @@ -7881,145 +9721,676 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); } - public LSL_Integer llGetNumberOfPrims() - { - m_host.AddScriptLPS(1); + public LSL_Integer llGetNumberOfPrims() + { + m_host.AddScriptLPS(1); + + return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); + } + + /// + /// Full implementation of llGetBoundingBox according to SL 2015-04-15. + /// http://wiki.secondlife.com/wiki/LlGetBoundingBox + /// http://lslwiki.net/lslwiki/wakka.php?wakka=llGetBoundingBox + /// Returns local bounding box of avatar without attachments + /// if target is non-seated avatar or prim/mesh in avatar attachment. + /// Returns local bounding box of object including seated avatars + /// if target is seated avatar or prim/mesh in object. + /// Uses meshing of prims for high accuracy + /// or less accurate box models for speed. + /// + public LSL_List llGetBoundingBox(string obj) + { + m_host.AddScriptLPS(1); + + // Get target avatar if non-seated avatar or attachment, or prim and object + UUID objID = UUID.Zero; + UUID.TryParse(obj, out objID); + ScenePresence agent = World.GetScenePresence(objID); + if (agent != null) + { + if (agent.ParentPart != null) + { + objID = agent.ParentPart.UUID; + agent = null; + } + } + SceneObjectGroup group = null; + SceneObjectPart target = World.GetSceneObjectPart(objID); + if (target != null) + { + group = target.ParentGroup; + if (group.IsAttachment) { + objID = group.AttachedAvatar; + agent = World.GetScenePresence(objID); + group = null; + target = null; + } + } + + // Initialize but break if no target + LSL_List result = new LSL_List(); + int groupCount = 0; + int partCount = 0; + int vertexCount = 0; + if (target == null && agent == null) + { + result.Add(new LSL_Vector()); + result.Add(new LSL_Vector()); + if (m_addStatsInGetBoundingBox) + result.Add(new LSL_Vector((float)groupCount, (float)partCount, (float)vertexCount)); + return result; + } + Vector3 minPosition = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); + Vector3 maxPosition = new Vector3(float.MinValue, float.MinValue, float.MinValue); + + // Try to get a mesher + IRendering primMesher = null; + List renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory()); + if (renderers.Count > 0) + primMesher = RenderingLoader.LoadRenderer(renderers[0]); + + // Get bounding box of just avatar, seated or not + if (agent != null) + { + bool hasParent = false; + Vector3 lower; + Vector3 upper; + BoundingBoxOfScenePresence(agent, out lower, out upper); + Vector3 offset = Vector3.Zero; + + // Since local bounding box unrotated and untilted, keep it simple + AddBoundingBoxOfSimpleBox(lower, upper, offset, agent.Rotation, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + partCount++; + groupCount++; + + // Return lower and upper bounding box corners + result.Add(new LSL_Vector(minPosition)); + result.Add(new LSL_Vector(maxPosition)); + if (m_addStatsInGetBoundingBox) + result.Add(new LSL_Vector((float)groupCount, (float)partCount, (float)vertexCount)); + return result; + } + // Get bounding box of object including seated avatars + else if (group != null) + { + // Merge bounding boxes of all parts (prims and mesh) + foreach (SceneObjectPart part in group.Parts) + { + bool hasParent = (!part.IsRoot); + // When requested or if no mesher, keep it simple + if (m_useSimpleBoxesInGetBoundingBox || primMesher == null) + { + AddBoundingBoxOfSimpleBox(part.Scale * -0.5f, part.Scale * 0.5f, part.OffsetPosition, part.RotationOffset, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + } + // Do the full mounty + else + { + Primitive omvPrim = part.Shape.ToOmvPrimitive(part.OffsetPosition, part.RotationOffset); + byte[] sculptAsset = null; + if (omvPrim.Sculpt != null) + sculptAsset = World.AssetService.GetData(omvPrim.Sculpt.SculptTexture.ToString()); + + // When part is mesh + // Quirk: Only imports as incompletely populated faceted mesh object, so needs an own handler. + if (omvPrim.Sculpt != null && omvPrim.Sculpt.Type == SculptType.Mesh && sculptAsset != null) + { + AssetMesh meshAsset = new AssetMesh(omvPrim.Sculpt.SculptTexture, sculptAsset); + FacetedMesh mesh = null; + FacetedMesh.TryDecodeFromAsset(omvPrim, meshAsset, DetailLevel.Highest, out mesh); + meshAsset = null; + if (mesh != null) + { + AddBoundingBoxOfFacetedMesh(mesh, omvPrim, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + mesh = null; + } + } + + // When part is sculpt + // Quirk: Generated sculpt mesh is about 2.8% smaller in X and Y than visual sculpt. + else if (omvPrim.Sculpt != null && omvPrim.Sculpt.Type != SculptType.Mesh && sculptAsset != null) + { + IJ2KDecoder imgDecoder = World.RequestModuleInterface(); + if (imgDecoder != null) + { + Image sculpt = imgDecoder.DecodeToImage(sculptAsset); + if (sculpt != null) + { + SimpleMesh mesh = primMesher.GenerateSimpleSculptMesh(omvPrim, (Bitmap)sculpt, DetailLevel.Medium); + sculpt.Dispose(); + if (mesh != null) + { + AddBoundingBoxOfSimpleMesh(mesh, omvPrim, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + mesh = null; + } + } + } + } + + // When part is prim + else if (omvPrim.Sculpt == null) + { + SimpleMesh mesh = primMesher.GenerateSimpleMesh(omvPrim, DetailLevel.Medium); + if (mesh != null) + { + AddBoundingBoxOfSimpleMesh(mesh, omvPrim, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + mesh = null; + } + } + + // When all else fails, try fallback to simple box + else + { + AddBoundingBoxOfSimpleBox(part.Scale * -0.5f, part.Scale * 0.5f, part.OffsetPosition, part.RotationOffset, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + } + } + partCount++; + } + } + + // Merge bounding boxes of seated avatars + foreach (ScenePresence sp in group.GetSittingAvatars()) + { + Vector3 lower; + Vector3 upper; + BoundingBoxOfScenePresence(sp, out lower, out upper); + Vector3 offset = sp.OffsetPosition; + + bool hasParent = true; + // When requested or if no mesher, keep it simple + if (m_useSimpleBoxesInGetBoundingBox || primMesher == null) + { + AddBoundingBoxOfSimpleBox(lower, upper, offset, sp.Rotation, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + } + // Do the full mounty + else + { + // Prim shapes don't do center offsets, so add it here. + offset = offset + (lower + upper) * 0.5f * sp.Rotation; + Primitive omvPrim = MakeOpenMetaversePrim(upper - lower, offset, sp.Rotation, ScriptBaseClass.PRIM_TYPE_SPHERE); + SimpleMesh mesh = primMesher.GenerateSimpleMesh(omvPrim, DetailLevel.Medium); + AddBoundingBoxOfSimpleMesh(mesh, omvPrim, hasParent, ref minPosition, ref maxPosition, ref vertexCount); + mesh = null; + } + partCount++; + } + + groupCount++; + + // Return lower and upper bounding box corners + result.Add(new LSL_Vector(minPosition)); + result.Add(new LSL_Vector(maxPosition)); + if (m_addStatsInGetBoundingBox) + result.Add(new LSL_Vector((float)groupCount, (float)partCount, (float)vertexCount)); + + primMesher = null; + return result; + } + + /// + /// Helper to calculate bounding box of an avatar. + /// + private void BoundingBoxOfScenePresence(ScenePresence sp, out Vector3 lower, out Vector3 upper) + { + // Adjust from OS model + // avatar height = visual height - 0.2, bounding box height = visual height + // to SL model + // avatar height = visual height, bounding box height = visual height + 0.2 + float height = sp.Appearance.AvatarHeight + m_avatarHeightCorrection; + + // According to avatar bounding box in SL 2015-04-18: + // standing = <-0.275,-0.35,-0.1-0.5*h> : <0.275,0.35,0.1+0.5*h> + // groundsitting = <-0.3875,-0.5,-0.05-0.375*h> : <0.3875,0.5,0.5> + // sitting = <-0.5875,-0.35,-0.35-0.375*h> : <0.1875,0.35,-0.25+0.25*h> + + // When avatar is sitting + if (sp.ParentPart != null) + { + lower = new Vector3(m_lABB1SitX0, m_lABB1SitY0, m_lABB1SitZ0 + m_lABB1SitZ1 * height); + upper = new Vector3(m_lABB2SitX0, m_lABB2SitY0, m_lABB2SitZ0 + m_lABB2SitZ1 * height); + } + // When avatar is groundsitting + else if (sp.Animator.Animations.ImplicitDefaultAnimation.AnimID == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) + { + lower = new Vector3(m_lABB1GrsX0, m_lABB1GrsY0, m_lABB1GrsZ0 + m_lABB1GrsZ1 * height); + upper = new Vector3(m_lABB2GrsX0, m_lABB2GrsY0, m_lABB2GrsZ0 + m_lABB2GrsZ1 * height); + } + // When avatar is standing or flying + else + { + lower = new Vector3(m_lABB1StdX0, m_lABB1StdY0, m_lABB1StdZ0 + m_lABB1StdZ1 * height); + upper = new Vector3(m_lABB2StdX0, m_lABB2StdY0, m_lABB2StdZ0 + m_lABB2StdZ1 * height); + } + } + + /// + /// Helper to approximate a part with a simple box. + /// + private void AddBoundingBoxOfSimpleBox(Vector3 corner1, Vector3 corner2, Vector3 offset, Quaternion rotation, bool hasParent, ref Vector3 lower, ref Vector3 upper, ref int count) + { + // Parse the 8 box corners + for (int i = 0; i < 8; i++) + { + // Calculate each box corner + Vector3 position = corner1; + if ((i & 1) != 0) + position.X = corner2.X; + if ((i & 2) != 0) + position.Y = corner2.Y; + if ((i & 4) != 0) + position.Z = corner2.Z; + // Rotate part unless part is root + if (hasParent) + position = position * rotation; + position = position + offset; + // Adjust lower and upper bounding box corners if needed + lower = Vector3.Min(lower, position); + upper = Vector3.Max(upper, position); + count++; + } + } + + /// + /// Helper to parse a meshed prim and needed especially + /// for accuracy with tortured prims and sculpts. + /// + private void AddBoundingBoxOfSimpleMesh(SimpleMesh mesh, Primitive prim, bool hasParent, ref Vector3 lower, ref Vector3 upper, ref int count) + { + // Quirk: A meshed box contains 10 instead of the 8 necessary vertices. + if (mesh != null) + { + // Parse each vertex in mesh + foreach (Vertex vertex in mesh.Vertices) + { + Vector3 position = vertex.Position; + position = position * prim.Scale; + // Rotate part unless part is root + if (hasParent) + position = position * prim.Rotation; + position = position + prim.Position; + // Adjust lower and upper bounding box corners if needed + lower = Vector3.Min(lower, position); + upper = Vector3.Max(upper, position); + count++; + } + } + } + + /// + /// Helper to parse mesh because no method exists + /// to parse mesh assets to SimpleMesh. + /// + private void AddBoundingBoxOfFacetedMesh(FacetedMesh mesh, Primitive prim, bool hasParent, ref Vector3 lower, ref Vector3 upper, ref int count) + { + if (mesh != null) + { + // Parse each face in mesh + // since vertex array isn't populated. + // This parses each unique vertex 3-6 times. + foreach (Face face in mesh.Faces) + { + // Parse each vertex in face + foreach (Vertex vertex in face.Vertices) + { + Vector3 position = vertex.Position; + position = position * prim.Scale; + // Rotate part unless part is root + if (hasParent) + position = position * prim.Rotation; + position = position + prim.Position; + // Adjust lower and upper bounding box corners if needed + lower = Vector3.Min(lower, position); + upper = Vector3.Max(upper, position); + count++; + } + } + } + } + + /// + /// Helper to make up an OpenMetaverse prim + /// needed to create mesh from parts. + /// + private Primitive MakeOpenMetaversePrim(Vector3 scale, Vector3 position, Quaternion rotation, int primType) + { + // Initialize and set common parameters + Primitive prim = new OpenMetaverse.Primitive(); + prim.Scale = scale; + prim.Position = position; + prim.Rotation = rotation; + prim.PrimData.PathShearX = 0.0f; + prim.PrimData.PathShearY = 0.0f; + prim.PrimData.PathBegin = 0.0f; + prim.PrimData.PathEnd = 1.0f; + prim.PrimData.PathScaleX = 1.0f; + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.PathTaperX = 0.0f; + prim.PrimData.PathTaperY = 0.0f; + prim.PrimData.PathTwistBegin = 0.0f; + prim.PrimData.PathTwist = 0.0f; + prim.PrimData.ProfileBegin = 0.0f; + prim.PrimData.ProfileEnd = 1.0f; + prim.PrimData.ProfileHollow = 0.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)1; + prim.PrimData.ProfileHole = (HoleType)0; + prim.PrimData.PathCurve = (PathCurve)16; + prim.PrimData.PathRadiusOffset = 0.0f; + prim.PrimData.PathRevolutions = 1.0f; + prim.PrimData.PathSkew = 0.0f; + prim.PrimData.PCode = OpenMetaverse.PCode.Prim; + prim.PrimData.State = (byte)0; + + // Set type specific parameters + switch (primType) + { + // Set specific parameters for box + case ScriptBaseClass.PRIM_TYPE_BOX: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)1; + prim.PrimData.PathCurve = (PathCurve)16; + break; + // Set specific parameters for cylinder + case ScriptBaseClass.PRIM_TYPE_CYLINDER: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)0; + prim.PrimData.PathCurve = (PathCurve)16; + break; + // Set specific parameters for prism + case ScriptBaseClass.PRIM_TYPE_PRISM: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)3; + prim.PrimData.PathCurve = (PathCurve)16; + break; + // Set specific parameters for sphere + case ScriptBaseClass.PRIM_TYPE_SPHERE: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)5; + prim.PrimData.PathCurve = (PathCurve)32; + break; + // Set specific parameters for torus + case ScriptBaseClass.PRIM_TYPE_TORUS: + prim.PrimData.PathScaleY = 0.5f; + prim.PrimData.ProfileCurve = (ProfileCurve)0; + prim.PrimData.PathCurve = (PathCurve)32; + break; + // Set specific parameters for tube + case ScriptBaseClass.PRIM_TYPE_TUBE: + prim.PrimData.PathScaleY = 0.5f; + prim.PrimData.ProfileCurve = (ProfileCurve)1; + prim.PrimData.PathCurve = (PathCurve)32; + break; + // Set specific parameters for ring + case ScriptBaseClass.PRIM_TYPE_RING: + prim.PrimData.PathScaleY = 0.5f; + prim.PrimData.ProfileCurve = (ProfileCurve)3; + prim.PrimData.PathCurve = (PathCurve)32; + break; + // Set specific parameters for sculpt + case ScriptBaseClass.PRIM_TYPE_SCULPT: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)5; + prim.PrimData.PathCurve = (PathCurve)32; + break; + // Default to specific parameters for box + default: + prim.PrimData.PathScaleY = 1.0f; + prim.PrimData.ProfileCurve = (ProfileCurve)1; + prim.PrimData.PathCurve = (PathCurve)16; + break; + } + + return prim; + } + + /// + /// Implementation of llGetGeometricCenter according to SL 2015-04-30. + /// http://wiki.secondlife.com/wiki/LlGetGeometricCenter + /// Returns the average position offset of all linked parts, + /// including the root prim and seated avatars, + /// relative to the root prim in local coordinates. + /// + public LSL_Vector llGetGeometricCenter() + { + // Subtract whatever position the root prim has to make it zero + Vector3 offset = m_host.ParentGroup.RootPart.OffsetPosition * -1.0f; + + // Add all prim/part position offsets + foreach (SceneObjectPart part in m_host.ParentGroup.Parts) + offset = offset + part.OffsetPosition; + // Add all avatar/scene presence position offsets + foreach (ScenePresence sp in m_host.ParentGroup.GetSittingAvatars()) + offset = offset + sp.OffsetPosition; + + // Calculate and return the average offset + offset = offset / (float)(m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount()); + return new LSL_Vector(offset); + } + + public LSL_List GetEntityParams(ISceneEntity entity, LSL_List rules) + { + LSL_List result = new LSL_List(); + LSL_List remaining; + + while (true) + { +// m_log.DebugFormat( +// "[LSL API]: GetEntityParams has {0} rules with scene entity named {1}", +// rules.Length, entity != null ? entity.Name : "NULL"); + + if (entity == null) + return result; + + if (entity is SceneObjectPart) + remaining = GetPrimParams((SceneObjectPart)entity, rules, ref result); + else + remaining = GetAgentParams((ScenePresence)entity, rules, ref result); + + if (remaining == null || remaining.Length < 2) + return result; + + int linknumber = remaining.GetLSLIntegerItem(0); + rules = remaining.GetSublist(1, -1); + entity = GetLinkEntity(m_host, linknumber); + } + } + + public LSL_List llGetPrimitiveParams(LSL_List rules) + { + m_host.AddScriptLPS(1); + + return GetEntityParams(m_host, rules); + } + + public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) + { + m_host.AddScriptLPS(1); + + return GetEntityParams(GetLinkEntity(m_host, linknumber), rules); + } + + public LSL_Vector GetAgentSize(ScenePresence sp) + { + return new LSL_Vector(0.45, 0.6, sp.Appearance.AvatarHeight); + } + + /// + /// Gets params for a seated avatar in a linkset. + /// + /// + /// + /// + /// + public LSL_List GetAgentParams(ScenePresence sp, LSL_List rules, ref LSL_List res) + { + int idx = 0; + while (idx < rules.Length) + { + int code = (int)rules.GetLSLIntegerItem(idx++); + int remain = rules.Length-idx; + + switch (code) + { + case (int)ScriptBaseClass.PRIM_MATERIAL: + res.Add(new LSL_Integer(ScriptBaseClass.PRIM_MATERIAL_FLESH)); + break; + + case (int)ScriptBaseClass.PRIM_PHYSICS: + res.Add(ScriptBaseClass.FALSE); + break; + + case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: + res.Add(ScriptBaseClass.FALSE); + break; + + case (int)ScriptBaseClass.PRIM_PHANTOM: + res.Add(ScriptBaseClass.FALSE); + break; + + case (int)ScriptBaseClass.PRIM_POSITION: + res.Add(new LSL_Vector(sp.AbsolutePosition)); + break; + + case (int)ScriptBaseClass.PRIM_SIZE: + res.Add(GetAgentSize(sp)); + break; + + case (int)ScriptBaseClass.PRIM_ROTATION: + res.Add(sp.GetWorldRotation()); + break; + + case (int)ScriptBaseClass.PRIM_TYPE: + res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TYPE_BOX)); + res.Add(new LSL_Integer(ScriptBaseClass.PRIM_HOLE_DEFAULT)); + res.Add(new LSL_Vector(0, 1, 0)); + res.Add(new LSL_Float(0)); + res.Add(new LSL_Vector(0, 0, 0)); + res.Add(new LSL_Vector(1, 1, 0)); + res.Add(new LSL_Vector(0, 0, 0)); + break; + + case (int)ScriptBaseClass.PRIM_TEXTURE: + if (remain < 1) + return new LSL_List(); + + int face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; + + res.Add(new LSL_String("")); + res.Add(ScriptBaseClass.ZERO_VECTOR); + res.Add(ScriptBaseClass.ZERO_VECTOR); + res.Add(new LSL_Float(0)); + break; + + case (int)ScriptBaseClass.PRIM_COLOR: + if (remain < 1) + return new LSL_List(); + + face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; + + res.Add(ScriptBaseClass.ZERO_VECTOR); + res.Add(new LSL_Float(0)); + break; + + case (int)ScriptBaseClass.PRIM_BUMP_SHINY: + if (remain < 1) + return new LSL_List(); + + face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; + + res.Add(ScriptBaseClass.PRIM_SHINY_NONE); + res.Add(ScriptBaseClass.PRIM_BUMP_NONE); + break; + + case (int)ScriptBaseClass.PRIM_FULLBRIGHT: + if (remain < 1) + return new LSL_List(); - return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); - } + face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; - /// - /// A partial implementation. - /// http://lslwiki.net/lslwiki/wakka.php?wakka=llGetBoundingBox - /// So far only valid for standing/flying/ground sitting avatars and single prim objects. - /// If the object has multiple prims and/or a sitting avatar then the bounding - /// box is for the root prim only. - /// - public LSL_List llGetBoundingBox(string obj) - { - m_host.AddScriptLPS(1); - UUID objID = UUID.Zero; - LSL_List result = new LSL_List(); - if (!UUID.TryParse(obj, out objID)) - { - result.Add(new LSL_Vector()); - result.Add(new LSL_Vector()); - return result; - } - ScenePresence presence = World.GetScenePresence(objID); - if (presence != null) - { - if (presence.ParentID == 0) // not sat on an object - { - LSL_Vector lower; - LSL_Vector upper; - if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID - == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) - { - // This is for ground sitting avatars - float height = presence.Appearance.AvatarHeight / 2.66666667f; - lower = new LSL_Vector(-0.3375f, -0.45f, height * -1.0f); - upper = new LSL_Vector(0.3375f, 0.45f, 0.0f); - } - else - { - // This is for standing/flying avatars - float height = presence.Appearance.AvatarHeight / 2.0f; - lower = new LSL_Vector(-0.225f, -0.3f, height * -1.0f); - upper = new LSL_Vector(0.225f, 0.3f, height + 0.05f); - } - result.Add(lower); - result.Add(upper); - return result; - } - else - { - // sitting on an object so we need the bounding box of that - // which should include the avatar so set the UUID to the - // UUID of the object the avatar is sat on and allow it to fall through - // to processing an object - SceneObjectPart p = World.GetSceneObjectPart(presence.ParentID); - objID = p.UUID; - } - } - SceneObjectPart part = World.GetSceneObjectPart(objID); - // Currently only works for single prims without a sitting avatar - if (part != null) - { - Vector3 halfSize = part.Scale / 2.0f; - LSL_Vector lower = (new LSL_Vector(halfSize)) * -1.0f; - LSL_Vector upper = new LSL_Vector(halfSize); - result.Add(lower); - result.Add(upper); - return result; - } + res.Add(ScriptBaseClass.FALSE); + break; - // Not found so return empty values - result.Add(new LSL_Vector()); - result.Add(new LSL_Vector()); - return result; - } + case (int)ScriptBaseClass.PRIM_FLEXIBLE: + res.Add(ScriptBaseClass.FALSE); + res.Add(new LSL_Integer(0)); + res.Add(new LSL_Float(0)); + res.Add(new LSL_Float(0)); + res.Add(new LSL_Float(0)); + res.Add(new LSL_Float(0)); + res.Add(ScriptBaseClass.ZERO_VECTOR); + break; - public LSL_Vector llGetGeometricCenter() - { - return new LSL_Vector(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); - } + case (int)ScriptBaseClass.PRIM_TEXGEN: + if (remain < 1) + return new LSL_List(); - public LSL_List llGetPrimitiveParams(LSL_List rules) - { - m_host.AddScriptLPS(1); + face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; - LSL_List result = new LSL_List(); + res.Add(ScriptBaseClass.PRIM_TEXGEN_DEFAULT); + break; - LSL_List remaining = GetPrimParams(m_host, rules, ref result); + case (int)ScriptBaseClass.PRIM_POINT_LIGHT: + res.Add(ScriptBaseClass.FALSE); + res.Add(ScriptBaseClass.ZERO_VECTOR); + res.Add(ScriptBaseClass.ZERO_VECTOR); + break; - while (remaining != null && remaining.Length > 2) - { - int linknumber = remaining.GetLSLIntegerItem(0); - rules = remaining.GetSublist(1, -1); - List parts = GetLinkParts(linknumber); + case (int)ScriptBaseClass.PRIM_GLOW: + if (remain < 1) + return new LSL_List(); - foreach (SceneObjectPart part in parts) - remaining = GetPrimParams(part, rules, ref result); - } + face = (int)rules.GetLSLIntegerItem(idx++); + if (face > 21) + break; - return result; - } + res.Add(new LSL_Float(0)); + break; - public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) - { - m_host.AddScriptLPS(1); + case (int)ScriptBaseClass.PRIM_TEXT: + res.Add(new LSL_String("")); + res.Add(ScriptBaseClass.ZERO_VECTOR); + res.Add(new LSL_Float(1)); + break; - List parts = GetLinkParts(linknumber); + case (int)ScriptBaseClass.PRIM_ROT_LOCAL: + res.Add(new LSL_Rotation(sp.Rotation)); + break; - LSL_List res = new LSL_List(); - LSL_List remaining = null; + case (int)ScriptBaseClass.PRIM_POS_LOCAL: + res.Add(new LSL_Vector(sp.OffsetPosition)); + break; - foreach (SceneObjectPart part in parts) - { - remaining = GetPrimParams(part, rules, ref res); - } + case (int)ScriptBaseClass.PRIM_SLICE: + res.Add(new LSL_Vector(0, 1, 0)); + break; - while (remaining != null && remaining.Length > 2) - { - linknumber = remaining.GetLSLIntegerItem(0); - rules = remaining.GetSublist(1, -1); - parts = GetLinkParts(linknumber); + case (int)ScriptBaseClass.PRIM_LINK_TARGET: + if(remain < 3) + return new LSL_List(); - foreach (SceneObjectPart part in parts) - remaining = GetPrimParams(part, rules, ref res); + return rules.GetSublist(idx, -1); + } } - return res; + return new LSL_List(); } public LSL_List GetPrimParams(SceneObjectPart part, LSL_List rules, ref LSL_List res) { - int idx=0; + int idx = 0; while (idx < rules.Length) { - int code=(int)rules.GetLSLIntegerItem(idx++); - int remain=rules.Length-idx; + int code = (int)rules.GetLSLIntegerItem(idx++); + int remain = rules.Length - idx; switch (code) { @@ -8049,29 +10420,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case (int)ScriptBaseClass.PRIM_POSITION: - LSL_Vector v = new LSL_Vector(part.AbsolutePosition.X, - part.AbsolutePosition.Y, - part.AbsolutePosition.Z); + LSL_Vector v = new LSL_Vector(part.AbsolutePosition); + // For some reason, the part.AbsolutePosition.* values do not change if the // linkset is rotated; they always reflect the child prim's world position // as though the linkset is unrotated. This is incompatible behavior with SL's // implementation, so will break scripts imported from there (not to mention it // makes it more difficult to determine a child prim's actual inworld position). - if (part.ParentID != 0) - v = ((v - llGetRootPosition()) * llGetRootRotation()) + llGetRootPosition(); + if (!part.IsRoot) + { + LSL_Vector rootPos = new LSL_Vector(m_host.ParentGroup.AbsolutePosition); + v = ((v - rootPos) * llGetRootRotation()) + rootPos; + } + res.Add(v); break; case (int)ScriptBaseClass.PRIM_SIZE: - res.Add(new LSL_Vector(part.Scale.X, - part.Scale.Y, - part.Scale.Z)); + res.Add(new LSL_Vector(part.Scale)); break; case (int)ScriptBaseClass.PRIM_ROTATION: res.Add(GetPartRot(part)); break; + case (int)ScriptBaseClass.PRIM_PHYSICS_SHAPE_TYPE: + res.Add(new LSL_Integer((int)part.PhysicsShapeType)); + break; + case (int)ScriptBaseClass.PRIM_TYPE: // implementing box PrimitiveBaseShape Shape = part.Shape; @@ -8101,7 +10477,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; case ScriptBaseClass.PRIM_TYPE_SCULPT: - res.Add(Shape.SculptTexture.ToString()); + res.Add(new LSL_String(Shape.SculptTexture.ToString())); res.Add(new LSL_Integer(Shape.SculptType)); break; @@ -8133,16 +10509,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); // float revolutions - res.Add(new LSL_Float(Math.Round(Shape.PathRevolutions * 0.015d, 2, MidpointRounding.AwayFromZero)) + 1.0d); + res.Add(new LSL_Float(Math.Round(Shape.PathRevolutions * 0.015d, 2, MidpointRounding.AwayFromZero)) + 1.0d); // Slightly inaccurate, because an unsigned byte is being used to represent - // the entire range of floating-point values from 1.0 through 4.0 (which is how + // the entire range of floating-point values from 1.0 through 4.0 (which is how // SL does it). // - // Using these formulas to store and retrieve PathRevolutions, it is not - // possible to use all values between 1.00 and 4.00. For instance, you can't + // Using these formulas to store and retrieve PathRevolutions, it is not + // possible to use all values between 1.00 and 4.00. For instance, you can't // represent 1.10. You can represent 1.09 and 1.11, but not 1.10. So, if you // use llSetPrimitiveParams to set revolutions to 1.10 and then retreive them - // with llGetPrimitiveParams, you'll retrieve 1.09. You can also see a similar + // with llGetPrimitiveParams, you'll retrieve 1.09. You can also see a similar // behavior in the viewer as you cannot set 1.10. The viewer jumps to 1.11. // In SL, llSetPrimitveParams and llGetPrimitiveParams can set and get a value // such as 1.10. So, SL must store and retreive the actual user input rather @@ -8159,7 +10535,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_TEXTURE: if (remain < 1) - return null; + return new LSL_List(); int face = (int)rules.GetLSLIntegerItem(idx++); Primitive.TextureEntry tex = part.Shape.Textures; @@ -8199,7 +10575,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_COLOR: if (remain < 1) - return null; + return new LSL_List(); face=(int)rules.GetLSLIntegerItem(idx++); @@ -8228,7 +10604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_BUMP_SHINY: if (remain < 1) - return null; + return new LSL_List(); face=(int)rules.GetLSLIntegerItem(idx++); @@ -8259,9 +10635,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_FULLBRIGHT: if (remain < 1) - return null; + return new LSL_List(); - face=(int)rules.GetLSLIntegerItem(idx++); + face = (int)rules.GetLSLIntegerItem(idx++); tex = part.Shape.Textures; if (face == ScriptBaseClass.ALL_SIDES) @@ -8301,7 +10677,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_TEXGEN: if (remain < 1) - return null; + return new LSL_List(); face=(int)rules.GetLSLIntegerItem(idx++); @@ -8342,7 +10718,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case (int)ScriptBaseClass.PRIM_GLOW: if (remain < 1) - return null; + return new LSL_List(); face=(int)rules.GetLSLIntegerItem(idx++); @@ -8371,7 +10747,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_Vector(textColor.R, textColor.G, textColor.B)); - res.Add(new LSL_Float(textColor.A)); + res.Add(new LSL_Float(1.0 - textColor.A)); break; case (int)ScriptBaseClass.PRIM_NAME: res.Add(new LSL_String(part.Name)); @@ -8380,7 +10756,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api res.Add(new LSL_String(part.Description)); break; case (int)ScriptBaseClass.PRIM_ROT_LOCAL: - res.Add(new LSL_Rotation(part.RotationOffset.X, part.RotationOffset.Y, part.RotationOffset.Z, part.RotationOffset.W)); + res.Add(new LSL_Rotation(part.RotationOffset)); break; case (int)ScriptBaseClass.PRIM_POS_LOCAL: res.Add(new LSL_Vector(GetPartLocalPos(part))); @@ -8395,27 +10771,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api )); break; case (int)ScriptBaseClass.PRIM_LINK_TARGET: - if(remain < 3) - return null; + + // TODO: Should be issuing a runtime script warning in this case. + if (remain < 2) + return new LSL_List(); return rules.GetSublist(idx, -1); } } - return null; + return new LSL_List(); } public LSL_List llGetPrimMediaParams(int face, LSL_List rules) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnGetPrimMediaParams); return GetPrimMediaParams(m_host, face, rules); } public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnGetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -8535,14 +10913,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnSetPrimMediaParams); return SetPrimMediaParams(m_host, face, rules); } public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnSetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -8661,14 +11039,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llClearPrimMedia(LSL_Integer face) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnClearPrimMedia); return ClearPrimMedia(m_host, face); } public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) { m_host.AddScriptLPS(1); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnClearLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return ClearPrimMedia(m_host.ParentGroup.RootPart, face); else if (link == ScriptBaseClass.LINK_THIS) @@ -9307,7 +11685,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (item == null) { - llSay(0, "No item name '" + item + "'"); + Error("llGetInventoryCreator", "Can't find item '" + item + "'"); return String.Empty; } @@ -9355,7 +11733,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_POS: if (info == null) { - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } @@ -9402,7 +11780,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_RATING: if (info == null) { - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } int access = info.Maturity; @@ -9421,7 +11799,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply = "OpenSim"; break; default: - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); // Raise no event } UUID rq = UUID.Random(); @@ -9432,7 +11810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnRequestSimulatorData); return tid.ToString(); } catch(Exception) @@ -9441,6 +11819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return UUID.Zero.ToString(); } } + public LSL_String llRequestURL() { m_host.AddScriptLPS(1); @@ -9499,7 +11878,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end) { - LSL_List pref = null; + LSL_List pref; m_host.AddScriptLPS(1); @@ -9576,7 +11955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api dm.SendUrlToUser( new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); - ScriptSleep(10000); + ScriptSleep(m_sleepMsOnLoadURL); } public void llParcelMediaCommandList(LSL_List commandList) @@ -9588,7 +11967,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // according to the docs, this command only works if script owner and land owner are the same // lets add estate owners and gods, too, and use the generic permission check. - ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return; bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? @@ -9625,7 +12004,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api presence = World.GetScenePresence(agentID); } } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_AGENT must be a key"); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_AGENT must be a key"); ++i; } break; @@ -9656,7 +12035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api url = (LSL_String)commandList.Data[i + 1]; update = true; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_URL must be a string."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_URL must be a string"); ++i; } break; @@ -9669,7 +12048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api texture = (LSL_String)commandList.Data[i + 1]; update = true; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_TEXTURE must be a string or key."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_TEXTURE must be a string or a key"); ++i; } break; @@ -9681,7 +12060,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { time = (float)(LSL_Float)commandList.Data[i + 1]; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_TIME must be a float."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_TIME must be a float"); ++i; } break; @@ -9695,7 +12074,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api update = true; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_AUTO_ALIGN must be an integer."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_AUTO_ALIGN must be an integer"); ++i; } break; @@ -9708,7 +12087,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api mediaType = (LSL_String)commandList.Data[i + 1]; update = true; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_TYPE must be a string."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_TYPE must be a string"); ++i; } break; @@ -9721,7 +12100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api description = (LSL_String)commandList.Data[i + 1]; update = true; } - else ShoutError("The argument of PARCEL_MEDIA_COMMAND_DESC must be a string."); + else Error("llParcelMediaCommandList", "The argument of PARCEL_MEDIA_COMMAND_DESC must be a string"); ++i; } break; @@ -9737,15 +12116,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api height = (LSL_Integer)commandList.Data[i + 2]; update = true; } - else ShoutError("The second argument of PARCEL_MEDIA_COMMAND_SIZE must be an integer."); + else Error("llParcelMediaCommandList", "The second argument of PARCEL_MEDIA_COMMAND_SIZE must be an integer"); } - else ShoutError("The first argument of PARCEL_MEDIA_COMMAND_SIZE must be an integer."); + else Error("llParcelMediaCommandList", "The first argument of PARCEL_MEDIA_COMMAND_SIZE must be an integer"); i += 2; } break; default: - NotImplemented("llParcelMediaCommandList parameter not supported yet: " + Enum.Parse(typeof(ParcelMediaCommandEnum), commandList.Data[i].ToString()).ToString()); + NotImplemented("llParcelMediaCommandList", "Parameter not supported yet: " + Enum.Parse(typeof(ParcelMediaCommandEnum), commandList.Data[i].ToString()).ToString()); break; }//end switch }//end for @@ -9819,7 +12198,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api time); } } - ScriptSleep(2000); + ScriptSleep(m_sleepMsOnParcelMediaCommandList); } public LSL_List llParcelMediaQuery(LSL_List aList) @@ -9853,13 +12232,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api break; default: ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; - NotImplemented("llParcelMediaQuery parameter do not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString()); + NotImplemented("llParcelMediaQuery", "Parameter not supported yet: " + Enum.Parse(mediaCommandEnum.GetType() , aList.Data[i].ToString()).ToString()); break; } } } - ScriptSleep(2000); + ScriptSleep(m_sleepMsOnParcelMediaQuery); return list; } @@ -9868,7 +12247,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); Int64 tmp = 0; Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnModPow); return Convert.ToInt32(tmp); } @@ -9890,7 +12269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (quick_pay_buttons.Data.Length < 4) { - LSLError("List must have at least 4 elements"); + Error("llSetPayPrice", "List must have at least 4 elements"); return; } m_host.ParentGroup.RootPart.PayPrice[0]=price; @@ -9907,21 +12286,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) - return new LSL_Vector(); + return Vector3.Zero; if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) { - ShoutError("No permissions to track the camera"); - return new LSL_Vector(); + Error("llGetCameraPos", "No permissions to track the camera"); + return Vector3.Zero; } ScenePresence presence = World.GetScenePresence(m_host.OwnerID); if (presence != null) { - LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z); + LSL_Vector pos = new LSL_Vector(presence.CameraPosition); return pos; } - return new LSL_Vector(); + + return Vector3.Zero; } public LSL_Rotation llGetCameraRot() @@ -9929,42 +12309,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) - return new LSL_Rotation(); + return Quaternion.Identity; if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) { - ShoutError("No permissions to track the camera"); - return new LSL_Rotation(); + Error("llGetCameraRot", "No permissions to track the camera"); + return Quaternion.Identity; } ScenePresence presence = World.GetScenePresence(m_host.OwnerID); if (presence != null) { - return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W); + return new LSL_Rotation(presence.CameraRotation); } - return new LSL_Rotation(); + return Quaternion.Identity; } - /// - /// The SL implementation does nothing, it is deprecated - /// This duplicates SL - /// public void llSetPrimURL(string url) { m_host.AddScriptLPS(1); - ScriptSleep(2000); + Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); + ScriptSleep(m_sleepMsOnSetPrimURL); } - /// - /// The SL implementation shouts an error, it is deprecated - /// This duplicates SL - /// public void llRefreshPrimURL() { m_host.AddScriptLPS(1); - ShoutError("llRefreshPrimURL - not yet supported"); - ScriptSleep(20000); + Deprecated("llRefreshPrimURL"); + ScriptSleep(m_sleepMsOnRefreshPrimURL); } public LSL_String llEscapeURL(string url) @@ -10005,14 +12378,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, simname, pos, lookAt); } - ScriptSleep(1000); + ScriptSleep(m_sleepMsOnMapDestination); } public void llAddToLandBanList(string avatar, double hours) { m_host.AddScriptLPS(1); UUID key; - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) { int expires = 0; @@ -10046,14 +12419,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnAddToLandBanList); } public void llRemoveFromLandPassList(string avatar) { m_host.AddScriptLPS(1); UUID key; - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed)) { if (UUID.TryParse(avatar, out key)) @@ -10073,14 +12446,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnRemoveFromLandPassList); } public void llRemoveFromLandBanList(string avatar) { m_host.AddScriptLPS(1); UUID key; - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) { if (UUID.TryParse(avatar, out key)) @@ -10100,7 +12473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnRemoveFromLandBanList); } public void llSetCameraParams(LSL_List rules) @@ -10128,19 +12501,84 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SortedDictionary parameters = new SortedDictionary(); object[] data = rules.Data; - for (int i = 0; i < data.Length; ++i) { - int type = Convert.ToInt32(data[i++].ToString()); + for (int i = 0; i < data.Length; ++i) + { + int type; + try + { + type = Convert.ToInt32(data[i++].ToString()); + } + catch + { + Error("llSetCameraParams", string.Format("Invalid camera param type {0}", data[i - 1])); + return; + } if (i >= data.Length) break; // odd number of entries => ignore the last // some special cases: Vector parameters are split into 3 float parameters (with type+1, type+2, type+3) - switch (type) { + switch (type) + { case ScriptBaseClass.CAMERA_FOCUS: case ScriptBaseClass.CAMERA_FOCUS_OFFSET: case ScriptBaseClass.CAMERA_POSITION: LSL_Vector v = (LSL_Vector)data[i]; - parameters.Add(type + 1, (float)v.x); - parameters.Add(type + 2, (float)v.y); - parameters.Add(type + 3, (float)v.z); + try + { + parameters.Add(type + 1, (float)v.x); + } + catch + { + switch(type) + { + case ScriptBaseClass.CAMERA_FOCUS: + Error("llSetCameraParams", "CAMERA_FOCUS: Parameter x is invalid"); + return; + case ScriptBaseClass.CAMERA_FOCUS_OFFSET: + Error("llSetCameraParams", "CAMERA_FOCUS_OFFSET: Parameter x is invalid"); + return; + case ScriptBaseClass.CAMERA_POSITION: + Error("llSetCameraParams", "CAMERA_POSITION: Parameter x is invalid"); + return; + } + } + try + { + parameters.Add(type + 2, (float)v.y); + } + catch + { + switch(type) + { + case ScriptBaseClass.CAMERA_FOCUS: + Error("llSetCameraParams", "CAMERA_FOCUS: Parameter y is invalid"); + return; + case ScriptBaseClass.CAMERA_FOCUS_OFFSET: + Error("llSetCameraParams", "CAMERA_FOCUS_OFFSET: Parameter y is invalid"); + return; + case ScriptBaseClass.CAMERA_POSITION: + Error("llSetCameraParams", "CAMERA_POSITION: Parameter y is invalid"); + return; + } + } + try + { + parameters.Add(type + 3, (float)v.z); + } + catch + { + switch(type) + { + case ScriptBaseClass.CAMERA_FOCUS: + Error("llSetCameraParams", "CAMERA_FOCUS: Parameter z is invalid"); + return; + case ScriptBaseClass.CAMERA_FOCUS_OFFSET: + Error("llSetCameraParams", "CAMERA_FOCUS_OFFSET: Parameter z is invalid"); + return; + case ScriptBaseClass.CAMERA_POSITION: + Error("llSetCameraParams", "CAMERA_POSITION: Parameter z is invalid"); + return; + } + } break; default: // TODO: clean that up as soon as the implicit casts are in @@ -10148,7 +12586,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api parameters.Add(type, (float)((LSL_Float)data[i]).value); else if (data[i] is LSL_Integer) parameters.Add(type, (float)((LSL_Integer)data[i]).value); - else parameters.Add(type, Convert.ToSingle(data[i])); + else + { + try + { + parameters.Add(type, Convert.ToSingle(data[i])); + } + catch + { + Error("llSetCameraParams", string.Format("{0}: Parameter is invalid", type)); + } + } break; } } @@ -10264,9 +12712,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface(); List param = new List(); - foreach (object o in parameters.Data) + bool ok; + Int32 flag; + + for (int i = 0; i < parameters.Data.Length; i += 2) { - param.Add(o.ToString()); + ok = Int32.TryParse(parameters.Data[i].ToString(), out flag); + if (!ok || flag < 0 || + flag > (int)HttpRequestConstants.HTTP_PRAGMA_NO_CACHE) + { + Error("llHTTPRequest", "Parameter " + i.ToString() + " is an invalid flag"); + } + + param.Add(parameters.Data[i].ToString()); //Add parameter flag + + if (flag != (int)HttpRequestConstants.HTTP_CUSTOM_HEADER) + { + param.Add(parameters.Data[i+1].ToString()); //Add parameter value + } + else + { + //Parameters are in pairs and custom header takes + //arguments in pairs so adjust for header marker. + ++i; + + //Maximum of 8 headers are allowed based on the + //Second Life documentation for llHTTPRequest. + for (int count = 1; count <= 8; ++count) + { + //Enough parameters remaining for (another) header? + if (parameters.Data.Length - i < 2) + { + //There must be at least one name/value pair for custom header + if (count == 1) + Error("llHTTPRequest", "Missing name/value for custom header at parameter " + i.ToString()); + break; + } + + if (HttpStandardHeaders.Contains(parameters.Data[i].ToString(), StringComparer.OrdinalIgnoreCase)) + Error("llHTTPRequest", "Name is invalid as a custom header at parameter " + i.ToString()); + + param.Add(parameters.Data[i].ToString()); + param.Add(parameters.Data[i+1].ToString()); + + //Have we reached the end of the list of headers? + //End is marked by a string with a single digit. + if (i+2 >= parameters.Data.Length || + Char.IsDigit(parameters.Data[i].ToString()[0])) + { + break; + } + + i += 2; + } + } } Vector3 position = m_host.AbsolutePosition; @@ -10318,8 +12817,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + HttpInitialRequestStatus status; UUID reqID - = httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body); + = httpScriptMod.StartHttpRequest(m_host.LocalId, m_item.ItemID, url, param, httpHeaders, body, out status); + + if (status == HttpInitialRequestStatus.DISALLOWED_BY_FILTER) + Error("llHttpRequest", string.Format("Request to {0} disallowed by filter", url)); if (reqID != UUID.Zero) return reqID.ToString(); @@ -10342,7 +12845,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llResetLandBanList() { m_host.AddScriptLPS(1); - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID) { foreach (LandAccessEntry entry in land.ParcelAccessList) @@ -10353,13 +12856,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnResetLandBanList); } public void llResetLandPassList() { m_host.AddScriptLPS(1); - LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).LandData; + LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID) { foreach (LandAccessEntry entry in land.ParcelAccessList) @@ -10370,18 +12873,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(100); + ScriptSleep(m_sleepMsOnResetLandPassList); } public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) { m_host.AddScriptLPS(1); - + ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); if (lo == null) return 0; - + IPrimCounts pc = lo.PrimCounts; if (sim_wide != ScriptBaseClass.FALSE) @@ -10411,7 +12914,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else if (category == ScriptBaseClass.PARCEL_COUNT_TEMP) return 0; // counts not implemented yet } - + return 0; } @@ -10428,7 +12931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Integer(detectedParams.Value)); } } - ScriptSleep(2000); + ScriptSleep(m_sleepMsOnGetParcelPrimOwners); return ret; } @@ -10535,10 +13038,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); break; case ScriptBaseClass.OBJECT_ROT: - ret.Add(new LSL_Rotation((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W)); + ret.Add(new LSL_Rotation(av.GetWorldRotation())); break; case ScriptBaseClass.OBJECT_VELOCITY: - ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); + ret.Add(new LSL_Vector(av.GetWorldVelocity())); break; case ScriptBaseClass.OBJECT_OWNER: ret.Add(new LSL_String(id)); @@ -10603,6 +13106,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.OBJECT_TEMP_ON_REZ: ret.Add(new LSL_Integer(0)); break; + case ScriptBaseClass.OBJECT_RENDER_WEIGHT: + ret.Add(new LSL_Integer(-1)); + break; + case ScriptBaseClass.OBJECT_HOVER_HEIGHT: + ret.Add(new LSL_Float(0)); + break; + case ScriptBaseClass.OBJECT_BODY_SHAPE_TYPE: + LSL_Float shapeType; + if (av.Appearance.VisualParams[(int)AvatarAppearance.VPElement.SHAPE_MALE] != 0) + shapeType = new LSL_Float(1); + else + shapeType = new LSL_Float(0); + ret.Add(shapeType); + break; + case ScriptBaseClass.OBJECT_LAST_OWNER_ID: + ret.Add(new LSL_Key(ScriptBaseClass.NULL_KEY)); + break; default: // Invalid or unhandled constant. ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); @@ -10630,20 +13150,43 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); break; case ScriptBaseClass.OBJECT_ROT: + Quaternion rot = Quaternion.Identity; + + if (obj.ParentGroup.IsAttachment) { - Quaternion rot = Quaternion.Identity; + ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar); + if (sp != null) + rot = sp.GetWorldRotation(); + } + else + { if (obj.ParentGroup.RootPart == obj) rot = obj.ParentGroup.GroupRotation; else rot = obj.GetWorldRotation(); - - LSL_Rotation objrot = new LSL_Rotation(rot); - ret.Add(objrot); } + + LSL_Rotation objrot = new LSL_Rotation(rot); + ret.Add(objrot); + break; case ScriptBaseClass.OBJECT_VELOCITY: - ret.Add(new LSL_Vector(obj.Velocity)); + Vector3 vel = Vector3.Zero; + + if (obj.ParentGroup.IsAttachment) + { + ScenePresence sp = World.GetScenePresence(obj.ParentGroup.AttachedAvatar); + + if (sp != null) + vel = sp.GetWorldVelocity(); + } + else + { + vel = obj.Velocity; + } + + ret.Add(vel); break; case ScriptBaseClass.OBJECT_OWNER: ret.Add(new LSL_String(obj.OwnerID.ToString())); @@ -10744,6 +13287,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.OBJECT_TEMP_ON_REZ: ret.Add(new LSL_Integer(obj.ParentGroup.IsTemporary ? 1 : 0)); break; + case ScriptBaseClass.OBJECT_RENDER_WEIGHT: + ret.Add(new LSL_Integer(0)); + break; + case ScriptBaseClass.OBJECT_HOVER_HEIGHT: + ret.Add(new LSL_Float(0)); + break; + case ScriptBaseClass.OBJECT_BODY_SHAPE_TYPE: + ret.Add(new LSL_Float(-1)); + break; + case ScriptBaseClass.OBJECT_LAST_OWNER_ID: + ret.Add(new LSL_Key(obj.ParentGroup.LastOwnerID.ToString())); + break; default: // Invalid or unhandled constant. ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL)); @@ -10754,7 +13309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ret; } } - + return new LSL_List(); } @@ -10768,25 +13323,71 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return item.ItemID; } - internal void ShoutError(string msg) + /// + /// Reports the script error in the viewer's Script Warning/Error dialog and shouts it on the debug channel. + /// + /// The name of the command that generated the error. + /// The error message to report to the user. + internal void Error(string command, string message) { - llShout(ScriptBaseClass.DEBUG_CHANNEL, msg); + string text = command + ": " + message; + if (text.Length > 1023) + { + text = text.Substring(0, 1023); + } + + World.SimChat(Utils.StringToBytes(text), ChatTypeEnum.DebugChannel, ScriptBaseClass.DEBUG_CHANNEL, + m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); + + IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); + if (wComm != null) + { + wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, text); + } } - internal void NotImplemented(string command) + /// + /// Reports that the command is not implemented as a script error. + /// + /// The name of the command that is not implemented. + /// Additional information to report to the user. (Optional) + internal void NotImplemented(string command, string message = "") { if (throwErrorOnNotImplemented) - throw new NotImplementedException("Command not implemented: " + command); - } + { + if (message != "") + { + message = " - " + message; + } - internal void Deprecated(string command) - { - throw new ScriptException("Command deprecated: " + command); + throw new NotImplementedException("Command not implemented: " + command + message); + } + else + { + string text = "Command not implemented"; + if (message != "") + { + text = text + " - " + message; + } + + Error(command, text); + } } - internal void LSLError(string msg) + /// + /// Reports that the command is deprecated as a script error. + /// + /// The name of the command that is deprecated. + /// Additional information to report to the user. (Optional) + internal void Deprecated(string command, string message = "") { - throw new ScriptException("LSL Runtime Error: " + msg); + string text = "Command deprecated"; + if (message != "") + { + text = text + " - " + message; + } + + Error(command, text); } public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); @@ -10818,20 +13419,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (assetID == UUID.Zero) { // => complain loudly, as specified by the LSL docs - ShoutError("Notecard '" + name + "' could not be found."); + Error("llGetNumberOfNotecardLines", "Can't find notecard '" + name + "'"); return UUID.Zero.ToString(); } + string reqIdentifier = UUID.Random().ToString(); + // was: UUID tid = tid = AsyncCommands. - UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString()); + UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, reqIdentifier); if (NotecardCache.IsCached(assetID)) { - AsyncCommands. - DataserverPlugin.DataserverReply(assetID.ToString(), - NotecardCache.GetLines(assetID).ToString()); - ScriptSleep(100); + AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); + + ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } @@ -10839,19 +13441,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (a == null || a.Type != 7) { - ShoutError("Notecard '" + name + "' could not be found."); + Error("llGetNumberOfNotecardLines", "Can't find notecard '" + name + "'"); return; } - string data = Encoding.UTF8.GetString(a.Data); - //m_log.Debug(data); - NotecardCache.Cache(id, data); - AsyncCommands. - DataserverPlugin.DataserverReply(id.ToString(), - NotecardCache.GetLines(id).ToString()); + NotecardCache.Cache(id, a.Data); + AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); }); - ScriptSleep(100); + ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } @@ -10872,19 +13470,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (assetID == UUID.Zero) { // => complain loudly, as specified by the LSL docs - ShoutError("Notecard '" + name + "' could not be found."); + Error("llGetNotecardLine", "Can't find notecard '" + name + "'"); return UUID.Zero.ToString(); } + string reqIdentifier = UUID.Random().ToString(); + // was: UUID tid = tid = AsyncCommands. - UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, assetID.ToString()); + UUID tid = AsyncCommands.DataserverPlugin.RegisterRequest(m_host.LocalId, m_item.ItemID, reqIdentifier); if (NotecardCache.IsCached(assetID)) { - AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(), - NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); - ScriptSleep(100); + AsyncCommands.DataserverPlugin.DataserverReply( + reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); + + ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } @@ -10892,18 +13493,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (a == null || a.Type != 7) { - ShoutError("Notecard '" + name + "' could not be found."); + Error("llGetNotecardLine", "Can't find notecard '" + name + "'"); return; } string data = Encoding.UTF8.GetString(a.Data); //m_log.Debug(data); - NotecardCache.Cache(id, data); - AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(), - NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); + NotecardCache.Cache(id, a.Data); + AsyncCommands.DataserverPlugin.DataserverReply( + reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); }); - ScriptSleep(100); + ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } @@ -10916,41 +13517,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (obj.OwnerID != m_host.OwnerID) return; - uint rulesParsed = 0; - LSL_List remaining = SetPrimParams(obj, rules, originFunc, ref rulesParsed); - - while ((object)remaining != null && remaining.Length > 2) - { - LSL_Integer newLink = remaining.GetLSLIntegerItem(0); - LSL_List newrules = remaining.GetSublist(1, -1); - foreach(SceneObjectPart part in GetLinkParts(obj, newLink)){ - remaining = SetPrimParams(part, newrules, originFunc, ref rulesParsed); - } - } - } - - public LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules) - { - SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); - - LSL_List result = new LSL_List(); - - if (obj != null && obj.OwnerID != m_host.OwnerID) - { - LSL_List remaining = GetPrimParams(obj, rules, ref result); + SetEntityParams(new List() { obj }, rules, originFunc); + } - while (remaining != null && remaining.Length > 2) - { - int linknumber = remaining.GetLSLIntegerItem(0); - rules = remaining.GetSublist(1, -1); - List parts = GetLinkParts(linknumber); + public LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules) + { + SceneObjectPart obj = World.GetSceneObjectPart(new UUID(prim)); - foreach (SceneObjectPart part in parts) - remaining = GetPrimParams(part, rules, ref result); - } - } + if (obj != null && obj.OwnerID == m_host.OwnerID) + return GetEntityParams(obj, rules); - return result; + return new LSL_List(); } public void print(string str) @@ -11036,7 +13613,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.ForEachScenePresence(delegate(ScenePresence sp) { Vector3 ac = sp.AbsolutePosition - rayStart; - Vector3 bc = sp.AbsolutePosition - rayEnd; +// Vector3 bc = sp.AbsolutePosition - rayEnd; double d = Math.Abs(Vector3.Mag(Vector3.Cross(ab, ac)) / Vector3.Distance(rayStart, rayEnd)); @@ -11124,9 +13701,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api radius = Math.Abs(maxY); if (Math.Abs(maxZ) > radius) radius = Math.Abs(maxZ); - + radius = radius*1.413f; Vector3 ac = group.AbsolutePosition - rayStart; - Vector3 bc = group.AbsolutePosition - rayEnd; +// Vector3 bc = group.AbsolutePosition - rayEnd; double d = Math.Abs(Vector3.Mag(Vector3.Cross(ab, ac)) / Vector3.Distance(rayStart, rayEnd)); @@ -11139,11 +13716,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (d2 > 0) return; + ray = new Ray(rayStart, Vector3.Normalize(rayEnd - rayStart)); EntityIntersection intersection = group.TestIntersection(ray, true, false); // Miss. if (!intersection.HitTF) return; + Vector3 b1 = group.AbsolutePosition + new Vector3(minX, minY, minZ); + Vector3 b2 = group.AbsolutePosition + new Vector3(maxX, maxY, maxZ); + //m_log.DebugFormat("[LLCASTRAY]: min<{0},{1},{2}>, max<{3},{4},{5}> = hitp<{6},{7},{8}>", b1.X,b1.Y,b1.Z,b2.X,b2.Y,b2.Z,intersection.ipoint.X,intersection.ipoint.Y,intersection.ipoint.Z); + if (!(intersection.ipoint.X >= b1.X && intersection.ipoint.X <= b2.X && + intersection.ipoint.Y >= b1.Y && intersection.ipoint.Y <= b2.Y && + intersection.ipoint.Z >= b1.Z && intersection.ipoint.Z <= b2.Z)) + return; + ContactResult result = new ContactResult (); result.ConsumerID = group.LocalId; result.Depth = intersection.distance; @@ -11254,155 +13840,1093 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api float wv = Vector3.Dot(w, v); float d = uv * uv - uu * vv; - float cs = (uv * wv - vv * wu) / d; - if (cs < 0 || cs > 1.0) - continue; - float ct = (uv * wu - uu * wv) / d; - if (ct < 0 || (cs + ct) > 1.0) - continue; + float cs = (uv * wv - vv * wu) / d; + if (cs < 0 || cs > 1.0) + continue; + float ct = (uv * wu - uu * wv) / d; + if (ct < 0 || (cs + ct) > 1.0) + continue; + + // Add contact point + ContactResult result = new ContactResult (); + result.ConsumerID = 0; + result.Depth = Vector3.Distance(rayStart, ip); + result.Normal = n; + result.Pos = ip; + + contacts.Add(result); + } + + if (contacts.Count == 0) + return null; + + contacts.Sort(delegate(ContactResult a, ContactResult b) + { + return (int)(a.Depth - b.Depth); + }); + + return contacts[0]; + } + + public LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options) + { + // Use llCastRay V3 if configured + if (m_useCastRayV3) + return llCastRayV3(start, end, options); + + LSL_List list = new LSL_List(); + + m_host.AddScriptLPS(1); + + Vector3 rayStart = start; + Vector3 rayEnd = end; + Vector3 dir = rayEnd - rayStart; + + float dist = Vector3.Mag(dir); + + int count = 1; + bool detectPhantom = false; + int dataFlags = 0; + int rejectTypes = 0; + + for (int i = 0; i < options.Length; i += 2) + { + if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_MAX_HITS) + count = options.GetLSLIntegerItem(i + 1); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DETECT_PHANTOM) + detectPhantom = (options.GetLSLIntegerItem(i + 1) > 0); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DATA_FLAGS) + dataFlags = options.GetLSLIntegerItem(i + 1); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_REJECT_TYPES) + rejectTypes = options.GetLSLIntegerItem(i + 1); + } + + if (count > 16) + count = 16; + + List results = new List(); + + bool checkTerrain = !((rejectTypes & ScriptBaseClass.RC_REJECT_LAND) == ScriptBaseClass.RC_REJECT_LAND); + bool checkAgents = !((rejectTypes & ScriptBaseClass.RC_REJECT_AGENTS) == ScriptBaseClass.RC_REJECT_AGENTS); + bool checkNonPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_NONPHYSICAL) == ScriptBaseClass.RC_REJECT_NONPHYSICAL); + bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); + + + if (World.SupportsRayCastFiltered()) + { + if (dist == 0) + return list; + + RayFilterFlags rayfilter = RayFilterFlags.ClosestAndBackCull; + if (checkTerrain) + rayfilter |= RayFilterFlags.land; +// if (checkAgents) +// rayfilter |= RayFilterFlags.agent; + if (checkPhysical) + rayfilter |= RayFilterFlags.physical; + if (checkNonPhysical) + rayfilter |= RayFilterFlags.nonphysical; + if (detectPhantom) + rayfilter |= RayFilterFlags.LSLPhantom; + + Vector3 direction = dir * ( 1/dist); + + if(rayfilter == 0) + { + list.Add(new LSL_Integer(0)); + return list; + } + + // get some more contacts to sort ??? + int physcount = 4 * count; + if (physcount > 20) + physcount = 20; + + object physresults; + physresults = World.RayCastFiltered(rayStart, direction, dist, physcount, rayfilter); + + if (physresults == null) + { + list.Add(new LSL_Integer(-3)); // timeout error + return list; + } + + results = (List)physresults; + + // for now physics doesn't detect sitted avatars so do it outside physics + if (checkAgents) + { + ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); + foreach (ContactResult r in agentHits) + results.Add(r); + } + + // TODO: Replace this with a better solution. ObjectIntersection can only + // detect nonphysical phantoms. They are detected by virtue of being + // nonphysical (e.g. no PhysActor) so will not conflict with detecting + // physicsl phantoms as done by the physics scene + // We don't want anything else but phantoms here. + if (detectPhantom) + { + ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, false, false, true); + foreach (ContactResult r in objectHits) + results.Add(r); + } + } + else + { + if (checkAgents) + { + ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); + foreach (ContactResult r in agentHits) + results.Add(r); + } + + if (checkPhysical || checkNonPhysical || detectPhantom) + { + ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, checkPhysical, checkNonPhysical, detectPhantom); + for (int iter = 0; iter < objectHits.Length; iter++) + { + // Redistance the Depth because the Scene RayCaster returns distance from center to make the rezzing code simpler. + objectHits[iter].Depth = Vector3.Distance(objectHits[iter].Pos, rayStart); + results.Add(objectHits[iter]); + } + } + } + + if (checkTerrain) + { + ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); + if (groundContact != null) + results.Add((ContactResult)groundContact); + } + + results.Sort(delegate(ContactResult a, ContactResult b) + { + return a.Depth.CompareTo(b.Depth); + }); + + int values = 0; + SceneObjectGroup thisgrp = m_host.ParentGroup; + + foreach (ContactResult result in results) + { + if (result.Depth > dist) + continue; + + // physics ray can return colisions with host prim + if (m_host.LocalId == result.ConsumerID) + continue; + + UUID itemID = UUID.Zero; + int linkNum = 0; + + SceneObjectPart part = World.GetSceneObjectPart(result.ConsumerID); + // It's a prim! + if (part != null) + { + // dont detect members of same object ??? + if (part.ParentGroup == thisgrp) + continue; + + if ((dataFlags & ScriptBaseClass.RC_GET_ROOT_KEY) == ScriptBaseClass.RC_GET_ROOT_KEY) + itemID = part.ParentGroup.UUID; + else + itemID = part.UUID; + + linkNum = part.LinkNum; + } + else + { + ScenePresence sp = World.GetScenePresence(result.ConsumerID); + /// It it a boy? a girl? + if (sp != null) + itemID = sp.UUID; + } + + list.Add(new LSL_String(itemID.ToString())); + list.Add(new LSL_String(result.Pos.ToString())); + + if ((dataFlags & ScriptBaseClass.RC_GET_LINK_NUM) == ScriptBaseClass.RC_GET_LINK_NUM) + list.Add(new LSL_Integer(linkNum)); + + if ((dataFlags & ScriptBaseClass.RC_GET_NORMAL) == ScriptBaseClass.RC_GET_NORMAL) + list.Add(new LSL_Vector(result.Normal)); + + values++; + if (values >= count) + break; + } + + list.Add(new LSL_Integer(values)); + + return list; + } + + /// + /// Implementation of llCastRay similar to SL 2015-04-21. + /// http://wiki.secondlife.com/wiki/LlCastRay + /// Uses pure geometry, bounding shapes, meshing and no physics + /// for prims, sculpts, meshes, avatars and terrain. + /// Implements all flags, reject types and data flags. + /// Can handle both objects/groups and prims/parts, by config. + /// May sometimes be inaccurate owing to calculation precision, + /// meshing detail level and a bug in libopenmetaverse PrimMesher. + /// + public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) + { + m_host.AddScriptLPS(1); + LSL_List result = new LSL_List(); + + // Prepare throttle data + int calledMs = Environment.TickCount; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + UUID regionId = World.RegionInfo.RegionID; + UUID userId = UUID.Zero; + int msAvailable = 0; + // Throttle per owner when attachment or "vehicle" (sat upon) + if (m_host.ParentGroup.IsAttachment || m_host.ParentGroup.GetSittingAvatars().Count > 0) + { + userId = m_host.OwnerID; + msAvailable = m_msPerAvatarInCastRay; + } + // Throttle per parcel when not attachment or vehicle + else + { + LandData land = World.GetLandData(m_host.GetWorldPosition()); + if (land != null) + msAvailable = m_msPerRegionInCastRay * land.Area / 65536; + } + // Clamp for "oversized" parcels on varregions + if (msAvailable > m_msMaxInCastRay) + msAvailable = m_msMaxInCastRay; + + // Check throttle data + int fromCalledMs = calledMs - m_msThrottleInCastRay; + lock (m_castRayCalls) + { + for (int i = m_castRayCalls.Count - 1; i >= 0; i--) + { + // Delete old calls from throttle data + if (m_castRayCalls[i].CalledMs < fromCalledMs) + m_castRayCalls.RemoveAt(i); + // Use current region (in multi-region sims) + else if (m_castRayCalls[i].RegionId == regionId) + { + // Reduce available time with recent calls + if (m_castRayCalls[i].UserId == userId) + msAvailable -= m_castRayCalls[i].UsedMs; + } + } + } + + // Return failure if not enough available time + if (msAvailable < m_msMinInCastRay) + { + result.Add(new LSL_Integer(ScriptBaseClass.RCERR_CAST_TIME_EXCEEDED)); + return result; + } + + // Initialize + List rayHits = new List(); + float tol = m_floatToleranceInCastRay; + Vector3 pos1Ray = start; + Vector3 pos2Ray = end; + + // Get input options + int rejectTypes = 0; + int dataFlags = 0; + int maxHits = 1; + bool detectPhantom = false; + for (int i = 0; i < options.Length; i += 2) + { + if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_REJECT_TYPES) + rejectTypes = options.GetLSLIntegerItem(i + 1); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DATA_FLAGS) + dataFlags = options.GetLSLIntegerItem(i + 1); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_MAX_HITS) + maxHits = options.GetLSLIntegerItem(i + 1); + else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DETECT_PHANTOM) + detectPhantom = (options.GetLSLIntegerItem(i + 1) != 0); + } + if (maxHits > m_maxHitsInCastRay) + maxHits = m_maxHitsInCastRay; + bool rejectAgents = ((rejectTypes & ScriptBaseClass.RC_REJECT_AGENTS) != 0); + bool rejectPhysical = ((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) != 0); + bool rejectNonphysical = ((rejectTypes & ScriptBaseClass.RC_REJECT_NONPHYSICAL) != 0); + bool rejectLand = ((rejectTypes & ScriptBaseClass.RC_REJECT_LAND) != 0); + bool getNormal = ((dataFlags & ScriptBaseClass.RC_GET_NORMAL) != 0); + bool getRootKey = ((dataFlags & ScriptBaseClass.RC_GET_ROOT_KEY) != 0); + bool getLinkNum = ((dataFlags & ScriptBaseClass.RC_GET_LINK_NUM) != 0); + + // Calculate some basic parameters + Vector3 vecRay = pos2Ray - pos1Ray; + float rayLength = vecRay.Length(); + + // Try to get a mesher and return failure if none, degenerate ray, or max 0 hits + IRendering primMesher = null; + List renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory()); + if (renderers.Count < 1 || rayLength < tol || m_maxHitsInCastRay < 1) + { + result.Add(new LSL_Integer(ScriptBaseClass.RCERR_UNKNOWN)); + return result; + } + primMesher = RenderingLoader.LoadRenderer(renderers[0]); + + // Iterate over all objects/groups and prims/parts in region + World.ForEachSOG( + delegate(SceneObjectGroup group) + { + // Check group filters unless part filters are configured + bool isPhysical = (group.RootPart != null && group.RootPart.PhysActor != null && group.RootPart.PhysActor.IsPhysical); + bool isNonphysical = !isPhysical; + bool isPhantom = group.IsPhantom || group.IsVolumeDetect; + bool isAttachment = group.IsAttachment; + bool doGroup = true; + if (isPhysical && rejectPhysical) + doGroup = false; + if (isNonphysical && rejectNonphysical) + doGroup = false; + if (isPhantom && detectPhantom) + doGroup = true; + if (m_filterPartsInCastRay) + doGroup = true; + if (isAttachment && !m_doAttachmentsInCastRay) + doGroup = false; + // Parse object/group if passed filters + if (doGroup) + { + // Iterate over all prims/parts in object/group + foreach(SceneObjectPart part in group.Parts) + { + // Check part filters if configured + if (m_filterPartsInCastRay) + { + isPhysical = (part.PhysActor != null && part.PhysActor.IsPhysical); + isNonphysical = !isPhysical; + isPhantom = ((part.Flags & PrimFlags.Phantom) != 0) || (part.VolumeDetectActive); + bool doPart = true; + if (isPhysical && rejectPhysical) + doPart = false; + if (isNonphysical && rejectNonphysical) + doPart = false; + if (isPhantom && detectPhantom) + doPart = true; + if (!doPart) + continue; + } + + // Parse prim/part and project ray if passed filters + Vector3 scalePart = part.Scale; + Vector3 posPart = part.GetWorldPosition(); + Quaternion rotPart = part.GetWorldRotation(); + Quaternion rotPartInv = Quaternion.Inverse(rotPart); + Vector3 pos1RayProj = ((pos1Ray - posPart) * rotPartInv) / scalePart; + Vector3 pos2RayProj = ((pos2Ray - posPart) * rotPartInv) / scalePart; + + // Filter parts by shape bounding boxes + Vector3 shapeBoxMax = new Vector3(0.5f, 0.5f, 0.5f); + if (!part.Shape.SculptEntry) + shapeBoxMax = shapeBoxMax * (new Vector3(m_primSafetyCoeffX, m_primSafetyCoeffY, m_primSafetyCoeffZ)); + shapeBoxMax = shapeBoxMax + (new Vector3(tol, tol, tol)); + if (RayIntersectsShapeBox(pos1RayProj, pos2RayProj, shapeBoxMax)) + { + // Prepare data needed to check for ray hits + RayTrans rayTrans = new RayTrans(); + rayTrans.PartId = part.UUID; + rayTrans.GroupId = part.ParentGroup.UUID; + rayTrans.Link = group.PrimCount > 1 ? part.LinkNum : 0; + rayTrans.ScalePart = scalePart; + rayTrans.PositionPart = posPart; + rayTrans.RotationPart = rotPart; + rayTrans.ShapeNeedsEnds = true; + rayTrans.Position1Ray = pos1Ray; + rayTrans.Position1RayProj = pos1RayProj; + rayTrans.VectorRayProj = pos2RayProj - pos1RayProj; + + // Get detail level depending on type + int lod = 0; + // Mesh detail level + if (part.Shape.SculptEntry && part.Shape.SculptType == (byte)SculptType.Mesh) + lod = (int)m_meshLodInCastRay; + // Sculpt detail level + else if (part.Shape.SculptEntry && part.Shape.SculptType == (byte)SculptType.Mesh) + lod = (int)m_sculptLodInCastRay; + // Shape detail level + else if (!part.Shape.SculptEntry) + lod = (int)m_primLodInCastRay; + + // Try to get cached mesh if configured + ulong meshKey = 0; + FacetedMesh mesh = null; + if (m_useMeshCacheInCastRay) + { + meshKey = part.Shape.GetMeshKey(Vector3.One, (float)(4 << lod)); + lock (m_cachedMeshes) + { + m_cachedMeshes.TryGetValue(meshKey, out mesh); + } + } + + // Create mesh if no cached mesh + if (mesh == null) + { + // Make an OMV prim to be able to mesh part + Primitive omvPrim = part.Shape.ToOmvPrimitive(posPart, rotPart); + byte[] sculptAsset = null; + if (omvPrim.Sculpt != null) + sculptAsset = World.AssetService.GetData(omvPrim.Sculpt.SculptTexture.ToString()); + + // When part is mesh, get mesh + if (omvPrim.Sculpt != null && omvPrim.Sculpt.Type == SculptType.Mesh && sculptAsset != null) + { + AssetMesh meshAsset = new AssetMesh(omvPrim.Sculpt.SculptTexture, sculptAsset); + FacetedMesh.TryDecodeFromAsset(omvPrim, meshAsset, m_meshLodInCastRay, out mesh); + meshAsset = null; + } + + // When part is sculpt, create mesh + // Quirk: Generated sculpt mesh is about 2.8% smaller in X and Y than visual sculpt. + else if (omvPrim.Sculpt != null && omvPrim.Sculpt.Type != SculptType.Mesh && sculptAsset != null) + { + IJ2KDecoder imgDecoder = World.RequestModuleInterface(); + if (imgDecoder != null) + { + Image sculpt = imgDecoder.DecodeToImage(sculptAsset); + if (sculpt != null) + { + mesh = primMesher.GenerateFacetedSculptMesh(omvPrim, (Bitmap)sculpt, m_sculptLodInCastRay); + sculpt.Dispose(); + } + } + } + + // When part is shape, create mesh + else if (omvPrim.Sculpt == null) + { + if ( + omvPrim.PrimData.PathBegin == 0.0 && omvPrim.PrimData.PathEnd == 1.0 && + omvPrim.PrimData.PathTaperX == 0.0 && omvPrim.PrimData.PathTaperY == 0.0 && + omvPrim.PrimData.PathSkew == 0.0 && + omvPrim.PrimData.PathTwist - omvPrim.PrimData.PathTwistBegin == 0.0 + ) + rayTrans.ShapeNeedsEnds = false; + mesh = primMesher.GenerateFacetedMesh(omvPrim, m_primLodInCastRay); + } + + // Cache mesh if configured + if (m_useMeshCacheInCastRay && mesh != null) + { + lock(m_cachedMeshes) + { + if (!m_cachedMeshes.ContainsKey(meshKey)) + m_cachedMeshes.Add(meshKey, mesh); + } + } + } + // Check mesh for ray hits + AddRayInFacetedMesh(mesh, rayTrans, ref rayHits); + mesh = null; + } + } + } + } + ); + + // Check avatar filter + if (!rejectAgents) + { + // Iterate over all avatars in region + World.ForEachRootScenePresence( + delegate (ScenePresence sp) + { + // Get bounding box + Vector3 lower; + Vector3 upper; + BoundingBoxOfScenePresence(sp, out lower, out upper); + // Parse avatar + Vector3 scalePart = upper - lower; + Vector3 posPart = sp.AbsolutePosition; + Quaternion rotPart = sp.GetWorldRotation(); + Quaternion rotPartInv = Quaternion.Inverse(rotPart); + posPart = posPart + (lower + upper) * 0.5f * rotPart; + // Project ray + Vector3 pos1RayProj = ((pos1Ray - posPart) * rotPartInv) / scalePart; + Vector3 pos2RayProj = ((pos2Ray - posPart) * rotPartInv) / scalePart; + + // Filter avatars by shape bounding boxes + Vector3 shapeBoxMax = new Vector3(0.5f + tol, 0.5f + tol, 0.5f + tol); + if (RayIntersectsShapeBox(pos1RayProj, pos2RayProj, shapeBoxMax)) + { + // Prepare data needed to check for ray hits + RayTrans rayTrans = new RayTrans(); + rayTrans.PartId = sp.UUID; + rayTrans.GroupId = sp.ParentPart != null ? sp.ParentPart.ParentGroup.UUID : sp.UUID; + rayTrans.Link = sp.ParentPart != null ? UUID2LinkNumber(sp.ParentPart, sp.UUID) : 0; + rayTrans.ScalePart = scalePart; + rayTrans.PositionPart = posPart; + rayTrans.RotationPart = rotPart; + rayTrans.ShapeNeedsEnds = false; + rayTrans.Position1Ray = pos1Ray; + rayTrans.Position1RayProj = pos1RayProj; + rayTrans.VectorRayProj = pos2RayProj - pos1RayProj; + + // Try to get cached mesh if configured + PrimitiveBaseShape prim = PrimitiveBaseShape.CreateSphere(); + int lod = (int)m_avatarLodInCastRay; + ulong meshKey = prim.GetMeshKey(Vector3.One, (float)(4 << lod)); + FacetedMesh mesh = null; + if (m_useMeshCacheInCastRay) + { + lock (m_cachedMeshes) + { + m_cachedMeshes.TryGetValue(meshKey, out mesh); + } + } + + // Create mesh if no cached mesh + if (mesh == null) + { + // Make OMV prim and create mesh + prim.Scale = scalePart; + Primitive omvPrim = prim.ToOmvPrimitive(posPart, rotPart); + mesh = primMesher.GenerateFacetedMesh(omvPrim, m_avatarLodInCastRay); + + // Cache mesh if configured + if (m_useMeshCacheInCastRay && mesh != null) + { + lock(m_cachedMeshes) + { + if (!m_cachedMeshes.ContainsKey(meshKey)) + m_cachedMeshes.Add(meshKey, mesh); + } + } + } + + // Check mesh for ray hits + AddRayInFacetedMesh(mesh, rayTrans, ref rayHits); + mesh = null; + } + } + ); + } + + // Check terrain filter + if (!rejectLand) + { + // Parse terrain + + // Mesh terrain and check bounding box + Vector3 lower; + Vector3 upper; + List triangles = TrisFromHeightmapUnderRay(pos1Ray, pos2Ray, out lower, out upper); + lower.Z -= tol; + upper.Z += tol; + if ((pos1Ray.Z >= lower.Z || pos2Ray.Z >= lower.Z) && (pos1Ray.Z <= upper.Z || pos2Ray.Z <= upper.Z)) + { + // Prepare data needed to check for ray hits + RayTrans rayTrans = new RayTrans(); + rayTrans.PartId = UUID.Zero; + rayTrans.GroupId = UUID.Zero; + rayTrans.Link = 0; + rayTrans.ScalePart = new Vector3 (1.0f, 1.0f, 1.0f); + rayTrans.PositionPart = Vector3.Zero; + rayTrans.RotationPart = Quaternion.Identity; + rayTrans.ShapeNeedsEnds = true; + rayTrans.Position1Ray = pos1Ray; + rayTrans.Position1RayProj = pos1Ray; + rayTrans.VectorRayProj = vecRay; + + // Check mesh + AddRayInTris(triangles, rayTrans, ref rayHits); + triangles = null; + } + } + + // Sort hits by ascending distance + rayHits.Sort((s1, s2) => s1.Distance.CompareTo(s2.Distance)); - // Add contact point - ContactResult result = new ContactResult (); - result.ConsumerID = 0; - result.Depth = Vector3.Distance(rayStart, ip); - result.Normal = n; - result.Pos = ip; + // Check excess hits per part and group + for (int t = 0; t < 2; t++) + { + int maxHitsPerType = 0; + UUID id = UUID.Zero; + if (t == 0) + maxHitsPerType = m_maxHitsPerPrimInCastRay; + else + maxHitsPerType = m_maxHitsPerObjectInCastRay; - contacts.Add(result); + // Handle excess hits only when needed + if (maxHitsPerType < m_maxHitsInCastRay) + { + // Find excess hits + Hashtable hits = new Hashtable(); + for (int i = rayHits.Count - 1; i >= 0; i--) + { + if (t == 0) + id = rayHits[i].PartId; + else + id = rayHits[i].GroupId; + if (hits.ContainsKey(id)) + hits[id] = (int)hits[id] + 1; + else + hits[id] = 1; + } + + // Remove excess hits + for (int i = rayHits.Count - 1; i >= 0; i--) + { + if (t == 0) + id = rayHits[i].PartId; + else + id = rayHits[i].GroupId; + int hit = (int)hits[id]; + if (hit > m_maxHitsPerPrimInCastRay) + { + rayHits.RemoveAt(i); + hit--; + hits[id] = hit; + } + } + } } - if (contacts.Count == 0) - return null; + // Parse hits into result list according to data flags + int hitCount = rayHits.Count; + if (hitCount > maxHits) + hitCount = maxHits; + for (int i = 0; i < hitCount; i++) + { + RayHit rayHit = rayHits[i]; + if (getRootKey) + result.Add(new LSL_Key(rayHit.GroupId.ToString())); + else + result.Add(new LSL_Key(rayHit.PartId.ToString())); + result.Add(new LSL_Vector(rayHit.Position)); + if (getLinkNum) + result.Add(new LSL_Integer(rayHit.Link)); + if (getNormal) + result.Add(new LSL_Vector(rayHit.Normal)); + } + result.Add(new LSL_Integer(hitCount)); - contacts.Sort(delegate(ContactResult a, ContactResult b) + // Add to throttle data + stopWatch.Stop(); + CastRayCall castRayCall = new CastRayCall(); + castRayCall.RegionId = regionId; + castRayCall.UserId = userId; + castRayCall.CalledMs = calledMs; + castRayCall.UsedMs = (int)stopWatch.ElapsedMilliseconds; + lock (m_castRayCalls) { - return (int)(a.Depth - b.Depth); - }); + m_castRayCalls.Add(castRayCall); + } - return contacts[0]; + // Return hits + return result; } - public LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options) + /// + /// Struct for transmitting parameters required for finding llCastRay ray hits. + /// + public struct RayTrans { - LSL_List list = new LSL_List(); + public UUID PartId; + public UUID GroupId; + public int Link; + public Vector3 ScalePart; + public Vector3 PositionPart; + public Quaternion RotationPart; + public bool ShapeNeedsEnds; + public Vector3 Position1Ray; + public Vector3 Position1RayProj; + public Vector3 VectorRayProj; + } - m_host.AddScriptLPS(1); + /// + /// Struct for llCastRay ray hits. + /// + public struct RayHit + { + public UUID PartId; + public UUID GroupId; + public int Link; + public Vector3 Position; + public Vector3 Normal; + public float Distance; + } - Vector3 rayStart = start; - Vector3 rayEnd = end; - Vector3 dir = rayEnd - rayStart; + /// + /// Struct for llCastRay throttle data. + /// + public struct CastRayCall + { + public UUID RegionId; + public UUID UserId; + public int CalledMs; + public int UsedMs; + } - float dist = Vector3.Mag(dir); + /// + /// Helper to check if a ray intersects a shape bounding box. + /// + private bool RayIntersectsShapeBox(Vector3 pos1RayProj, Vector3 pos2RayProj, Vector3 shapeBoxMax) + { + // Skip if ray can't intersect bounding box; + Vector3 rayBoxProjMin = Vector3.Min(pos1RayProj, pos2RayProj); + Vector3 rayBoxProjMax = Vector3.Max(pos1RayProj, pos2RayProj); + if ( + rayBoxProjMin.X > shapeBoxMax.X || rayBoxProjMin.Y > shapeBoxMax.Y || rayBoxProjMin.Z > shapeBoxMax.Z || + rayBoxProjMax.X < -shapeBoxMax.X || rayBoxProjMax.Y < -shapeBoxMax.Y || rayBoxProjMax.Z < -shapeBoxMax.Z + ) + return false; - int count = 1; - bool detectPhantom = false; - int dataFlags = 0; - int rejectTypes = 0; + // Check if ray intersect any bounding box side + int sign = 0; + float dist = 0.0f; + Vector3 posProj = Vector3.Zero; + Vector3 vecRayProj = pos2RayProj - pos1RayProj; - for (int i = 0; i < options.Length; i += 2) + // Check both X sides unless ray is parallell to them + if (Math.Abs(vecRayProj.X) > m_floatToleranceInCastRay) { - if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_MAX_HITS) - count = options.GetLSLIntegerItem(i + 1); - else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DETECT_PHANTOM) - detectPhantom = (options.GetLSLIntegerItem(i + 1) > 0); - else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_DATA_FLAGS) - dataFlags = options.GetLSLIntegerItem(i + 1); - else if (options.GetLSLIntegerItem(i) == ScriptBaseClass.RC_REJECT_TYPES) - rejectTypes = options.GetLSLIntegerItem(i + 1); + for (sign = -1; sign <= 1; sign += 2) + { + dist = ((float)sign * shapeBoxMax.X - pos1RayProj.X) / vecRayProj.X; + posProj = pos1RayProj + vecRayProj * dist; + if (Math.Abs(posProj.Y) <= shapeBoxMax.Y && Math.Abs(posProj.Z) <= shapeBoxMax.Z) + return true; + } } - if (count > 16) - count = 16; - - List results = new List(); + // Check both Y sides unless ray is parallell to them + if (Math.Abs(vecRayProj.Y) > m_floatToleranceInCastRay) + { + for (sign = -1; sign <= 1; sign += 2) + { + dist = ((float)sign * shapeBoxMax.Y - pos1RayProj.Y) / vecRayProj.Y; + posProj = pos1RayProj + vecRayProj * dist; + if (Math.Abs(posProj.X) <= shapeBoxMax.X && Math.Abs(posProj.Z) <= shapeBoxMax.Z) + return true; + } + } - bool checkTerrain = !((rejectTypes & ScriptBaseClass.RC_REJECT_LAND) == ScriptBaseClass.RC_REJECT_LAND); - bool checkAgents = !((rejectTypes & ScriptBaseClass.RC_REJECT_AGENTS) == ScriptBaseClass.RC_REJECT_AGENTS); - bool checkNonPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_NONPHYSICAL) == ScriptBaseClass.RC_REJECT_NONPHYSICAL); - bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL); + // Check both Z sides unless ray is parallell to them + if (Math.Abs(vecRayProj.Z) > m_floatToleranceInCastRay) + { + for (sign = -1; sign <= 1; sign += 2) + { + dist = ((float)sign * shapeBoxMax.Z - pos1RayProj.Z) / vecRayProj.Z; + posProj = pos1RayProj + vecRayProj * dist; + if (Math.Abs(posProj.X) <= shapeBoxMax.X && Math.Abs(posProj.Y) <= shapeBoxMax.Y) + return true; + } + } + // No hits on bounding box so return false + return false; + } - if (checkTerrain) + /// + /// Helper to parse FacetedMesh for ray hits. + /// + private void AddRayInFacetedMesh(FacetedMesh mesh, RayTrans rayTrans, ref List rayHits) + { + if (mesh != null) { - ContactResult? groundContact = GroundIntersection(rayStart, rayEnd); - if (groundContact != null) - results.Add((ContactResult)groundContact); + foreach (Face face in mesh.Faces) + { + for (int i = 0; i < face.Indices.Count; i += 3) + { + Tri triangle = new Tri(); + triangle.p1 = face.Vertices[face.Indices[i]].Position; + triangle.p2 = face.Vertices[face.Indices[i + 1]].Position; + triangle.p3 = face.Vertices[face.Indices[i + 2]].Position; + AddRayInTri(triangle, rayTrans, ref rayHits); + } + } } + } - if (checkAgents) + /// + /// Helper to parse Tri (triangle) List for ray hits. + /// + private void AddRayInTris(List triangles, RayTrans rayTrans, ref List rayHits) + { + foreach (Tri triangle in triangles) { - ContactResult[] agentHits = AvatarIntersection(rayStart, rayEnd); - foreach (ContactResult r in agentHits) - results.Add(r); + AddRayInTri(triangle, rayTrans, ref rayHits); } + } - if (checkPhysical || checkNonPhysical || detectPhantom) + /// + /// Helper to add ray hit in a Tri (triangle). + /// + private void AddRayInTri(Tri triProj, RayTrans rayTrans, ref List rayHits) + { + // Check for hit in triangle + Vector3 posHitProj; + Vector3 normalProj; + if (HitRayInTri(triProj, rayTrans.Position1RayProj, rayTrans.VectorRayProj, out posHitProj, out normalProj)) { - ContactResult[] objectHits = ObjectIntersection(rayStart, rayEnd, checkPhysical, checkNonPhysical, detectPhantom); - foreach (ContactResult r in objectHits) - results.Add(r); + // Hack to circumvent ghost face bug in PrimMesher by removing hits in (ghost) face plane through shape center + if (Math.Abs(Vector3.Dot(posHitProj, normalProj)) < m_floatToleranceInCastRay && !rayTrans.ShapeNeedsEnds) + return; + + // Transform hit and normal to region coordinate system + Vector3 posHit = rayTrans.PositionPart + (posHitProj * rayTrans.ScalePart) * rayTrans.RotationPart; + Vector3 normal = Vector3.Normalize((normalProj * rayTrans.ScalePart) * rayTrans.RotationPart); + + // Remove duplicate hits at triangle intersections + float distance = Vector3.Distance(rayTrans.Position1Ray, posHit); + for (int i = rayHits.Count - 1; i >= 0; i--) + { + if (rayHits[i].PartId != rayTrans.PartId) + break; + if (Math.Abs(rayHits[i].Distance - distance) < m_floatTolerance2InCastRay) + return; + } + + // Build result data set + RayHit rayHit = new RayHit(); + rayHit.PartId = rayTrans.PartId; + rayHit.GroupId = rayTrans.GroupId; + rayHit.Link = rayTrans.Link; + rayHit.Position = posHit; + rayHit.Normal = normal; + rayHit.Distance = distance; + rayHits.Add(rayHit); } + } - results.Sort(delegate(ContactResult a, ContactResult b) - { - return a.Depth.CompareTo(b.Depth); - }); + /// + /// Helper to find ray hit in triangle + /// + bool HitRayInTri(Tri triProj, Vector3 pos1RayProj, Vector3 vecRayProj, out Vector3 posHitProj, out Vector3 normalProj) + { + float tol = m_floatToleranceInCastRay; + posHitProj = Vector3.Zero; - int values = 0; - SceneObjectGroup thisgrp = m_host.ParentGroup; + // Calculate triangle edge vectors + Vector3 vec1Proj = triProj.p2 - triProj.p1; + Vector3 vec2Proj = triProj.p3 - triProj.p2; + Vector3 vec3Proj = triProj.p1 - triProj.p3; - foreach (ContactResult result in results) - { - if (result.Depth > dist) - continue; + // Calculate triangle normal + normalProj = Vector3.Cross(vec1Proj, vec2Proj); - // physics ray can return colisions with host prim - if (m_host.LocalId == result.ConsumerID) - continue; + // Skip if degenerate triangle or ray parallell with triangle plane + float divisor = Vector3.Dot(vecRayProj, normalProj); + if (Math.Abs(divisor) < tol) + return false; - UUID itemID = UUID.Zero; - int linkNum = 0; + // Skip if exit and not configured to detect + if (divisor > tol && !m_detectExitsInCastRay) + return false; - SceneObjectPart part = World.GetSceneObjectPart(result.ConsumerID); - // It's a prim! - if (part != null) - { - // dont detect members of same object ??? - if (part.ParentGroup == thisgrp) - continue; + // Skip if outside ray ends + float distanceProj = Vector3.Dot(triProj.p1 - pos1RayProj, normalProj) / divisor; + if (distanceProj < -tol || distanceProj > 1 + tol) + return false; - if ((dataFlags & ScriptBaseClass.RC_GET_ROOT_KEY) == ScriptBaseClass.RC_GET_ROOT_KEY) - itemID = part.ParentGroup.UUID; - else - itemID = part.UUID; + // Calculate hit position in triangle + posHitProj = pos1RayProj + vecRayProj * distanceProj; - linkNum = part.LinkNum; + // Skip if outside triangle bounding box + Vector3 triProjMin = Vector3.Min(Vector3.Min(triProj.p1, triProj.p2), triProj.p3); + Vector3 triProjMax = Vector3.Max(Vector3.Max(triProj.p1, triProj.p2), triProj.p3); + if ( + posHitProj.X < triProjMin.X - tol || posHitProj.Y < triProjMin.Y - tol || posHitProj.Z < triProjMin.Z - tol || + posHitProj.X > triProjMax.X + tol || posHitProj.Y > triProjMax.Y + tol || posHitProj.Z > triProjMax.Z + tol + ) + return false; + + // Skip if outside triangle + if ( + Vector3.Dot(Vector3.Cross(vec1Proj, normalProj), posHitProj - triProj.p1) > tol || + Vector3.Dot(Vector3.Cross(vec2Proj, normalProj), posHitProj - triProj.p2) > tol || + Vector3.Dot(Vector3.Cross(vec3Proj, normalProj), posHitProj - triProj.p3) > tol + ) + return false; + + // Return hit + return true; + } + + /// + /// Helper to parse selected parts of HeightMap into a Tri (triangle) List and calculate bounding box. + /// + private List TrisFromHeightmapUnderRay(Vector3 posStart, Vector3 posEnd, out Vector3 lower, out Vector3 upper) + { + // Get bounding X-Y rectangle of terrain under ray + lower = Vector3.Min(posStart, posEnd); + upper = Vector3.Max(posStart, posEnd); + lower.X = (float)Math.Floor(lower.X); + lower.Y = (float)Math.Floor(lower.Y); + float zLower = float.MaxValue; + upper.X = (float)Math.Ceiling(upper.X); + upper.Y = (float)Math.Ceiling(upper.Y); + float zUpper = float.MinValue; + + // Initialize Tri (triangle) List + List triangles = new List(); + + // Set parsing lane direction to major ray X-Y axis + Vector3 vec = posEnd - posStart; + float xAbs = Math.Abs(vec.X); + float yAbs = Math.Abs(vec.Y); + bool bigX = true; + if (yAbs > xAbs) + { + bigX = false; + vec = vec / yAbs; + } + else if (xAbs > yAbs || xAbs > 0.0f) + vec = vec / xAbs; + else + vec = new Vector3(1.0f, 1.0f, 0.0f); + + // Simplify by start parsing in lower end of lane + if ((bigX && vec.X < 0.0f) || (!bigX && vec.Y < 0.0f)) + { + Vector3 posTemp = posStart; + posStart = posEnd; + posEnd = posTemp; + vec = vec * -1.0f; + } + + // First 1x1 rectangle under ray + float xFloorOld = 0.0f; + float yFloorOld = 0.0f; + Vector3 pos = posStart; + float xFloor = (float)Math.Floor(pos.X); + float yFloor = (float)Math.Floor(pos.Y); + AddTrisFromHeightmap(xFloor, yFloor, ref triangles, ref zLower, ref zUpper); + + // Parse every remaining 1x1 rectangle under ray + while (pos != posEnd) + { + // Next 1x1 rectangle under ray + xFloorOld = xFloor; + yFloorOld = yFloor; + pos = pos + vec; + + // Clip position to 1x1 rectangle border + xFloor = (float)Math.Floor(pos.X); + yFloor = (float)Math.Floor(pos.Y); + if (bigX && pos.X > xFloor) + { + pos.Y -= vec.Y * (pos.X - xFloor); + pos.X = xFloor; } - else + else if (!bigX && pos.Y > yFloor) { - ScenePresence sp = World.GetScenePresence(result.ConsumerID); - /// It it a boy? a girl? - if (sp != null) - itemID = sp.UUID; + pos.X -= vec.X * (pos.Y - yFloor); + pos.Y = yFloor; } - list.Add(new LSL_String(itemID.ToString())); - list.Add(new LSL_String(result.Pos.ToString())); + // Last 1x1 rectangle under ray + if ((bigX && pos.X >= posEnd.X) || (!bigX && pos.Y >= posEnd.Y)) + { + pos = posEnd; + xFloor = (float)Math.Floor(pos.X); + yFloor = (float)Math.Floor(pos.Y); + } - if ((dataFlags & ScriptBaseClass.RC_GET_LINK_NUM) == ScriptBaseClass.RC_GET_LINK_NUM) - list.Add(new LSL_Integer(linkNum)); + // Add new 1x1 rectangle in lane + if ((bigX && xFloor != xFloorOld) || (!bigX && yFloor != yFloorOld)) + AddTrisFromHeightmap(xFloor, yFloor, ref triangles, ref zLower, ref zUpper); + // Add last 1x1 rectangle in old lane at lane shift + if (bigX && yFloor != yFloorOld) + AddTrisFromHeightmap(xFloor, yFloorOld, ref triangles, ref zLower, ref zUpper); + if (!bigX && xFloor != xFloorOld) + AddTrisFromHeightmap(xFloorOld, yFloor, ref triangles, ref zLower, ref zUpper); + } - if ((dataFlags & ScriptBaseClass.RC_GET_NORMAL) == ScriptBaseClass.RC_GET_NORMAL) - list.Add(new LSL_Vector(result.Normal.X, result.Normal.Y, result.Normal.Z)); + // Finalize bounding box Z + lower.Z = zLower; + upper.Z = zUpper; - values++; - if (values >= count) - break; - } + // Done and returning Tri (triangle)List + return triangles; + } - list.Add(new LSL_Integer(values)); + /// + /// Helper to add HeightMap squares into Tri (triangle) List and adjust bounding box. + /// + private void AddTrisFromHeightmap(float xPos, float yPos, ref List triangles, ref float zLower, ref float zUpper) + { + int xInt = (int)xPos; + int yInt = (int)yPos; + + // Corner 1 of 1x1 rectangle + int x = Util.Clamp(xInt+1, 0, World.Heightmap.Width - 1); + int y = Util.Clamp(yInt+1, 0, World.Heightmap.Height - 1); + Vector3 pos1 = new Vector3(x, y, (float)World.Heightmap[x, y]); + // Adjust bounding box + zLower = Math.Min(zLower, pos1.Z); + zUpper = Math.Max(zUpper, pos1.Z); + + // Corner 2 of 1x1 rectangle + x = Util.Clamp(xInt, 0, World.Heightmap.Width - 1); + y = Util.Clamp(yInt+1, 0, World.Heightmap.Height - 1); + Vector3 pos2 = new Vector3(x, y, (float)World.Heightmap[x, y]); + // Adjust bounding box + zLower = Math.Min(zLower, pos2.Z); + zUpper = Math.Max(zUpper, pos2.Z); + + // Corner 3 of 1x1 rectangle + x = Util.Clamp(xInt, 0, World.Heightmap.Width - 1); + y = Util.Clamp(yInt, 0, World.Heightmap.Height - 1); + Vector3 pos3 = new Vector3(x, y, (float)World.Heightmap[x, y]); + // Adjust bounding box + zLower = Math.Min(zLower, pos3.Z); + zUpper = Math.Max(zUpper, pos3.Z); + + // Corner 4 of 1x1 rectangle + x = Util.Clamp(xInt+1, 0, World.Heightmap.Width - 1); + y = Util.Clamp(yInt, 0, World.Heightmap.Height - 1); + Vector3 pos4 = new Vector3(x, y, (float)World.Heightmap[x, y]); + // Adjust bounding box + zLower = Math.Min(zLower, pos4.Z); + zUpper = Math.Max(zUpper, pos4.Z); + + // Add triangle 1 + Tri triangle1 = new Tri(); + triangle1.p1 = pos1; + triangle1.p2 = pos2; + triangle1.p3 = pos3; + triangles.Add(triangle1); + + // Add triangle 2 + Tri triangle2 = new Tri(); + triangle2.p1 = pos3; + triangle2.p2 = pos4; + triangle2.p3 = pos1; + triangles.Add(triangle2); + } - return list; + /// + /// Helper to get link number for a UUID. + /// + private int UUID2LinkNumber(SceneObjectPart part, UUID id) + { + SceneObjectGroup group = part.ParentGroup; + if (group != null) + { + // Parse every link for UUID + int linkCount = group.PrimCount + group.GetSittingAvatarsCount(); + for (int link = linkCount; link > 0; link--) + { + ISceneEntity entity = GetLinkEntity(part, link); + // Return link number if UUID match + if (entity != null && entity.UUID == id) + return link; + } + } + // Return link number 0 if no links or UUID matches + return 0; } public LSL_Integer llManageEstateAccess(int action, string avatar) @@ -11477,8 +15001,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetMemoryLimit() { m_host.AddScriptLPS(1); - // The value returned for LSO scripts in SL - return 16384; + // The value returned for Mono scripts in SL + return 65536; } public LSL_Integer llSetMemoryLimit(LSL_Integer limit) @@ -11491,15 +15015,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetSPMaxMemory() { m_host.AddScriptLPS(1); - // The value returned for LSO scripts in SL - return 16384; + // The value returned for Mono scripts in SL + return 65536; } - public LSL_Integer llGetUsedMemory() + public virtual LSL_Integer llGetUsedMemory() { m_host.AddScriptLPS(1); - // The value returned for LSO scripts in SL - return 16384; + // The value returned for Mono scripts in SL + return 65536; } public void llScriptProfiler(LSL_Integer flags) @@ -11514,16 +15038,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // them from this region as they are completed // - public void llGetEnv(LSL_String name) - { - m_host.AddScriptLPS(1); - NotImplemented("llGetEnv"); - } - public void llSetSoundQueueing(int queue) { m_host.AddScriptLPS(1); - NotImplemented("llSetSoundQueueing"); + + if (m_SoundModule != null) + m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); } public void llCollisionSprite(string impact_sprite) @@ -11538,6 +15058,79 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api NotImplemented("llGodLikeRezObject"); } + public LSL_String llTransferLindenDollars(string destination, int amount) + { + UUID txn = UUID.Random(); + + Util.FireAndForget(delegate(object x) + { + int replycode = 0; + string replydata = destination + "," + amount.ToString(); + + try + { + TaskInventoryItem item = m_item; + if (item == null) + { + replydata = "SERVICE_ERROR"; + return; + } + + m_host.AddScriptLPS(1); + + if (item.PermsGranter == UUID.Zero) + { + replydata = "MISSING_PERMISSION_DEBIT"; + return; + } + + if ((item.PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) + { + replydata = "MISSING_PERMISSION_DEBIT"; + return; + } + + UUID toID = new UUID(); + + if (!UUID.TryParse(destination, out toID)) + { + replydata = "INVALID_AGENT"; + return; + } + + IMoneyModule money = World.RequestModuleInterface(); + + if (money == null) + { + replydata = "TRANSFERS_DISABLED"; + return; + } + + bool result = money.ObjectGiveMoney( + m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount); + + if (result) + { + replycode = 1; + return; + } + + replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS"; + } + finally + { + m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams( + "transaction_result", new Object[] { + new LSL_String(txn.ToString()), + new LSL_Integer(replycode), + new LSL_String(replydata) }, + new DetectParams[0])); + } + }, null, "LSL_Api.llTransferLindenDollars"); + + return txn.ToString(); + } + #endregion } @@ -11549,12 +15142,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public DateTime lastRef; } - protected static Dictionary m_Notecards = + private static Dictionary m_Notecards = new Dictionary(); - public static void Cache(UUID assetID, string text) + public static void Cache(UUID assetID, byte[] text) { - CacheCheck(); + CheckCache(); lock (m_Notecards) { @@ -11563,7 +15156,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Notecard nc = new Notecard(); nc.lastRef = DateTime.Now; - nc.text = SLUtil.ParseNotecardToList(text).ToArray(); + try + { + nc.text = SLUtil.ParseNotecardToArray(text); + } + catch(SLUtil.NotANotecardFormatException) + { + nc.text = new string[0]; + } m_Notecards[assetID] = nc; } } @@ -11639,13 +15239,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return line; } - public static void CacheCheck() + public static void CheckCache() { - foreach (UUID key in new List(m_Notecards.Keys)) + lock (m_Notecards) { - Notecard nc = m_Notecards[key]; - if (nc.lastRef.AddSeconds(30) < DateTime.Now) - m_Notecards.Remove(key); + foreach (UUID key in new List(m_Notecards.Keys)) + { + Notecard nc = m_Notecards[key]; + if (nc.lastRef.AddSeconds(30) < DateTime.Now) + m_Notecards.Remove(key); + } } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index ceb4660..e5e43f8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs @@ -30,6 +30,7 @@ using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; +using System.Threading; using OpenMetaverse; using Nini.Config; using OpenSim; @@ -61,9 +62,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal bool m_LSFunctionsEnabled = false; internal IScriptModuleComms m_comms = null; - public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) + public void Initialize( + IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) { - m_ScriptEngine = ScriptEngine; + m_ScriptEngine = scriptEngine; m_host = host; if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false)) @@ -92,10 +94,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api get { return m_ScriptEngine.World; } } - // - //Dumps an error message on the debug console. - // - + /// + /// Dumps an error message on the debug console. + /// internal void LSShoutError(string message) { if (message.Length > 1023) @@ -264,175 +265,445 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int idx = 0; while (idx < rules.Length) { - uint rule = (uint)rules.GetLSLIntegerItem(idx); + uint rule; + + try + { + rule = (uint)rules.GetLSLIntegerItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule type: arg #{0} - parameter type must be integer", idx)); + } + LSL_Types.Quaternion iQ; LSL_Types.Vector3 iV; switch (rule) { case (int)ScriptBaseClass.WL_SUN_MOON_POSITION: idx++; - wl.sunMoonPosition = (float)rules.GetLSLFloatItem(idx); + try + { + wl.sunMoonPosition = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_SUN_MOON_POSITION: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_AMBIENT: idx++; - iQ = rules.GetQuaternionItem(idx); + try + { + iQ = rules.GetQuaternionItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_AMBIENT: arg #{0} - parameter 1 must be rotation", idx)); + } wl.ambient = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); break; case (int)ScriptBaseClass.WL_BIG_WAVE_DIRECTION: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_BIG_WAVE_DIRECTION: arg #{0} - parameter 1 must be vector", idx)); + } wl.bigWaveDirection = new Vector2((float)iV.x, (float)iV.y); break; case (int)ScriptBaseClass.WL_BLUE_DENSITY: idx++; - iQ = rules.GetQuaternionItem(idx); + try + { + iQ = rules.GetQuaternionItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_BLUE_DENSITY: arg #{0} - parameter 1 must be rotation", idx)); + } wl.blueDensity = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); break; case (int)ScriptBaseClass.WL_BLUR_MULTIPLIER: idx++; - wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); + try + { + wl.blurMultiplier = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_BLUR_MULTIPLIER: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_COLOR: idx++; - iQ = rules.GetQuaternionItem(idx); + try + { + iQ = rules.GetQuaternionItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_COLOR: arg #{0} - parameter 1 must be rotation", idx)); + } wl.cloudColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); break; case (int)ScriptBaseClass.WL_CLOUD_COVERAGE: idx++; - wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); + try + { + wl.cloudCoverage = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_COVERAGE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_DETAIL_XY_DENSITY: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_DETAIL_XY_DENSITY: arg #{0} - parameter 1 must be vector", idx)); + } wl.cloudDetailXYDensity = iV; break; case (int)ScriptBaseClass.WL_CLOUD_SCALE: idx++; - wl.cloudScale = (float)rules.GetLSLFloatItem(idx); + try + { + wl.cloudScale = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_SCALE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X: idx++; - wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); + try + { + wl.cloudScrollX = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_SCROLL_X: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_SCROLL_X_LOCK: idx++; - wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + try + { + wl.cloudScrollXLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_SCROLL_Y_LOCK: arg #{0} - parameter 1 must be integer", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y: idx++; - wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); + try + { + wl.cloudScrollY = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_SCROLL_Y: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_SCROLL_Y_LOCK: idx++; - wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + try + { + wl.cloudScrollYLock = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_SCROLL_Y_LOCK: arg #{0} - parameter 1 must be integer", idx)); + } break; case (int)ScriptBaseClass.WL_CLOUD_XY_DENSITY: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_CLOUD_XY_DENSITY: arg #{0} - parameter 1 must be vector", idx)); + } wl.cloudXYDensity = iV; break; case (int)ScriptBaseClass.WL_DENSITY_MULTIPLIER: idx++; - wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); + try + { + wl.densityMultiplier = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_DENSITY_MULTIPLIER: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_DISTANCE_MULTIPLIER: idx++; - wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); + try + { + wl.distanceMultiplier = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_DISTANCE_MULTIPLIER: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_DRAW_CLASSIC_CLOUDS: idx++; - wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + try + { + wl.drawClassicClouds = rules.GetLSLIntegerItem(idx).value == 1 ? true : false; + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_DRAW_CLASSIC_CLOUDS: arg #{0} - parameter 1 must be integer", idx)); + } break; case (int)ScriptBaseClass.WL_EAST_ANGLE: idx++; - wl.eastAngle = (float)rules.GetLSLFloatItem(idx); + try + { + wl.eastAngle = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_EAST_ANGLE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_FRESNEL_OFFSET: idx++; - wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); + try + { + wl.fresnelOffset = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_FRESNEL_OFFSET: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_FRESNEL_SCALE: idx++; - wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); + try + { + wl.fresnelScale = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_FRESNEL_SCALE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_HAZE_DENSITY: idx++; - wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); + try + { + wl.hazeDensity = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_HAZE_DENSITY: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_HAZE_HORIZON: idx++; - wl.hazeHorizon = (float)rules.GetLSLFloatItem(idx); + try + { + wl.hazeHorizon = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_HAZE_HORIZON: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_HORIZON: idx++; - iQ = rules.GetQuaternionItem(idx); + try + { + iQ = rules.GetQuaternionItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_HORIZON: arg #{0} - parameter 1 must be rotation", idx)); + } wl.horizon = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); break; case (int)ScriptBaseClass.WL_LITTLE_WAVE_DIRECTION: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_LITTLE_WAVE_DIRECTION: arg #{0} - parameter 1 must be vector", idx)); + } wl.littleWaveDirection = new Vector2((float)iV.x, (float)iV.y); break; case (int)ScriptBaseClass.WL_MAX_ALTITUDE: idx++; - wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; + try + { + wl.maxAltitude = (ushort)rules.GetLSLIntegerItem(idx).value; + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_MAX_ALTITUDE: arg #{0} - parameter 1 must be integer", idx)); + } break; case (int)ScriptBaseClass.WL_NORMAL_MAP_TEXTURE: idx++; - wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); + try + { + wl.normalMapTexture = new UUID(rules.GetLSLStringItem(idx).m_string); + } + catch (ArgumentException) + { + throw new InvalidCastException(string.Format("Error running rule WL_NORMAL_MAP_TEXTURE: arg #{0} - parameter 1 must be key", idx)); + } break; case (int)ScriptBaseClass.WL_REFLECTION_WAVELET_SCALE: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_REFLECTION_WAVELET_SCALE: arg #{0} - parameter 1 must be vector", idx)); + } wl.reflectionWaveletScale = iV; break; case (int)ScriptBaseClass.WL_REFRACT_SCALE_ABOVE: idx++; - wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); + try + { + wl.refractScaleAbove = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_REFRACT_SCALE_ABOVE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_REFRACT_SCALE_BELOW: idx++; - wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); + try + { + wl.refractScaleBelow = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_REFRACT_SCALE_BELOW: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_SCENE_GAMMA: idx++; - wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); + try + { + wl.sceneGamma = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_SCENE_GAMMA: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_STAR_BRIGHTNESS: idx++; - wl.starBrightness = (float)rules.GetLSLFloatItem(idx); + try + { + wl.starBrightness = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_STAR_BRIGHTNESS: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_SUN_GLOW_FOCUS: idx++; - wl.sunGlowFocus = (float)rules.GetLSLFloatItem(idx); + try + { + wl.sunGlowFocus = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_SUN_GLOW_FOCUS: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_SUN_GLOW_SIZE: idx++; - wl.sunGlowSize = (float)rules.GetLSLFloatItem(idx); + try + { + wl.sunGlowSize = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_SUN_GLOW_SIZE: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_SUN_MOON_COLOR: idx++; iQ = rules.GetQuaternionItem(idx); - wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + try + { + wl.sunMoonColor = new Vector4((float)iQ.x, (float)iQ.y, (float)iQ.z, (float)iQ.s); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_SUN_MOON_COLOR: arg #{0} - parameter 1 must be rotation", idx)); + } break; case (int)ScriptBaseClass.WL_UNDERWATER_FOG_MODIFIER: idx++; - wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); + try + { + wl.underwaterFogModifier = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_UNDERWATER_FOG_MODIFIER: arg #{0} - parameter 1 must be float", idx)); + } break; case (int)ScriptBaseClass.WL_WATER_COLOR: idx++; - iV = rules.GetVector3Item(idx); + try + { + iV = rules.GetVector3Item(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_WATER_COLOR: arg #{0} - parameter 1 must be vector", idx)); + } wl.waterColor = iV; break; case (int)ScriptBaseClass.WL_WATER_FOG_DENSITY_EXPONENT: idx++; - wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); + try + { + wl.waterFogDensityExponent = (float)rules.GetLSLFloatItem(idx); + } + catch (InvalidCastException) + { + throw new InvalidCastException(string.Format("Error running rule WL_WATER_FOG_DENSITY_EXPONENT: arg #{0} - parameter 1 must be float", idx)); + } break; } idx++; } return wl; } + /// /// Set the current Windlight scene /// @@ -445,16 +716,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("LightShare functions are not enabled."); return 0; } - if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) + + if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) { - LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); - return 0; + ScenePresence sp = World.GetScenePresence(m_host.OwnerID); + + if (sp == null || sp.GodLevel < 200) + { + LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); + return 0; + } } + int success = 0; m_host.AddScriptLPS(1); + if (LightShareModule.EnableWindlight) { - RegionLightShareData wl = getWindlightProfileFromRules(rules); + RegionLightShareData wl; + try + { + wl = getWindlightProfileFromRules(rules); + } + catch(InvalidCastException e) + { + LSShoutError(e.Message); + return 0; + } wl.valid = true; m_host.ParentGroup.Scene.StoreWindlightProfile(wl); success = 1; @@ -464,8 +752,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("Windlight module is disabled"); return 0; } + return success; } + public void lsClearWindlightScene() { if (!m_LSFunctionsEnabled) @@ -473,17 +763,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("LightShare functions are not enabled."); return; } - if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) + + if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) { - LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); - return; + ScenePresence sp = World.GetScenePresence(m_host.OwnerID); + + if (sp == null || sp.GodLevel < 200) + { + LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); + return; + } } m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false; if (m_host.ParentGroup.Scene.SimulationDataService != null) m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID); + m_host.ParentGroup.Scene.EventManager.TriggerOnSaveNewWindlightProfile(); } + /// /// Set the current Windlight scene to a target avatar /// @@ -496,16 +794,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("LightShare functions are not enabled."); return 0; } - if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200) + + if (!World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_host.OwnerID)) { - LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); - return 0; + ScenePresence sp = World.GetScenePresence(m_host.OwnerID); + + if (sp == null || sp.GodLevel < 200) + { + LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); + return 0; + } } + int success = 0; m_host.AddScriptLPS(1); + if (LightShareModule.EnableWindlight) - { - RegionLightShareData wl = getWindlightProfileFromRules(rules); + { + RegionLightShareData wl; + try + { + wl = getWindlightProfileFromRules(rules); + } + catch(InvalidCastException e) + { + LSShoutError(e.Message); + return 0; + } World.EventManager.TriggerOnSendNewWindlightProfileTargeted(wl, new UUID(target.m_string)); success = 1; } @@ -514,8 +829,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("Windlight module is disabled"); return 0; } + return success; - } - + } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index 8f34833..1458c95 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs @@ -30,6 +30,8 @@ using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Runtime.Remoting.Lifetime; +using System.Threading; +using log4net; using OpenMetaverse; using Nini.Config; using OpenSim; @@ -55,15 +57,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [Serializable] public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi { +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + internal IScriptEngine m_ScriptEngine; internal SceneObjectPart m_host; internal TaskInventoryItem m_item; internal bool m_MODFunctionsEnabled = false; internal IScriptModuleComms m_comms = null; - public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) + public void Initialize( + IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) { - m_ScriptEngine = ScriptEngine; + m_ScriptEngine = scriptEngine; m_host = host; m_item = item; @@ -107,8 +112,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (message.Length > 1023) message = message.Substring(0, 1023); - World.SimChat(Utils.StringToBytes(message), - ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true); + World.SimChat( + Utils.StringToBytes(message), + ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, + m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); @@ -122,6 +129,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// string result of the invocation public void modInvokeN(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(string)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -131,6 +144,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String modInvokeS(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(string)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -141,6 +160,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer modInvokeI(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(int)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -151,6 +176,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float modInvokeF(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(float)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -161,6 +192,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key modInvokeK(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(UUID)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -171,6 +208,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector modInvokeV(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(OpenMetaverse.Vector3)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -181,6 +224,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation modInvokeR(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(OpenMetaverse.Quaternion)) MODError(String.Format("return type mismatch for {0}",fname)); @@ -191,6 +240,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List modInvokeL(string fname, params object[] parms) { +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type returntype = m_comms.LookupReturnType(fname); if (returntype != typeof(object[])) MODError(String.Format("return type mismatch for {0}",fname)); @@ -211,6 +266,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { llist[i] = new LSL_Float((float)result[i]); } + else if (result[i] is double) + { + llist[i] = new LSL_Float((double)result[i]); + } else if (result[i] is UUID) { llist[i] = new LSL_Key(result[i].ToString()); @@ -248,13 +307,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ""; } +// m_log.DebugFormat( +// "[MOD API]: Invoking dynamic function {0}, args '{1}' with {2} return type", +// fname, +// string.Join(",", Array.ConvertAll(parms, o => o.ToString())), +// ((MethodInfo)MethodBase.GetCurrentMethod()).ReturnType); + Type[] signature = m_comms.LookupTypeSignature(fname); if (signature.Length != parms.Length) MODError(String.Format("wrong number of parameters to function {0}",fname)); object[] convertedParms = new object[parms.Length]; for (int i = 0; i < parms.Length; i++) - convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname); + convertedParms[i] = ConvertFromLSL(parms[i], signature[i], fname); // now call the function, the contract with the function is that it will always return // non-null but don't trust it completely @@ -351,7 +416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (type == typeof(object[])) { - object[] plist = (lslparm as LSL_List).Data; + object[] plist = ((LSL_List)lslparm).Data; object[] result = new object[plist.Length]; for (int i = 0; i < plist.Length; i++) { @@ -379,7 +444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname)); + MODError(String.Format("{0}: parameter type mismatch; expecting {1}, type(parm)={2}", fname, type.Name, lslparm.GetType())); return null; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index dcc85c4..e799714 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -62,6 +62,8 @@ using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; +using PermissionMask = OpenSim.Framework.PermissionMask; +using OpenSim.Services.Connectors.Hypergrid; namespace OpenSim.Region.ScriptEngine.Shared.Api { @@ -142,16 +144,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected IUrlModule m_UrlModule = null; - public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) + public void Initialize( + IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item) { - m_ScriptEngine = ScriptEngine; + m_ScriptEngine = scriptEngine; m_host = host; m_item = item; m_UrlModule = m_ScriptEngine.World.RequestModuleInterface(); if (m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) + { m_OSFunctionsEnabled = true; + // m_log.Warn("[OSSL] OSSL FUNCTIONS ENABLED"); + } m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); @@ -245,11 +251,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api wComm.DeliverMessage(ChatTypeEnum.Shout, ScriptBaseClass.DEBUG_CHANNEL, m_host.Name, m_host.UUID, message); } + // Returns of the function is allowed. Throws a script exception if not allowed. public void CheckThreatLevel(ThreatLevel level, string function) { if (!m_OSFunctionsEnabled) OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws + string reasonWhyNot = CheckThreatLevelTest(level, function); + if (!String.IsNullOrEmpty(reasonWhyNot)) + { + OSSLError(reasonWhyNot); + } + } + + // Check to see if function is allowed. Returns an empty string if function permitted + // or a string explaining why this function can't be used. + private string CheckThreatLevelTest(ThreatLevel level, string function) + { if (!m_FunctionPerms.ContainsKey(function)) { FunctionPerms perms = new FunctionPerms(); @@ -329,10 +347,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // Allow / disallow by threat level if (level > m_MaxThreatLevel) - OSSLError( + return String.Format( "{0} permission denied. Allowed threat level is {1} but function threat level is {2}.", - function, m_MaxThreatLevel, level)); + function, m_MaxThreatLevel, level); } else { @@ -342,7 +360,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_FunctionPerms[function].AllowedOwners.Contains(m_host.OwnerID)) { // prim owner is in the list of allowed owners - return; + return String.Empty; } UUID ownerID = m_item.OwnerID; @@ -350,22 +368,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //OSSL only may be used if object is in the same group as the parcel if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_GROUP_MEMBER")) { - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.GroupID == m_item.GroupID && land.LandData.GroupID != UUID.Zero) { - return; + return String.Empty; } } //Only Parcelowners may use the function if (m_FunctionPerms[function].AllowedOwnerClasses.Contains("PARCEL_OWNER")) { - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID == ownerID) { - return; + return String.Empty; } } @@ -375,7 +393,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //Only Estate Managers may use the function if (World.RegionInfo.EstateSettings.IsEstateManagerOrOwner(ownerID) && World.RegionInfo.EstateSettings.EstateOwner != ownerID) { - return; + return String.Empty; } } @@ -384,25 +402,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (World.RegionInfo.EstateSettings.EstateOwner == ownerID) { - return; + return String.Empty; } } if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) - OSSLError( + return( String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", function)); if (m_item.CreatorID != ownerID) { if ((m_item.CurrentPermissions & (uint)PermissionMask.Modify) != 0) - OSSLError( - String.Format("{0} permission denied. Script permissions error.", - function)); + return String.Format("{0} permission denied. Script permissions error.", function); } } } + return String.Empty; } internal void OSSLDeprecated(string function, string replacement) @@ -437,7 +454,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) + if (x > (World.RegionInfo.RegionSizeX - 1) || x < 0 || y > (World.RegionInfo.RegionSizeY - 1) || y < 0) OSSLError("osSetTerrainHeight: Coordinate out of bounds"); if (World.Permissions.CanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0))) @@ -467,7 +484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Float GetTerrainHeight(int x, int y) { m_host.AddScriptLPS(1); - if (x > ((int)Constants.RegionSize - 1) || x < 0 || y > ((int)Constants.RegionSize - 1) || y < 0) + if (x > (World.RegionInfo.RegionSizeX - 1) || x < 0 || y > (World.RegionInfo.RegionSizeY - 1) || y < 0) OSSLError("osGetTerrainHeight: Coordinate out of bounds"); return World.Heightmap[x, y]; @@ -777,9 +794,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // We will launch the teleport on a new thread so that when the script threads are terminated // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. - Util.FireAndForget(o => World.RequestTeleportLocation( - presence.ControllingClient, regionName, position, - lookat, (uint)TPFlags.ViaLocation)); + Util.FireAndForget( + o => World.RequestTeleportLocation( + presence.ControllingClient, regionName, position, + lookat, (uint)TPFlags.ViaLocation), + null, "OSSL_Api.TeleportAgentByRegionCoords"); ScriptSleep(5000); @@ -801,7 +820,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private void TeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat, bool relaxRestrictions) { - ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); + // ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); + ulong regionHandle = Util.RegionLocToHandle((uint)regionX, (uint)regionY); m_host.AddScriptLPS(1); UUID agentId = new UUID(); @@ -822,9 +842,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // We will launch the teleport on a new thread so that when the script threads are terminated // before teleport in ScriptInstance.GetXMLState(), we don't end up aborting the one doing the teleporting. - Util.FireAndForget(o => World.RequestTeleportLocation( - presence.ControllingClient, regionHandle, - position, lookat, (uint)TPFlags.ViaLocation)); + Util.FireAndForget( + o => World.RequestTeleportLocation( + presence.ControllingClient, regionHandle, + position, lookat, (uint)TPFlags.ViaLocation), + null, "OSSL_Api.TeleportAgentByRegionName"); ScriptSleep(5000); @@ -859,6 +881,59 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api TeleportAgent(m_host.OwnerID.ToString(), regionX, regionY, position, lookat, true); } + /// + /// Allows a script IN the target prim to force an avatar to sit on it using normal methods + /// as if called by the client. + /// Silent fail if agent (or target if overloaded) not found. + /// Does work if passed key (or keys if overloaded). + /// + /// + public void osForceOtherSit(string avatar) + { + CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); + + m_host.AddScriptLPS(1); + + ForceSit(avatar, m_host.UUID); + } + + /// + /// Overload method of osForceOtherSit(string avatar) to allow a script NOT in the target prim to force + /// an avatar to sit on the target prim using normal methods as if called by the client. + /// + /// + /// + public void osForceOtherSit(string avatar, string target) + { + CheckThreatLevel(ThreatLevel.VeryHigh, "osForceOtherSit"); + + m_host.AddScriptLPS(1); + + UUID targetID = new UUID(target); + + ForceSit(avatar, targetID); + } + + public void ForceSit(string avatar, UUID targetID) + { + UUID agentID; + + if (!UUID.TryParse(avatar, out agentID)) + return; + + ScenePresence presence = World.GetScenePresence(agentID); + + SceneObjectPart part = World.GetSceneObjectPart(targetID); + + if (presence != null && + part != null && + part.SitTargetAvatar == UUID.Zero) + presence.HandleAgentRequestSit(presence.ControllingClient, + agentID, + targetID, + part.SitTargetPosition); + } + // Functions that get information from the agent itself. // // osGetAgentIP - this is used to determine the IP address of @@ -1205,12 +1280,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api sunHour += 24.0; World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun; - World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30 - World.RegionInfo.RegionSettings.FixedSun = sunFixed; + World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30 + World.RegionInfo.RegionSettings.FixedSun = sunFixed; World.RegionInfo.RegionSettings.Save(); - World.EventManager.TriggerEstateToolsSunUpdate( - World.RegionInfo.RegionHandle, sunFixed, useEstateSun, (float)sunHour); + World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle); } /// @@ -1233,10 +1307,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.RegionInfo.EstateSettings.UseGlobalTime = !sunFixed; World.RegionInfo.EstateSettings.SunPosition = sunHour; World.RegionInfo.EstateSettings.FixedSun = sunFixed; - World.RegionInfo.EstateSettings.Save(); + World.EstateDataService.StoreEstateSettings(World.RegionInfo.EstateSettings); - World.EventManager.TriggerEstateToolsSunUpdate( - World.RegionInfo.RegionHandle, sunFixed, World.RegionInfo.RegionSettings.UseEstateSun, (float)sunHour); + World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle); } /// @@ -1492,8 +1565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); - ILandObject land - = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) return; @@ -1509,8 +1581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); - ILandObject land - = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); + ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) { @@ -1560,6 +1631,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + public LSL_Integer osCheckODE() + { + m_host.AddScriptLPS(1); + LSL_Integer ret = 0; // false + if (m_ScriptEngine.World.PhysicsScene != null) + { + string physEngine = m_ScriptEngine.World.PhysicsScene.EngineType; + if (physEngine == "OpenDynamicsEngine") + { + ret = 1; // true + } + } + return ret; + } + + public string osGetPhysicsEngineType() + { + // High because it can be used to target attacks to known weaknesses + // This would allow a new class of griefer scripts that don't even + // require their user to know what they are doing (see script + // kiddie) + // Because it would be nice if scripts didn't blow up if the information + // about the physics engine, this function returns an empty string if + // the user does not have permission to see it. This as opposed to + // throwing an exception. + m_host.AddScriptLPS(1); + string ret = String.Empty; + if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) + { + if (m_ScriptEngine.World.PhysicsScene != null) + { + ret = m_ScriptEngine.World.PhysicsScene.EngineType; + // An old physics engine might have an uninitialized engine type + if (ret == null) + ret = "unknown"; + } + } + + return ret; + } + public string osGetSimulatorVersion() { // High because it can be used to target attacks to known weaknesses @@ -1732,13 +1844,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Create new asset AssetBase asset = new AssetBase(UUID.Random(), name, (sbyte)AssetType.Notecard, m_host.OwnerID.ToString()); asset.Description = description; + byte[] a; + byte[] b; + byte[] c; + + b = Util.UTF8.GetBytes(data); - int textLength = data.Length; - data - = "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length " - + textLength.ToString() + "\n" + data + "}\n"; + a = Util.UTF8.GetBytes( + "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length " + b.Length.ToString() + "\n"); - asset.Data = Util.UTF8.GetBytes(data); + c = Util.UTF8.GetBytes("}"); + + byte[] d = new byte[a.Length + b.Length + c.Length]; + Buffer.BlockCopy(a, 0, d, 0, a.Length); + Buffer.BlockCopy(b, 0, d, a.Length, b.Length); + Buffer.BlockCopy(c, 0, d, a.Length + b.Length, c.Length); + + asset.Data = d; World.AssetService.Store(asset); // Create Task Entry @@ -1753,8 +1875,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api taskItem.InvType = (int)InventoryType.Notecard; taskItem.OwnerID = m_host.OwnerID; taskItem.CreatorID = m_host.OwnerID; - taskItem.BasePermissions = (uint)PermissionMask.All; - taskItem.CurrentPermissions = (uint)PermissionMask.All; + taskItem.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; + taskItem.CurrentPermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; taskItem.EveryonePermissions = 0; taskItem.NextPermissions = (uint)PermissionMask.All; taskItem.GroupID = m_host.GroupID; @@ -1833,8 +1955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (a == null) return UUID.Zero; - string data = Encoding.UTF8.GetString(a.Data); - NotecardCache.Cache(assetID, data); + NotecardCache.Cache(assetID, a.Data); }; return assetID; @@ -1932,15 +2053,51 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); m_host.AddScriptLPS(1); - UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname); - if (null == account) + IUserManagement userManager = World.RequestModuleInterface(); + if (userManager == null) { - return UUID.Zero.ToString(); + OSSLShoutError("osAvatarName2Key: UserManagement module not available"); + return string.Empty; + } + + // Check if the user is already cached + + UUID userID = userManager.GetUserIdByName(firstname, lastname); + if (userID != UUID.Zero) + return userID.ToString(); + + // Query for the user + + String realFirstName; String realLastName; String serverURI; + if (Util.ParseForeignAvatarName(firstname, lastname, out realFirstName, out realLastName, out serverURI)) + { + try + { + UserAgentServiceConnector userConnection = new UserAgentServiceConnector(serverURI, true); + + if (userConnection != null) + { + userID = userConnection.GetUUID(realFirstName, realLastName); + if (userID != UUID.Zero) + { + userManager.AddUser(userID, realFirstName, realLastName, serverURI); + return userID.ToString(); + } + } + } + catch (Exception /*e*/) + { + // m_log.Warn("[osAvatarName2Key] UserAgentServiceConnector - Unable to connect to destination grid ", e); + } } else { - return account.PrincipalID.ToString(); + UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname); + if (account != null) + return account.PrincipalID.ToString(); } + + return UUID.Zero.ToString(); } public string osKey2Name(string id) @@ -1953,19 +2110,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (UUID.TryParse(id, out key)) { UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key); - if (null == account) - { - return ""; - } - else - { + if (account != null) return account.Name; + + if (m_ScriptEngine.World.GridUserService != null) + { + GridUserInfo uInfo = m_ScriptEngine.World.GridUserService.GetGridUserInfo(key.ToString()); + + if (uInfo != null) + { + UUID userUUID; String gridURL; String firstName; String lastName; String tmp; + + if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out userUUID, out gridURL, out firstName, out lastName, out tmp)) + { + string grid = new Uri(gridURL).Authority; + return firstName + "." + lastName + " @" + grid; + } + } } } - else - { - return ""; - } + + return ""; } private enum InfoType @@ -2101,9 +2266,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); m_host.AddScriptLPS(1); - string HomeURI = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; + string HomeURI = Util.GetConfigVarFromSections(config, "HomeURI", + new string[] { "Startup", "Hypergrid" }, String.Empty); + if (!string.IsNullOrEmpty(HomeURI)) + return HomeURI; + + // Legacy. Remove soon! if (config.Configs["LoginService"] != null) HomeURI = config.Configs["LoginService"].GetString("SRV_HomeURI", HomeURI); @@ -2118,9 +2288,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.Moderate, "osGetGridGatekeeperURI"); m_host.AddScriptLPS(1); - string gatekeeperURI = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; + string gatekeeperURI = Util.GetConfigVarFromSections(config, "GatekeeperURI", + new string[] { "Startup", "Hypergrid" }, String.Empty); + + if (!string.IsNullOrEmpty(gatekeeperURI)) + return gatekeeperURI; + // Legacy. Remove soon! if (config.Configs["GridService"] != null) gatekeeperURI = config.Configs["GridService"].GetString("Gatekeeper", gatekeeperURI); @@ -2144,6 +2319,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return retval; } + public string osGetAvatarHomeURI(string uuid) + { + CheckThreatLevel(ThreatLevel.Low, "osGetAvatarHomeURI"); + m_host.AddScriptLPS(1); + + IUserManagement userManager = m_ScriptEngine.World.RequestModuleInterface(); + string returnValue = ""; + + if (userManager != null) + { + returnValue = userManager.GetUserServerURL(new UUID(uuid), "HomeURI"); + } + + if (returnValue == "") + { + IConfigSource config = m_ScriptEngine.ConfigSource; + returnValue = Util.GetConfigVarFromSections(config, "HomeURI", + new string[] { "Startup", "Hypergrid" }, String.Empty); + + if (!string.IsNullOrEmpty(returnValue)) + return returnValue; + + // Legacy. Remove soon! + if (config.Configs["LoginService"] != null) + returnValue = config.Configs["LoginService"].GetString("SRV_HomeURI", returnValue); + + if (String.IsNullOrEmpty(returnValue)) + returnValue = GridUserInfo(InfoType.Home); + } + + return returnValue; + } + public LSL_String osFormatString(string str, LSL_List strings) { CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); @@ -2265,14 +2473,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // on the ILSL_Api interface. LSL_Api LSL_Api = (LSL_Api)m_LSL_Api; LSL_List retVal = new LSL_List(); - LSL_List remaining = null; + LSL_List remaining = new LSL_List(); List parts = LSL_Api.GetLinkParts(linknumber); foreach (SceneObjectPart part in parts) { remaining = LSL_Api.GetPrimParams(part, rules, ref retVal); } - while (remaining != null && remaining.Length > 2) + while (remaining.Length > 2) { linknumber = remaining.GetLSLIntegerItem(0); rules = remaining.GetSublist(1, -1); @@ -2284,6 +2492,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return retVal; } + public void osForceCreateLink(string target, int parent) + { + CheckThreatLevel(ThreatLevel.VeryLow, "osForceCreateLink"); + + m_host.AddScriptLPS(1); + + InitLSL(); + ((LSL_Api)m_LSL_Api).CreateLink(target, parent); + } + + public void osForceBreakLink(int linknum) + { + CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakLink"); + + m_host.AddScriptLPS(1); + + InitLSL(); + ((LSL_Api)m_LSL_Api).BreakLink(linknum); + } + + public void osForceBreakAllLinks() + { + CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakAllLinks"); + + m_host.AddScriptLPS(1); + + InitLSL(); + ((LSL_Api)m_LSL_Api).BreakAllLinks(); + } + public LSL_Integer osIsNpc(LSL_Key npc) { CheckThreatLevel(ThreatLevel.None, "osIsNpc"); @@ -2469,13 +2707,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ScenePresence sp = World.GetScenePresence(npcId); if (sp != null) - { - Vector3 pos = sp.AbsolutePosition; - return new LSL_Vector(pos.X, pos.Y, pos.Z); - } + return new LSL_Vector(sp.AbsolutePosition); } - return new LSL_Vector(0, 0, 0); + return Vector3.Zero; } public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) @@ -2532,21 +2767,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID npcId; if (!UUID.TryParse(npc.m_string, out npcId)) - return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W); + return new LSL_Rotation(Quaternion.Identity); if (!npcModule.CheckPermissions(npcId, m_host.OwnerID)) - return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W); + return new LSL_Rotation(Quaternion.Identity); ScenePresence sp = World.GetScenePresence(npcId); if (sp != null) - { - Quaternion rot = sp.Rotation; - return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); - } + return new LSL_Rotation(sp.GetWorldRotation()); } - return new LSL_Rotation(Quaternion.Identity.X, Quaternion.Identity.Y, Quaternion.Identity.Z, Quaternion.Identity.W); + return Quaternion.Identity; } public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) @@ -2824,6 +3056,51 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return SaveAppearanceToNotecard(avatarId, notecard); } + + /// + /// Get the gender as specified in avatar appearance for a given avatar key + /// + /// + /// "male" or "female" or "unknown" + public LSL_String osGetGender(LSL_Key rawAvatarId) + { + CheckThreatLevel(ThreatLevel.None, "osGetGender"); + m_host.AddScriptLPS(1); + + UUID avatarId; + if (!UUID.TryParse(rawAvatarId, out avatarId)) + return new LSL_String("unknown"); + + ScenePresence sp = World.GetScenePresence(avatarId); + + if (sp == null || sp.IsChildAgent || sp.Appearance == null || sp.Appearance.VisualParams == null) + return new LSL_String("unknown"); + + // find the index of "shape" parameter "male" + int vpShapeMaleIndex = 0; + bool indexFound = false; + VisualParam param = new VisualParam(); + foreach(var vpEntry in VisualParams.Params) + { + param = vpEntry.Value; + if (param.Name == "male" && param.Wearable == "shape") + { + indexFound = true; + break; + } + + if (param.Group == 0) + vpShapeMaleIndex++; + } + + if (!indexFound) + return new LSL_String("unknown"); + + float vpShapeMale = Utils.ByteToFloat(sp.Appearance.VisualParams[vpShapeMaleIndex], param.MinValue, param.MaxValue); + + bool isMale = vpShapeMale > 0.5f; + return new LSL_String(isMale ? "male" : "female"); + } /// /// Get current region's map texture UUID @@ -2887,6 +3164,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ret; } + public LSL_Vector osGetRegionSize() + { + CheckThreatLevel(ThreatLevel.None, "osGetRegionSize"); + m_host.AddScriptLPS(1); + + bool isMegaregion; + IRegionCombinerModule rcMod = World.RequestModuleInterface(); + if (rcMod != null) + isMegaregion = rcMod.IsRootForMegaregion(World.RegionInfo.RegionID); + else + isMegaregion = false; + + if (isMegaregion) + { + Vector2 size = rcMod.GetSizeOfMegaregion(World.RegionInfo.RegionID); + return new LSL_Vector(size.X, size.Y, Constants.RegionHeight); + } + else + { + Scene scene = m_ScriptEngine.World; + GridRegion region = scene.GridService.GetRegionByUUID(UUID.Zero, World.RegionInfo.RegionID); + return new LSL_Vector((float)region.RegionSizeX, (float)region.RegionSizeX, Constants.RegionHeight); + } + } + public int osGetSimulatorMemory() { CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); @@ -2925,7 +3227,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api sp.ControllingClient.Kick(alert); // ...and close on our side - sp.Scene.IncomingCloseAgent(sp.UUID, false); + sp.Scene.CloseAgent(sp.UUID, false); } }); } @@ -2976,20 +3278,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api UUID avatarId = new UUID(avatar); ScenePresence presence = World.GetScenePresence(avatarId); - Vector3 pos = m_host.GetWorldPosition(); - bool result = World.ScriptDanger(m_host.LocalId, new Vector3((float)pos.X, (float)pos.Y, (float)pos.Z)); - if (result) + + if (presence != null && World.ScriptDanger(m_host.LocalId, m_host.GetWorldPosition())) { - if (presence != null) - { - float health = presence.Health; - health += (float)healing; - if (health >= 100) - { - health = 100; - } - presence.setHealthWithUpdate(health); - } + float health = presence.Health; + health += (float)healing; + + if (health >= 100) + health = 100; + + presence.setHealthWithUpdate(health); } } @@ -3066,8 +3364,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (avatar != null && avatar.UUID != m_host.OwnerID) { result.Add(new LSL_String(avatar.UUID.ToString())); - OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; - result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z)); + result.Add(new LSL_Vector(avatar.AbsolutePosition)); result.Add(new LSL_String(avatar.Name)); } }); @@ -3263,7 +3560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint) { - CheckThreatLevel(ThreatLevel.Severe, "osForceAttachToOtherAvatarFromInventory"); + CheckThreatLevel(ThreatLevel.VeryHigh, "osForceAttachToOtherAvatarFromInventory"); m_host.AddScriptLPS(1); @@ -3307,14 +3604,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (sp == null) return; - InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID); + string message; + InventoryItemBase newItem = World.MoveTaskInventoryItem(sp.UUID, UUID.Zero, m_host, item.ItemID, out message); if (newItem == null) { m_log.ErrorFormat( - "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}", - itemName, m_host.Name, attachmentPoint, World.Name); - + "[OSSL API]: Could not create user inventory item {0} for {1}, attach point {2} in {3}: {4}", + itemName, m_host.Name, attachmentPoint, World.Name, message); + ((LSL_Api)m_LSL_Api).llSay(0, message); return; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index dd45406..64dc2e2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -353,7 +353,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins // Position of a sensor in a child prim attached to an avatar // will be still wrong. ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); - q = avatar.Rotation * q; + + // Don't proceed if the avatar for this attachment has since been removed from the scene. + if (avatar == null) + return sensedEntities; + + q = avatar.GetWorldRotation() * q; } LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); @@ -362,7 +367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins Vector3 ZeroVector = new Vector3(0, 0, 0); - bool nameSearch = (ts.name != null && ts.name != ""); + bool nameSearch = !string.IsNullOrEmpty(ts.name); foreach (EntityBase ent in Entities) { @@ -480,7 +485,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins // Position of a sensor in a child prim attached to an avatar // will be still wrong. ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); - q = avatar.Rotation * q; + + // Don't proceed if the avatar for this attachment has since been removed from the scene. + if (avatar == null) + return sensedEntities; + + q = avatar.GetWorldRotation() * q; } LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); @@ -595,7 +605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins return sensedEntities; senseEntity(sp); } - else if (ts.name != null && ts.name != "") + else if (!string.IsNullOrEmpty(ts.name)) { ScenePresence sp; // Try lookup by name will return if/when found diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs index d173db0..215c087 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.8.3.*")] + diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 98f8be7..3d58573 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -124,6 +124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_String llGetCreator(); LSL_String llGetDate(); LSL_Float llGetEnergy(); + LSL_String llGetEnv(LSL_String name); LSL_Vector llGetForce(); LSL_Integer llGetFreeMemory(); LSL_Integer llGetFreeURLs(); @@ -149,6 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Vector llGetLocalPos(); LSL_Rotation llGetLocalRot(); LSL_Float llGetMass(); + LSL_Float llGetMassMKS(); LSL_Integer llGetMemoryLimit(); void llGetNextEmail(string address, string subject); LSL_String llGetNotecardLine(string name, int line); @@ -207,7 +209,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float llGetWallclock(); void llGiveInventory(string destination, string inventory); void llGiveInventoryList(string destination, string category, LSL_List inventory); - LSL_Integer llGiveMoney(string destination, int amount); + void llGiveMoney(string destination, int amount); + LSL_String llTransferLindenDollars(string destination, int amount); void llGodLikeRezObject(string inventory, LSL_Vector pos); LSL_Float llGround(LSL_Vector offset); LSL_Vector llGroundContour(LSL_Vector offset); @@ -337,9 +340,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llSetCameraParams(LSL_List rules); void llSetClickAction(int action); void llSetColor(LSL_Vector color, int face); + void llSetContentType(LSL_Key id, LSL_Integer type); void llSetDamage(double damage); void llSetForce(LSL_Vector force, int local); void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local); + void llSetVelocity(LSL_Vector velocity, int local); + void llSetAngularVelocity(LSL_Vector angularVelocity, int local); void llSetHoverHeight(double height, int water, double tau); void llSetInventoryPermMask(string item, int mask, int value); void llSetLinkAlpha(int linknumber, double alpha, int face); @@ -426,6 +432,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void print(string str); void SetPrimitiveParamsEx(LSL_Key prim, LSL_List rules, string originFunc); + void llSetKeyframedMotion(LSL_List frames, LSL_List options); LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index cdd9ea8..6259b76 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -259,6 +259,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osGetScriptEngineName(); string osGetSimulatorVersion(); + LSL_Integer osCheckODE(); + string osGetPhysicsEngineType(); Object osParseJSONNew(string JSON); Hashtable osParseJSON(string JSON); @@ -281,6 +283,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces string osGetGridGatekeeperURI(); string osGetGridCustom(string key); + string osGetAvatarHomeURI(string uuid); + LSL_String osFormatString(string str, LSL_List strings); LSL_List osMatchString(string src, string pattern, int start); LSL_String osReplaceString(string src, string pattern, string replace, int count, int start); @@ -293,6 +297,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules); /// + /// Identical to llCreateLink() but does not require permission from the owner. + /// + /// + /// + void osForceCreateLink(string target, int parent); + + /// + /// Identical to llBreakLink() but does not require permission from the owner. + /// + /// + void osForceBreakLink(int linknum); + + /// + /// Identical to llBreakAllLinks() but does not require permission from the owner. + /// + void osForceBreakAllLinks(); + + /// /// Check if the given key is an npc /// /// @@ -333,9 +355,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Key osOwnerSaveAppearance(string notecard); LSL_Key osAgentSaveAppearance(key agentId, string notecard); + key osGetGender(LSL_Key rawAvatarId); key osGetMapTexture(); key osGetRegionMapTexture(string regionName); LSL_List osGetRegionStats(); + vector osGetRegionSize(); int osGetSimulatorMemory(); void osKickAvatar(string FirstName,string SurName,string alert); @@ -343,6 +367,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float osGetHealth(string avatar); void osCauseHealing(string avatar, double healing); void osCauseDamage(string avatar, double damage); + void osForceOtherSit(string avatar); + void osForceOtherSit(string avatar, string target); LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs index 9615315..ce17ed0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs @@ -77,6 +77,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase touch = 8, touch_end = 536870912, touch_start = 2097152, + transaction_result = 33554432, object_rez = 4194304 } @@ -235,6 +236,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_eventFlagsMap.Add("touch", scriptEvents.touch); m_eventFlagsMap.Add("touch_end", scriptEvents.touch_end); m_eventFlagsMap.Add("touch_start", scriptEvents.touch_start); + m_eventFlagsMap.Add("transaction_result", scriptEvents.transaction_result); m_eventFlagsMap.Add("object_rez", scriptEvents.object_rez); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 9bf1a64..9aecea2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -48,6 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int STATUS_DIE_AT_EDGE = 128; public const int STATUS_RETURN_AT_EDGE = 256; public const int STATUS_CAST_SHADOWS = 512; + public const int STATUS_BLOCK_GRAB_OBJECT = 1024; public const int AGENT = 1; public const int AGENT_BY_LEGACY_NAME = 1; @@ -106,6 +107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PSYS_PART_TARGET_POS_MASK = 64; public const int PSYS_PART_TARGET_LINEAR_MASK = 128; public const int PSYS_PART_EMISSIVE_MASK = 256; + public const int PSYS_PART_RIBBON_MASK = 1024; public const int PSYS_PART_FLAGS = 0; public const int PSYS_PART_START_COLOR = 1; public const int PSYS_PART_START_ALPHA = 2; @@ -129,6 +131,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PSYS_SRC_OMEGA = 21; public const int PSYS_SRC_ANGLE_BEGIN = 22; public const int PSYS_SRC_ANGLE_END = 23; + public const int PSYS_PART_BLEND_FUNC_SOURCE = 24; + public const int PSYS_PART_BLEND_FUNC_DEST = 25; + public const int PSYS_PART_START_GLOW = 26; + public const int PSYS_PART_END_GLOW = 27; + public const int PSYS_PART_BF_ONE = 0; + public const int PSYS_PART_BF_ZERO = 1; + public const int PSYS_PART_BF_DEST_COLOR = 2; + public const int PSYS_PART_BF_SOURCE_COLOR = 3; + public const int PSYS_PART_BF_ONE_MINUS_DEST_COLOR = 4; + public const int PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR = 5; + public const int PSYS_PART_BF_SOURCE_ALPHA = 7; + public const int PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA = 9; public const int PSYS_SRC_PATTERN_DROP = 1; public const int PSYS_SRC_PATTERN_EXPLODE = 2; public const int PSYS_SRC_PATTERN_ANGLE = 4; @@ -236,6 +250,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int ATTACH_HUD_BOTTOM_LEFT = 36; public const int ATTACH_HUD_BOTTOM = 37; public const int ATTACH_HUD_BOTTOM_RIGHT = 38; + public const int ATTACH_NECK = 39; + public const int ATTACH_AVATAR_CENTER = 40; #region osMessageAttachments constants @@ -355,6 +371,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int HTTP_MIMETYPE = 1; public const int HTTP_BODY_MAXLENGTH = 2; public const int HTTP_VERIFY_CERT = 3; + public const int HTTP_VERBOSE_THROTTLE = 4; + public const int HTTP_CUSTOM_HEADER = 5; + public const int HTTP_PRAGMA_NO_CACHE = 6; + + // llSetContentType + public const int CONTENT_TYPE_TEXT = 0; //text/plain + public const int CONTENT_TYPE_HTML = 1; //text/html + public const int CONTENT_TYPE_XML = 2; //application/xml + public const int CONTENT_TYPE_XHTML = 3; //application/xhtml+xml + public const int CONTENT_TYPE_ATOM = 4; //application/atom+xml + public const int CONTENT_TYPE_JSON = 5; //application/json + public const int CONTENT_TYPE_LLSD = 6; //application/llsd+xml + public const int CONTENT_TYPE_FORM = 7; //application/x-www-form-urlencoded + public const int CONTENT_TYPE_RSS = 8; //application/rss+xml public const int PRIM_MATERIAL = 2; public const int PRIM_PHYSICS = 3; @@ -381,6 +411,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_POS_LOCAL = 33; public const int PRIM_LINK_TARGET = 34; public const int PRIM_SLICE = 35; + public const int PRIM_SPECULAR = 36; + public const int PRIM_NORMAL = 37; + public const int PRIM_ALPHA_MODE = 38; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; @@ -563,6 +596,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int OBJECT_PHYSICS = 21; public const int OBJECT_PHANTOM = 22; public const int OBJECT_TEMP_ON_REZ = 23; + public const int OBJECT_RENDER_WEIGHT = 24; + public const int OBJECT_HOVER_HEIGHT = 25; + public const int OBJECT_BODY_SHAPE_TYPE = 26; + public const int OBJECT_LAST_OWNER_ID = 27; // Pathfinding types public const int OPT_OTHER = -1; @@ -635,7 +672,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int TOUCH_INVALID_FACE = -1; public static readonly vector TOUCH_INVALID_TEXCOORD = new vector(-1.0, -1.0, 0.0); public static readonly vector TOUCH_INVALID_VECTOR = ZERO_VECTOR; - + // constants for llGetPrimMediaParams/llSetPrimMediaParams public const int PRIM_MEDIA_ALT_IMAGE_ENABLE = 0; public const int PRIM_MEDIA_CONTROLS = 1; @@ -652,15 +689,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_MEDIA_WHITELIST = 12; public const int PRIM_MEDIA_PERMS_INTERACT = 13; public const int PRIM_MEDIA_PERMS_CONTROL = 14; - + public const int PRIM_MEDIA_CONTROLS_STANDARD = 0; public const int PRIM_MEDIA_CONTROLS_MINI = 1; - + public const int PRIM_MEDIA_PERM_NONE = 0; public const int PRIM_MEDIA_PERM_OWNER = 1; public const int PRIM_MEDIA_PERM_GROUP = 2; public const int PRIM_MEDIA_PERM_ANYONE = 4; - + + public const int PRIM_PHYSICS_SHAPE_TYPE = 30; + public const int PRIM_PHYSICS_SHAPE_PRIM = 0; + public const int PRIM_PHYSICS_SHAPE_CONVEX = 2; + public const int PRIM_PHYSICS_SHAPE_NONE = 1; + + public const int PRIM_PHYSICS_MATERIAL = 31; + public const int DENSITY = 1; + public const int FRICTION = 2; + public const int RESTITUTION = 4; + public const int GRAVITY_MULTIPLIER = 8; + // extra constants for llSetPrimMediaParams public static readonly LSLInteger LSL_STATUS_OK = new LSLInteger(0); public static readonly LSLInteger LSL_STATUS_MALFORMED_PARAMS = new LSLInteger(1000); @@ -677,7 +725,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const string TEXTURE_PLYWOOD = "89556747-24cb-43ed-920b-47caed15465f"; public const string TEXTURE_TRANSPARENT = "8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"; public const string TEXTURE_MEDIA = "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361"; - + // Constants for osGetRegionStats public const int STATS_TIME_DILATION = 0; public const int STATS_SIM_FPS = 1; @@ -730,9 +778,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public static readonly LSLInteger RC_GET_ROOT_KEY = 2; public static readonly LSLInteger RC_GET_LINK_NUM = 4; - public static readonly LSLInteger RCERR_UNKNOWN = -1; + public static readonly LSLInteger RCERR_UNKNOWN = -1; public static readonly LSLInteger RCERR_SIM_PERF_LOW = -2; - public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = 3; + public static readonly LSLInteger RCERR_CAST_TIME_EXCEEDED = -3; + + public const int KFM_MODE = 1; + public const int KFM_LOOP = 1; + public const int KFM_REVERSE = 3; + public const int KFM_FORWARD = 0; + public const int KFM_PING_PONG = 2; + public const int KFM_DATA = 2; + public const int KFM_TRANSLATION = 2; + public const int KFM_ROTATION = 1; + public const int KFM_COMMAND = 0; + public const int KFM_CMD_PLAY = 0; + public const int KFM_CMD_STOP = 1; + public const int KFM_CMD_PAUSE = 2; /// /// process name parameter as regex diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 36803a4..35aaf01 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -464,6 +464,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetEnergy(); } + public LSL_String llGetEnv(LSL_String name) + { + return m_LSL_Functions.llGetEnv(name); + } + public LSL_Vector llGetForce() { return m_LSL_Functions.llGetForce(); @@ -554,6 +559,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetLinkNumberOfSides(link); } + public void llSetKeyframedMotion(LSL_List frames, LSL_List options) + { + m_LSL_Functions.llSetKeyframedMotion(frames, options); + } + public LSL_Integer llGetListEntryType(LSL_List src, int index) { return m_LSL_Functions.llGetListEntryType(src, index); @@ -579,6 +589,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetMass(); } + public LSL_Float llGetMassMKS() + { + return m_LSL_Functions.llGetMassMKS(); + } + public LSL_Integer llGetMemoryLimit() { return m_LSL_Functions.llGetMemoryLimit(); @@ -869,9 +884,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llGiveInventoryList(destination, category, inventory); } - public LSL_Integer llGiveMoney(string destination, int amount) + public void llGiveMoney(string destination, int amount) { - return m_LSL_Functions.llGiveMoney(destination, amount); + m_LSL_Functions.llGiveMoney(destination, amount); + } + + public LSL_String llTransferLindenDollars(string destination, int amount) + { + return m_LSL_Functions.llTransferLindenDollars(destination, amount); } public void llGodLikeRezObject(string inventory, LSL_Vector pos) @@ -1518,6 +1538,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llSetColor(color, face); } + public void llSetContentType(LSL_Key id, LSL_Integer type) + { + m_LSL_Functions.llSetContentType(id, type); + } + public void llSetDamage(double damage) { m_LSL_Functions.llSetDamage(damage); @@ -1533,6 +1558,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llSetForceAndTorque(force, torque, local); } + public void llSetVelocity(LSL_Vector force, int local) + { + m_LSL_Functions.llSetVelocity(force, local); + } + + public void llSetAngularVelocity(LSL_Vector force, int local) + { + m_LSL_Functions.llSetAngularVelocity(force, local); + } + public void llSetHoverHeight(double height, int water, double tau) { m_LSL_Functions.llSetHoverHeight(height, water, tau); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index afa9ae0..a60f381 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -420,6 +420,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetScriptEngineName(); } + public LSL_Integer osCheckODE() + { + return m_OSSL_Functions.osCheckODE(); + } + + public string osGetPhysicsEngineType() + { + return m_OSSL_Functions.osGetPhysicsEngineType(); + } + public string osGetSimulatorVersion() { return m_OSSL_Functions.osGetSimulatorVersion(); @@ -500,6 +510,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetGridCustom(key); } + public string osGetAvatarHomeURI(string uuid) + { + return m_OSSL_Functions.osGetAvatarHomeURI(uuid); + } + public LSL_String osFormatString(string str, LSL_List strings) { return m_OSSL_Functions.osFormatString(str, strings); @@ -537,6 +552,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules); } + public void osForceCreateLink(string target, int parent) + { + m_OSSL_Functions.osForceCreateLink(target, parent); + } + + public void osForceBreakLink(int linknum) + { + m_OSSL_Functions.osForceBreakLink(linknum); + } + + public void osForceBreakAllLinks() + { + m_OSSL_Functions.osForceBreakAllLinks(); + } + public LSL_Integer osIsNpc(LSL_Key npc) { return m_OSSL_Functions.osIsNpc(npc); @@ -708,16 +738,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } private void Save() { + /* Remove temporarily until we have a handle to the region size if (Position.x > ((int)Constants.RegionSize - 1)) Position.x = ((int)Constants.RegionSize - 1); - if (Position.x < 0) - Position.x = 0; if (Position.y > ((int)Constants.RegionSize - 1)) Position.y = ((int)Constants.RegionSize - 1); + */ + if (Position.z > Constants.RegionHeight) + Position.z = Constants.RegionHeight; + if (Position.x < 0) + Position.x = 0; if (Position.y < 0) Position.y = 0; - if (Position.z > 768) - Position.z = 768; if (Position.z < 0) Position.z = 0; prim.OSSL.llSetPos(Position); @@ -843,6 +875,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase } } + public string osGetGender(LSL_Key rawAvatarId) + { + return m_OSSL_Functions.osGetGender(rawAvatarId); + } + public key osGetMapTexture() { return m_OSSL_Functions.osGetMapTexture(); @@ -858,6 +895,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetRegionStats(); } + public vector osGetRegionSize() + { + return m_OSSL_Functions.osGetRegionSize(); + } + /// /// Returns the amount of memory in use by the Simulator Daemon. /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware) @@ -892,6 +934,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { m_OSSL_Functions.osCauseHealing(avatar, healing); } + + public void osForceOtherSit(string avatar) + { + m_OSSL_Functions.osForceOtherSit(avatar); + } + + public void osForceOtherSit(string avatar, string target) + { + m_OSSL_Functions.osForceOtherSit(avatar, target); + } public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs index 573a803..b1825ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Atom.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Atom.cs deleted file mode 100644 index 27ab04e..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Atom.cs +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Text; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Atom : IUnifiable - { - private static Dictionary _atomStore = new Dictionary(); - public readonly string _name; - public readonly Atom _module; - - /// - /// You should not call this constructor, but use Atom.a instead. - /// - /// - /// - private Atom(string name, Atom module) - { - _name = name; - _module = module; - } - - /// - /// Return the unique Atom object for name where module is null. You should use this to create - /// an Atom instead of calling the Atom constructor. - /// - /// - /// - public static Atom a(string name) - { - Atom atom; - if (!_atomStore.TryGetValue(name, out atom)) - { - atom = new Atom(name, null); - _atomStore[name] = atom; - } - return atom; - } - - /// - /// Return an Atom object with the name and module. If module is null or Atom.NIL, - /// this behaves like Atom.a(name) and returns the unique object where the module is null. - /// If module is not null or Atom.NIL, this may or may not be the same object as another Atom - /// with the same name and module. - /// - /// - /// - /// - public static Atom a(string name, Atom module) - { - if (module == null || module == Atom.NIL) - return a(name); - return new Atom(name, module); - } - - /// - /// If Obj is an Atom unify its _module with Module. If the Atom's _module is null, use Atom.NIL. - /// - /// - /// - /// - public static IEnumerable module(object Obj, object Module) - { - Obj = YP.getValue(Obj); - if (Obj is Atom) - { - if (((Atom)Obj)._module == null) - return YP.unify(Module, Atom.NIL); - else - return YP.unify(Module, ((Atom)Obj)._module); - } - return YP.fail(); - } - - public static readonly Atom NIL = Atom.a("[]"); - public static readonly Atom DOT = Atom.a("."); - public static readonly Atom F = Atom.a("f"); - public static readonly Atom SLASH = Atom.a("/"); - public static readonly Atom HAT = Atom.a("^"); - public static readonly Atom RULE = Atom.a(":-"); - - public IEnumerable unify(object arg) - { - arg = YP.getValue(arg); - if (arg is Atom) - return Equals(arg) ? YP.succeed() : YP.fail(); - else if (arg is Variable) - return ((Variable)arg).unify(this); - else - return YP.fail(); - } - - public void addUniqueVariables(List variableSet) - { - // Atom does not contain variables. - } - - public object makeCopy(Variable.CopyStore copyStore) - { - // Atom does not contain variables that need to be copied. - return this; - } - - public bool termEqual(object term) - { - return Equals(YP.getValue(term)); - } - - public bool ground() - { - // Atom is always ground. - return true; - } - - public override bool Equals(object obj) - { - if (obj is Atom) - { - if (_module == null && ((Atom)obj)._module == null) - // When _declaringClass is null, we always use an identical object from _atomStore. - return this == obj; - // Otherwise, ignore _declaringClass and do a normal string compare on the _name. - return _name == ((Atom)obj)._name; - } - return false; - } - - public override string ToString() - { - return _name; - } - - public override int GetHashCode() - { - // Debug: need to check _declaringClass. - return _name.GetHashCode(); - } - - public string toQuotedString() - { - if (_name.Length == 0) - return "''"; - else if (this == Atom.NIL) - return "[]"; - - StringBuilder result = new StringBuilder(_name.Length); - bool useQuotes = false; - foreach (char c in _name) - { - int cInt = (int)c; - if (c == '\'') - { - result.Append("''"); - useQuotes = true; - } - else if (c == '_' || cInt >= (int)'a' && cInt <= (int)'z' || - cInt >= (int)'A' && cInt <= (int)'Z' || cInt >= (int)'0' && cInt <= (int)'9') - result.Append(c); - else - { - // Debug: Need to handle non-printable chars. - result.Append(c); - useQuotes = true; - } - } - - if (!useQuotes && (int)_name[0] >= (int)'a' && (int)_name[0] <= (int)'z') - return result.ToString(); - else - { - // Surround in single quotes. - result.Append('\''); - return "'" + result; - } - } - - /// - /// Return true if _name is lexicographically less than atom._name. - /// - /// - /// - public bool lessThan(Atom atom) - { - return _name.CompareTo(atom._name) < 0; - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs deleted file mode 100644 index bbf1a5b..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// A BagofAnswers holds answers for bagof and setof. - /// - public class BagofAnswers - { - private object _template; - private Variable[] _freeVariables; - private Dictionary> _bagForFreeVariables; - private List _findallBagArray; - private static TermArrayEqualityComparer _termArrayEqualityComparer = - new TermArrayEqualityComparer(); - - /// - /// To get the free variables, split off any existential qualifiers from Goal such as the X in - /// "X ^ f(Y)", get the set of unbound variables in Goal that are not qualifiers, then remove - /// the unbound variables that are qualifiers as well as the unbound variables in Template. - /// - /// - /// - public BagofAnswers(object Template, object Goal) - { - _template = Template; - - // First get the set of variables that are not free variables. - List variableSet = new List(); - YP.addUniqueVariables(Template, variableSet); - object UnqualifiedGoal = YP.getValue(Goal); - while (UnqualifiedGoal is Functor2 && ((Functor2)UnqualifiedGoal)._name == Atom.HAT) - { - YP.addUniqueVariables(((Functor2)UnqualifiedGoal)._arg1, variableSet); - UnqualifiedGoal = YP.getValue(((Functor2)UnqualifiedGoal)._arg2); - } - - // Remember how many non-free variables there are so we can find the unique free variables - // that are added. - int nNonFreeVariables = variableSet.Count; - YP.addUniqueVariables(UnqualifiedGoal, variableSet); - int nFreeVariables = variableSet.Count - nNonFreeVariables; - if (nFreeVariables == 0) - { - // There were no free variables added, so we won't waste time with _bagForFreeVariables. - _freeVariables = null; - _findallBagArray = new List(); - } - else - { - // Copy the free variables. - _freeVariables = new Variable[nFreeVariables]; - for (int i = 0; i < nFreeVariables; ++i) - _freeVariables[i] = variableSet[i + nNonFreeVariables]; - - _bagForFreeVariables = new Dictionary>(_termArrayEqualityComparer); - } - } - - public void add() - { - if (_freeVariables == null) - // The goal has bound the values in _template but we don't bother with _freeVariables. - _findallBagArray.Add(YP.makeCopy(_template, new Variable.CopyStore())); - else - { - // The goal has bound the values in _template and _freeVariables. - // Find the entry for this set of _freeVariables values. - object[] freeVariableValues = new object[_freeVariables.Length]; - for (int i = 0; i < _freeVariables.Length; ++i) - freeVariableValues[i] = YP.getValue(_freeVariables[i]); - List bagArray; - if (!_bagForFreeVariables.TryGetValue(freeVariableValues, out bagArray)) - { - bagArray = new List(); - _bagForFreeVariables[freeVariableValues] = bagArray; - } - - // Now copy the template and add to the bag for the freeVariables values. - bagArray.Add(YP.makeCopy(_template, new Variable.CopyStore())); - } - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - - /// - /// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag. - /// - /// this is unified with the List of matches for template that - /// corresponds to the bindings for freeVariables. Be very careful: this does not unify with a Prolog - /// list. - /// - public IEnumerable resultArray(Variable bagArrayVariable) - { - if (_freeVariables == null) - { - // No unbound free variables, so we only filled one bag. If empty, bagof fails. - if (_findallBagArray.Count > 0) - { - foreach (bool l1 in bagArrayVariable.unify(_findallBagArray)) - yield return false; - } - } - else - { - foreach (KeyValuePair> valuesAndBag in _bagForFreeVariables) - { - foreach (bool l1 in YP.unifyArrays(_freeVariables, valuesAndBag.Key)) - { - foreach (bool l2 in bagArrayVariable.unify(valuesAndBag.Value)) - yield return false; - } - // Debug: Should we free memory of the answers already returned? - } - } - } - - /// - /// For each result, unify the _freeVariables and unify Bag with the associated bag. - /// - /// - /// - public IEnumerable result(object Bag) - { - Variable bagArrayVariable = new Variable(); - foreach (bool l1 in resultArray(bagArrayVariable)) - { - foreach (bool l2 in YP.unify(Bag, ListPair.make((List)bagArrayVariable.getValue()))) - yield return false; - } - } - - /// - /// For each result, unify the _freeVariables and unify Bag with the associated bag which is sorted - /// with duplicates removed, as in setof. - /// - /// - /// - public IEnumerable resultSet(object Bag) - { - Variable bagArrayVariable = new Variable(); - foreach (bool l1 in resultArray(bagArrayVariable)) - { - List bagArray = (List)bagArrayVariable.getValue(); - YP.sortArray(bagArray); - foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray))) - yield return false; - } - } - - public static IEnumerable bagofArray - (object Template, object Goal, IEnumerable goalIterator, Variable bagArrayVariable) - { - BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); - foreach (bool l1 in goalIterator) - bagOfAnswers.add(); - return bagOfAnswers.resultArray(bagArrayVariable); - } - - public static IEnumerable bagof - (object Template, object Goal, IEnumerable goalIterator, object Bag) - { - BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); - foreach (bool l1 in goalIterator) - bagOfAnswers.add(); - return bagOfAnswers.result(Bag); - } - - public static IEnumerable setof - (object Template, object Goal, IEnumerable goalIterator, object Bag) - { - BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); - foreach (bool l1 in goalIterator) - bagOfAnswers.add(); - return bagOfAnswers.resultSet(Bag); - } - #pragma warning restore 0168, 0219 - - /// - /// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual. - /// - private class TermArrayEqualityComparer : IEqualityComparer - { - public bool Equals(object[] array1, object[] array2) - { - if (array1.Length != array2.Length) - return false; - for (int i = 0; i < array1.Length; ++i) - { - if (!YP.termEqual(array1[i], array2[i])) - return false; - } - return true; - } - - public int GetHashCode(object[] array) - { - int hashCode = 0; - for (int i = 0; i < array.Length; ++i) - hashCode ^= array[i].GetHashCode(); - return hashCode; - } - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs deleted file mode 100644 index fb9569e..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// A FindallAnswers holds answers for findall. - /// - public class FindallAnswers - { - private object _template; - private List _bagArray; - - public FindallAnswers(object Template) - { - _template = Template; - _bagArray = new List(); - } - - public void add() - { - _bagArray.Add(YP.makeCopy(_template, new Variable.CopyStore())); - } - - public List resultArray() - { - return _bagArray; - } - - /// - /// Unify Bag with the result. This frees the internal answers, so you can only call this once. - /// - /// - /// - public IEnumerable result(object Bag) - { - object result = ListPair.make(_bagArray); - // Try to free the memory. - _bagArray = null; - return YP.unify(Bag, result); - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - - /// - /// This is a simplified findall when the goal is a single call. - /// - /// - /// - /// - /// - public static IEnumerable findall(object Template, IEnumerable goal, object Bag) - { - FindallAnswers findallAnswers = new FindallAnswers(Template); - foreach (bool l1 in goal) - findallAnswers.add(); - return findallAnswers.result(Bag); - } - - /// - /// Like findall, except return an array of the results. - /// - /// - /// - /// - public static List findallArray(object Template, IEnumerable goal) - { - FindallAnswers findallAnswers = new FindallAnswers(Template); - foreach (bool l1 in goal) - findallAnswers.add(); - return findallAnswers.resultArray(); - } - #pragma warning restore 0168, 0219 - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor.cs deleted file mode 100644 index 4d65f5b..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Functor : IUnifiable - { - public readonly Atom _name; - public readonly object[] _args; - - public Functor(Atom name, object[] args) - { - if (args.Length <= 3) - { - if (args.Length == 0) - throw new Exception("For arity 0 functor, just use name as an Atom"); - else if (args.Length == 1) - throw new Exception("For arity 1 functor, use Functor1"); - else if (args.Length == 2) - throw new Exception("For arity 2 functor, use Functor2"); - else if (args.Length == 3) - throw new Exception("For arity 3 functor, use Functor3"); - else - // (This shouldn't happen, but include it for completeness. - throw new Exception("Cannot create a Functor of arity " + args.Length); - } - - _name = name; - _args = args; - } - - public Functor(string name, object[] args) - : this(Atom.a(name), args) - { - } - - /// - /// Return an Atom, Functor1, Functor2, Functor3 or Functor depending on the - /// length of args. - /// Note that this is different than the Functor constructor which requires - /// the length of args to be greater than 3. - /// - /// - /// - /// - public static object make(Atom name, object[] args) - { - if (args.Length <= 0) - return name; - else if (args.Length == 1) - return new Functor1(name, args[0]); - else if (args.Length == 2) - return new Functor2(name, args[0], args[1]); - else if (args.Length == 3) - return new Functor3(name, args[0], args[1], args[2]); - else - return new Functor(name, args); - } - - /// - /// Call the main make, first converting name to an Atom. - /// - /// - /// - /// - public static object make(string name, object[] args) - { - return make(Atom.a(name), args); - } - - /// - /// If arg is another Functor, then succeed (yield once) if this and arg have the - /// same name and all functor args unify, otherwise fail (don't yield). - /// If arg is a Variable, then call its unify to unify with this. - /// Otherwise fail (don't yield). - /// - /// - /// - public IEnumerable unify(object arg) - { - arg = YP.getValue(arg); - if (arg is Functor) - { - Functor argFunctor = (Functor)arg; - if (_name.Equals(argFunctor._name)) - return YP.unifyArrays(_args, argFunctor._args); - else - return YP.fail(); - } - else if (arg is Variable) - return ((Variable)arg).unify(this); - else - return YP.fail(); - } - - public override string ToString() - { - string result = _name + "(" + YP.getValue(_args[0]); - for (int i = 1; i < _args.Length; ++i) - result += ", " + YP.getValue(_args[i]); - result += ")"; - return result; - } - - public bool termEqual(object term) - { - term = YP.getValue(term); - if (term is Functor) - { - Functor termFunctor = (Functor)term; - if (_name.Equals(termFunctor._name) && _args.Length == termFunctor._args.Length) - { - for (int i = 0; i < _args.Length; ++i) - { - if (!YP.termEqual(_args[i], termFunctor._args[i])) - return false; - } - return true; - } - } - return false; - } - - public bool lessThan(Functor functor) - { - // Do the equal check first since it is faster. - if (!_name.Equals(functor._name)) - return _name.lessThan(functor._name); - - if (_args.Length != functor._args.Length) - return _args.Length < functor._args.Length; - - for (int i = 0; i < _args.Length; ++i) - { - if (!YP.termEqual(_args[i], functor._args[i])) - return YP.termLessThan(_args[i], functor._args[i]); - } - - return false; - } - - public bool ground() - { - for (int i = 0; i < _args.Length; ++i) - { - if (!YP.ground(_args[i])) - return false; - } - return true; - } - - public void addUniqueVariables(List variableSet) - { - for (int i = 0; i < _args.Length; ++i) - YP.addUniqueVariables(_args[i], variableSet); - } - - public object makeCopy(Variable.CopyStore copyStore) - { - object[] argsCopy = new object[_args.Length]; - for (int i = 0; i < _args.Length; ++i) - argsCopy[i] = YP.makeCopy(_args[i], copyStore); - return new Functor(_name, argsCopy); - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs deleted file mode 100644 index 80d98b1..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Functor1 : IUnifiable - { - public readonly Atom _name; - public readonly object _arg1; - - public Functor1(Atom name, object arg1) - { - _name = name; - _arg1 = arg1; - } - - public Functor1(string name, object arg1) - : this(Atom.a(name), arg1) - { - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - /// - /// If arg is another Functor1, then succeed (yield once) if this and arg have the - /// same name and the functor args unify, otherwise fail (don't yield). - /// If arg is a Variable, then call its unify to unify with this. - /// Otherwise fail (don't yield). - /// - /// - /// - public IEnumerable unify(object arg) - { - arg = YP.getValue(arg); - if (arg is Functor1) - { - Functor1 argFunctor = (Functor1)arg; - if (_name.Equals(argFunctor._name)) - { - foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) - yield return false; - } - } - else if (arg is Variable) - { - foreach (bool l1 in ((Variable)arg).unify(this)) - yield return false; - } - } - #pragma warning restore 0168, 0219 - - - public override string ToString() - { - return _name + "(" + YP.getValue(_arg1) + ")"; - } - - public bool termEqual(object term) - { - term = YP.getValue(term); - if (term is Functor1) - { - Functor1 termFunctor = (Functor1)term; - return _name.Equals(termFunctor._name) && YP.termEqual(_arg1, termFunctor._arg1); - } - return false; - } - - public bool lessThan(Functor1 functor) - { - // Do the equal check first since it is faster. - if (!_name.Equals(functor._name)) - return _name.lessThan(functor._name); - - return YP.termLessThan(_arg1, functor._arg1); - } - - public bool ground() - { - return YP.ground(_arg1); - } - - public void addUniqueVariables(List variableSet) - { - YP.addUniqueVariables(_arg1, variableSet); - } - - public object makeCopy(Variable.CopyStore copyStore) - { - return new Functor1(_name, YP.makeCopy(_arg1, copyStore)); - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs deleted file mode 100644 index 4c501d6..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Functor2 : IUnifiable - { - public readonly Atom _name; - public readonly object _arg1; - public readonly object _arg2; - - public Functor2(Atom name, object arg1, object arg2) - { - _name = name; - _arg1 = arg1; - _arg2 = arg2; - } - - public Functor2(string name, object arg1, object arg2) - : this(Atom.a(name), arg1, arg2) - { - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - /// If arg is another Functor2, then succeed (yield once) if this and arg have the - /// same name and all functor args unify, otherwise fail (don't yield). - /// If arg is a Variable, then call its unify to unify with this. - /// Otherwise fail (don't yield). - public IEnumerable unify(object arg) - { - arg = YP.getValue(arg); - if (arg is Functor2) - { - Functor2 argFunctor = (Functor2)arg; - if (_name.Equals(argFunctor._name)) - { - foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) - { - foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) - yield return false; - } - } - } - else if (arg is Variable) - { - foreach (bool l1 in ((Variable)arg).unify(this)) - yield return false; - } - } - #pragma warning restore 0168, 0219 - - - public override string ToString() - { - if (_name == Atom.DOT) - return listPairToString(this); - else - return _name + "(" + YP.getValue(_arg1) + ", " + YP.getValue(_arg2) + ")"; - } - - public bool termEqual(object term) - { - term = YP.getValue(term); - if (term is Functor2) - { - Functor2 termFunctor = (Functor2)term; - return _name.Equals(termFunctor._name) && YP.termEqual(_arg1, termFunctor._arg1) - && YP.termEqual(_arg2, termFunctor._arg2); - } - return false; - } - - public bool lessThan(Functor2 functor) - { - // Do the equal check first since it is faster. - if (!_name.Equals(functor._name)) - return _name.lessThan(functor._name); - - if (!YP.termEqual(_arg1, functor._arg1)) - return YP.termLessThan(_arg1, functor._arg1); - - return YP.termLessThan(_arg2, functor._arg2); - } - - public bool ground() - { - return YP.ground(_arg1) && YP.ground(_arg2); - } - - public void addUniqueVariables(List variableSet) - { - YP.addUniqueVariables(_arg1, variableSet); - YP.addUniqueVariables(_arg2, variableSet); - } - - public object makeCopy(Variable.CopyStore copyStore) - { - return new Functor2(_name, YP.makeCopy(_arg1, copyStore), - YP.makeCopy(_arg2, copyStore)); - } - - private static string listPairToString(Functor2 listPair) - { - string result = "["; - while (true) - { - object head = YP.getValue(listPair._arg1); - object tail = YP.getValue(listPair._arg2); - if (tail == (object)Atom.NIL) - { - result += head; - break; - } - else if (tail is Functor2 && ((Functor2)tail)._name == Atom.DOT) - { - result += head + ", "; - listPair = (Functor2)tail; - // Loop again. - } - else - { - // The list is not terminated with NIL. - result += head + "|" + tail; - break; - } - } - result += "]"; - return result; - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs deleted file mode 100644 index 94e39c4..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Functor3 : IUnifiable - { - public readonly Atom _name; - public readonly object _arg1; - public readonly object _arg2; - public readonly object _arg3; - - public Functor3(Atom name, object arg1, object arg2, object arg3) - { - _name = name; - _arg1 = arg1; - _arg2 = arg2; - _arg3 = arg3; - } - - public Functor3(string name, object arg1, object arg2, object arg3) - : this(Atom.a(name), arg1, arg2, arg3) - { - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - /// If arg is another Functor3, then succeed (yield once) if this and arg have the - /// same name and all functor args unify, otherwise fail (don't yield). - /// If arg is a Variable, then call its unify to unify with this. - /// Otherwise fail (don't yield). - public IEnumerable unify(object arg) - { - arg = YP.getValue(arg); - if (arg is Functor3) - { - Functor3 argFunctor = (Functor3)arg; - if (_name.Equals(argFunctor._name)) - { - foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) - { - foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) - { - foreach (bool l3 in YP.unify(_arg3, argFunctor._arg3)) - yield return false; - } - } - } - } - else if (arg is Variable) - { - foreach (bool l1 in ((Variable)arg).unify(this)) - yield return false; - } - } - #pragma warning restore 0168, 0219 - - public override string ToString() - { - return _name + "(" + YP.getValue(_arg1) + ", " + YP.getValue(_arg2) + ", " + - YP.getValue(_arg3) + ")"; - } - - public bool termEqual(object term) - { - term = YP.getValue(term); - if (term is Functor3) - { - Functor3 termFunctor = (Functor3)term; - return _name.Equals(termFunctor._name) && YP.termEqual(_arg1, termFunctor._arg1) - && YP.termEqual(_arg2, termFunctor._arg2) - && YP.termEqual(_arg3, termFunctor._arg3); - } - return false; - } - - public bool lessThan(Functor3 functor) - { - // Do the equal check first since it is faster. - if (!_name.Equals(functor._name)) - return _name.lessThan(functor._name); - - if (!YP.termEqual(_arg1, functor._arg1)) - return YP.termLessThan(_arg1, functor._arg1); - - if (!YP.termEqual(_arg2, functor._arg2)) - return YP.termLessThan(_arg2, functor._arg2); - - return YP.termLessThan(_arg3, functor._arg3); - } - - public bool ground() - { - return YP.ground(_arg1) && YP.ground(_arg2) && YP.ground(_arg3); - } - - public void addUniqueVariables(List variableSet) - { - YP.addUniqueVariables(_arg1, variableSet); - YP.addUniqueVariables(_arg2, variableSet); - YP.addUniqueVariables(_arg3, variableSet); - } - - public object makeCopy(Variable.CopyStore copyStore) - { - return new Functor3(_name, YP.makeCopy(_arg1, copyStore), - YP.makeCopy(_arg2, copyStore), YP.makeCopy(_arg3, copyStore)); - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs deleted file mode 100644 index 09a9a08..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs +++ /dev/null @@ -1,385 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// An IndexedAnswers holds answers to a query based on the values of index arguments. - /// - public class IndexedAnswers : YP.IClause - { - private int _arity; - // addAnswer adds the answer here and indexes it later. - private List _allAnswers = new List(); - // The key has the arity of answers with non-null values for each indexed arg. The value - // is a list of the matching answers. The signature is implicit in the pattern on non-null index args. - private Dictionary> _indexedAnswers = - new Dictionary>(); - // Keeps track of whether we have started adding entries to _indexedAnswers for the signature. - private Dictionary _gotAnswersForSignature = new Dictionary(); - private const int MAX_INDEX_ARGS = 31; - - public IndexedAnswers(int arity) - { - _arity = arity; - } - - /// - /// Append the answer to the list and update the indexes, if any. - /// Elements of answer must be ground, since arguments with unbound variables make this - /// into a dynamic rule which we don't index. - /// - /// - public void addAnswer(object[] answer) - { - addOrPrependAnswer(answer, false); - } - - /// - /// Prepend the answer to the list and clear the indexes so that they must be re-computed - /// on the next call to match. (Only addAnswer will maintain the indexes while adding answers.) - /// Elements of answer must be ground, since arguments with unbound variables make this - /// into a dynamic rule which we don't index. - /// - /// - public void prependAnswer(object[] answer) - { - addOrPrependAnswer(answer, true); - } - - /// - /// Do the work of addAnswer or prependAnswer. - /// - /// - private void addOrPrependAnswer(object[] answer, bool prepend) - { - if (answer.Length != _arity) - return; - - // Store a copy of the answer array. - object[] answerCopy = new object[answer.Length]; - Variable.CopyStore copyStore = new Variable.CopyStore(); - for (int i = 0; i < answer.Length; ++i) - answerCopy[i] = YP.makeCopy(answer[i], copyStore); - if (copyStore.getNUniqueVariables() > 0) - throw new InvalidOperationException - ("Elements of answer must be ground, but found " + copyStore.getNUniqueVariables() + - " unbound variables"); - - if (prepend) - { - _allAnswers.Insert(0, answerCopy); - clearIndexes(); - } - else - { - _allAnswers.Add(answerCopy); - // If match has already indexed answers for a signature, we need to add - // this to the existing indexed answers. - foreach (int signature in _gotAnswersForSignature.Keys) - indexAnswerForSignature(answerCopy, signature); - } - } - - private void indexAnswerForSignature(object[] answer, int signature) - { - // First find out which of the answer values can be used as an index. - object[] indexValues = new object[answer.Length]; - for (int i = 0; i < answer.Length; ++i) - { - // We limit the number of indexed args in a 32-bit signature. - if (i >= MAX_INDEX_ARGS) - indexValues[i] = null; - else - indexValues[i] = getIndexValue(YP.getValue(answer[i])); - } - - // We need an entry in indexArgs from indexValues for each 1 bit in signature. - HashedList indexArgs = new HashedList(indexValues.Length); - for (int i = 0; i < indexValues.Length; ++i) - { - if ((signature & (1 << i)) == 0) - indexArgs.Add(null); - else - { - if (indexValues[i] == null) - // The signature wants an index value here, but we don't have one so - // we can't add it as an answer for this signature. - return; - else - indexArgs.Add(indexValues[i]); - } - } - - // Add the answer to the answers list for indexArgs, creating the entry if needed. - List answers; - if (!_indexedAnswers.TryGetValue(indexArgs, out answers)) - { - answers = new List(); - _indexedAnswers[indexArgs] = answers; - } - answers.Add(answer); - } - - public IEnumerable match(object[] arguments) - { - if (arguments.Length != _arity) - yield break; - - // Set up indexArgs, up to arg position MAX_INDEX_ARGS. The signature has a 1 bit for - // each non-null index arg. - HashedList indexArgs = new HashedList(arguments.Length); - bool gotAllIndexArgs = true; - int signature = 0; - for (int i = 0; i < arguments.Length; ++i) - { - object indexValue = null; - if (i < MAX_INDEX_ARGS) - { - // We limit the number of args in a 32-bit signature. - indexValue = getIndexValue(YP.getValue(arguments[i])); - if (indexValue != null) - signature += (1 << i); - } - if (indexValue == null) - gotAllIndexArgs = false; - indexArgs.Add(indexValue); - } - - List answers; - if (signature == 0) - // No index args, so we have to match from _allAnswers. - answers = _allAnswers; - else - { - if (!_gotAnswersForSignature.ContainsKey(signature)) - { - // We need to create the entry in _indexedAnswers. - foreach (object[] answer in _allAnswers) - indexAnswerForSignature(answer, signature); - // Mark that we did this signature. - _gotAnswersForSignature[signature] = null; - } - if (!_indexedAnswers.TryGetValue(indexArgs, out answers)) - yield break; - } - - if (gotAllIndexArgs) - { - // All the arguments were already bound, so we don't need to do bindings. - yield return false; - yield break; - } - - // Find matches in answers. - IEnumerator[] iterators = new IEnumerator[arguments.Length]; - // Debug: If the caller asserts another answer into this same predicate during yield, the iterator - // over clauses will be corrupted. Should we take the time to copy answers? - foreach (object[] answer in answers) - { - bool gotMatch = true; - int nIterators = 0; - // Try to bind all the arguments. - for (int i = 0; i < arguments.Length; ++i) - { - if (indexArgs[i] != null) - // We already matched this argument by looking up _indexedAnswers. - continue; - - IEnumerator iterator = YP.unify(arguments[i], answer[i]).GetEnumerator(); - iterators[nIterators++] = iterator; - // MoveNext() is true if YP.unify succeeds. - if (!iterator.MoveNext()) - { - gotMatch = false; - break; - } - } - int z = 0; - try - { - if (gotMatch) - yield return false; - } - finally - { - // Manually finalize all the iterators. - for (z = 0; z < nIterators; ++z) - iterators[z].Dispose(); - } - } - } - - public IEnumerable clause(object Head, object Body) - { - Head = YP.getValue(Head); - if (Head is Variable) - throw new PrologException("instantiation_error", "Head is an unbound variable"); - object[] arguments = YP.getFunctorArgs(Head); - - // We always match Head from _allAnswers, and the Body is Atom.a("true"). - #pragma warning disable 0168, 0219 - foreach (bool l1 in YP.unify(Body, Atom.a("true"))) - { - // The caller can assert another answer into this same predicate during yield, so we have to - // make a copy of the answers. - foreach (object[] answer in _allAnswers.ToArray()) - { - foreach (bool l2 in YP.unifyArrays(arguments, answer)) - yield return false; - } - } - #pragma warning restore 0168, 0219 - } - - public IEnumerable retract(object Head, object Body) - { - Head = YP.getValue(Head); - if (Head is Variable) - throw new PrologException("instantiation_error", "Head is an unbound variable"); - object[] arguments = YP.getFunctorArgs(Head); - - // We always match Head from _allAnswers, and the Body is Atom.a("true"). - #pragma warning disable 0168, 0219 - foreach (bool l1 in YP.unify(Body, Atom.a("true"))) - { - // The caller can assert another answer into this same predicate during yield, so we have to - // make a copy of the answers. - foreach (object[] answer in _allAnswers.ToArray()) - { - foreach (bool l2 in YP.unifyArrays(arguments, answer)) - { - _allAnswers.Remove(answer); - clearIndexes(); - yield return false; - } - } - } - #pragma warning restore 0168, 0219 - } - - /// - /// After retracting or prepending an answer in _allAnswers, the indexes are invalid, so clear them. - /// - private void clearIndexes() - { - _indexedAnswers.Clear(); - _gotAnswersForSignature.Clear(); - } - - /// - /// A HashedList extends an ArrayList with methods to get a hash and to check equality - /// based on the elements of the list. - /// - public class HashedList : ArrayList - { - private bool _gotHashCode = false; - private int _hashCode; - - public HashedList() - : base() - { - } - - public HashedList(int capacity) - : base(capacity) - { - } - - public HashedList(ICollection c) - : base(c) - { - } - - // Debug: Should override all the other methods that change this. - public override int Add(object value) - { - _gotHashCode = false; - return base.Add(value); - } - - public override int GetHashCode() - { - if (!_gotHashCode) - { - int hashCode = 1; - foreach (object obj in this) - hashCode = 31 * hashCode + (obj == null ? 0 : obj.GetHashCode()); - _hashCode = hashCode; - _gotHashCode = true; - } - return _hashCode; - } - - public override bool Equals(object obj) - { - if (!(obj is ArrayList)) - return false; - - ArrayList objList = (ArrayList)obj; - if (objList.Count != Count) - return false; - - for (int i = 0; i < Count; ++i) - { - object value = objList[i]; - if (value == null) - { - if (this[i] != null) - return false; - } - else - { - if (!value.Equals(this[i])) - return false; - } - } - return true; - } - } - - /// - /// If we keep an index on value, return the value, or null if we don't index it. - /// - /// the term to examine. Assume you already called YP.getValue(value) - /// - public static object getIndexValue(object value) - { - if (value is Atom || value is string || value is Int32 || value is DateTime) - return value; - else - return null; - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/ListPair.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/ListPair.cs deleted file mode 100644 index daac0ba..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/ListPair.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class ListPair : Functor2 - { - public ListPair(object head, object tail) : base(Atom.DOT, head, tail) - { - } - - public static object make(List list) - { - if (list.Count <= 0) - return Atom.NIL; - - object result = Atom.NIL; - // Start from the end. - for (int i = list.Count - 1; i >= 0; --i) - result = new ListPair(list[i], result); - return result; - } - - public static object make(object[] array) - { - if (array.Length <= 0) - return Atom.NIL; - - object result = Atom.NIL; - // Start from the end. - for (int i = array.Length - 1; i >= 0; --i) - result = new ListPair(array[i], result); - return result; - } - - /// - /// Return a ListPair version of array, where repeated elements - /// (according to YP.termEqual) are removed. - /// - /// - /// - public static object makeWithoutRepeatedTerms(object[] array) - { - if (array.Length <= 0) - return Atom.NIL; - - // Start from the end. - object previousTerm = array[array.Length - 1]; - object result = new ListPair(previousTerm, Atom.NIL); - for (int i = array.Length - 2; i >= 0; --i) - { - object term = array[i]; - if (YP.termEqual(term, previousTerm)) - continue; - result = new ListPair(term, result); - previousTerm = term; - } - return result; - } - - /// - /// Return a ListPair version of array, where repeated elements - /// (according to YP.termEqual) are removed. - /// - /// - /// - public static object makeWithoutRepeatedTerms(List array) - { - if (array.Count <= 0) - return Atom.NIL; - - // Start from the end. - object previousTerm = array[array.Count - 1]; - object result = new ListPair(previousTerm, Atom.NIL); - for (int i = array.Count - 2; i >= 0; --i) - { - object term = array[i]; - if (YP.termEqual(term, previousTerm)) - continue; - result = new ListPair(term, result); - previousTerm = term; - } - return result; - } - - public static object make(object element1) - { - return new ListPair(element1, Atom.NIL); - } - - public static object make(object element1, object element2) - { - return new ListPair(element1, new ListPair(element2, Atom.NIL)); - } - - public static object make(object element1, object element2, object element3) - { - return new ListPair(element1, - new ListPair(element2, new ListPair(element3, Atom.NIL))); - } - - /// - /// Return an array of the elements in list or null if it is not - /// a proper list. If list is Atom.NIL, return an array of zero elements. - /// If the list or one of the tails of the list is Variable, raise an instantiation_error. - /// This does not call YP.getValue on each element. - /// - /// - /// - public static object[] toArray(object list) - { - list = YP.getValue(list); - if (list.Equals(Atom.NIL)) - return new object[0]; - - List result = new List(); - object element = list; - while (true) { - if (element == Atom.NIL) - break; - if (element is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "List tail is an unbound variable"); - if (!(element is Functor2 && ((Functor2)element)._name == Atom.DOT)) - // Not a proper list. - return null; - result.Add(((Functor2)element)._arg1); - element = YP.getValue(((Functor2)element)._arg2); - } - - if (result.Count <= 0) - return null; - return result.ToArray(); - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs deleted file mode 100644 index 34010e7..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs +++ /dev/null @@ -1,4575 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219, 0162 - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class Parser - { - public static IEnumerable read_term2(object Term, object Options) - { - Variable Answer = new Variable(); - Variable Variables = new Variable(); - foreach (bool l1 in read_termOptions(Options, Variables)) - { - foreach (bool l2 in portable_read3(Answer, Variables, new Variable())) - { - foreach (bool l3 in remove_pos(Answer, Term)) - yield return false; - } - } - } - - public static IEnumerable read_term3(object Input, object Term, object Options) - { - Variable SaveInput = new Variable(); - Variable Answer = new Variable(); - Variable Variables = new Variable(); - foreach (bool l1 in read_termOptions(Options, Variables)) - { - foreach (bool l2 in YP.current_input(SaveInput)) - { - try - { - YP.see(Input); - foreach (bool l3 in portable_read3(Answer, Variables, new Variable())) - { - foreach (bool l4 in remove_pos(Answer, Term)) - yield return false; - } - } - finally - { - YP.see(SaveInput); - } - } - } - } - - /// - /// For read_term, check if Options has variable_names(Variables). - /// Otherwise, ignore Options. - /// - /// - /// - /// - private static IEnumerable read_termOptions(object Options, object Variables) - { - Options = YP.getValue(Options); - if (Options is Variable) - throw new PrologException(Atom.a("instantiation_error"), "Options is an unbound variable"); - // First try to match Options = [variable_names(Variables)] - foreach (bool l1 in YP.unify(Options, ListPair.make(new Functor1("variable_names", Variables)))) - { - yield return false; - yield break; - } - // Default: Ignore Options. - yield return false; - } - - public static IEnumerable read1(object Term) - { - return read_term2(Term, Atom.NIL); - } - - public static IEnumerable read2(object Input, object Term) - { - return read_term3(Input, Term, Atom.NIL); - } - - public static IEnumerable formatError(object Output, object Format, object Arguments) - { - // Debug: Simple implementation for now. - YP.write(Format); - YP.write(Arguments); - YP.nl(); - yield return false; - } - - - // Debug: Hand-modify this central predicate to do tail recursion. - public static IEnumerable read_tokens(object arg1, object arg2, object arg3) - { - bool repeat = true; - while (repeat) - { - repeat = false; - { - object C1 = arg1; - object Dict = arg2; - object Tokens = arg3; - Variable C2 = new Variable(); - if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) - { - if (YP.greaterThanOrEqual(C1, 0)) - { - foreach (bool l4 in YP.get_code(C2)) - { -#if false - foreach (bool l5 in read_tokens(C2, Dict, Tokens)) - { - yield return false; - } -#endif - arg1 = YP.getValue(C2); - arg2 = YP.getValue(Dict); - arg3 = YP.getValue(Tokens); - repeat = true; - } - } - goto cutIf1; - } - if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) - { - foreach (bool l4 in read_identifier(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf2; - } - } - if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) - { - foreach (bool l4 in read_variable(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf3; - } - } - if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) - { - foreach (bool l4 in read_number(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf4; - } - } - if (YP.lessThan(C1, 127)) - { - foreach (bool l3 in read_special(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf5; - } - if (YP.lessThanOrEqual(C1, 160)) - { - foreach (bool l3 in YP.get_code(C2)) - { -#if false - foreach (bool l4 in read_tokens(C2, Dict, Tokens)) - { - yield return false; - } -#endif - arg1 = YP.getValue(C2); - arg2 = YP.getValue(Dict); - arg3 = YP.getValue(Tokens); - repeat = true; - } - goto cutIf6; - } - if (YP.greaterThanOrEqual(C1, 223)) - { - if (YP.notEqual(C1, 247)) - { - foreach (bool l4 in read_identifier(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf7; - } - } - if (YP.greaterThanOrEqual(C1, 192)) - { - if (YP.notEqual(C1, 215)) - { - foreach (bool l4 in read_variable(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf8; - } - } - if (YP.notEqual(C1, 170)) - { - if (YP.notEqual(C1, 186)) - { - foreach (bool l4 in read_symbol(C1, Dict, Tokens)) - { - yield return false; - } - goto cutIf9; - } - } - foreach (bool l2 in read_identifier(C1, Dict, Tokens)) - { - yield return false; - } - cutIf9: - cutIf8: - cutIf7: - cutIf6: - cutIf5: - cutIf4: - cutIf3: - cutIf2: - cutIf1: - { } - } - } - } - - // Compiler output follows. - - class YPInnerClass { } - // static Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } - - public static IEnumerable parseInput(object TermList) - { - { - Variable TermAndVariables = new Variable(); - FindallAnswers findallAnswers1 = new FindallAnswers(TermAndVariables); - foreach (bool l2 in parseInputHelper(TermAndVariables)) - { - findallAnswers1.add(); - } - foreach (bool l2 in findallAnswers1.result(TermList)) - { - yield return false; - } - } - } - - public static IEnumerable parseInputHelper(object arg1) - { - { - Variable Term = new Variable(); - Variable Variables = new Variable(); - Variable Answer = new Variable(); - Variable x4 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("f", Term, Variables))) - { - foreach (bool l3 in YP.repeat()) - { - foreach (bool l4 in portable_read3(Answer, Variables, x4)) - { - foreach (bool l5 in remove_pos(Answer, Term)) - { - if (YP.termEqual(Term, Atom.a("end_of_file"))) - { - yield break; - goto cutIf1; - } - yield return false; - cutIf1: - { } - } - } - } - } - } - } - - public static IEnumerable clear_errors() - { - { - yield return false; - } - } - - public static IEnumerable remove_pos(object arg1, object arg2) - { - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, X)) - { - foreach (bool l3 in YP.unify(arg2, X)) - { - if (YP.var(X)) - { - yield return true; - yield break; - } - } - } - } - { - object X = arg2; - Variable _Pos = new Variable(); - Variable _Name = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("$VAR", _Pos, _Name, X))) - { - if (YP.var(X)) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - Variable H = new Variable(); - Variable T = new Variable(); - Variable NH = new Variable(); - Variable NT = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(NH, NT))) - { - foreach (bool l4 in remove_pos(H, NH)) - { - foreach (bool l5 in remove_pos(T, NT)) - { - yield return false; - } - } - yield break; - } - } - } - { - Variable A = new Variable(); - Variable B = new Variable(); - Variable NA = new Variable(); - Variable NB = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", A, B))) - { - foreach (bool l3 in YP.unify(arg2, new Functor2(",", NA, NB))) - { - foreach (bool l4 in remove_pos(A, NA)) - { - foreach (bool l5 in remove_pos(B, NB)) - { - yield return false; - } - } - yield break; - } - } - } - { - Variable Atom_1 = new Variable(); - Variable _F = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom_1)) - { - foreach (bool l3 in YP.unify(arg2, Atom_1)) - { - foreach (bool l4 in YP.functor(Atom_1, _F, 0)) - { - yield return false; - } - } - } - } - { - object Term = arg1; - object NewTerm = arg2; - Variable Func = new Variable(); - Variable _Pos = new Variable(); - Variable Args = new Variable(); - Variable NArgs = new Variable(); - if (YP.nonvar(Term)) - { - foreach (bool l3 in YP.univ(Term, new ListPair(Func, new ListPair(_Pos, Args)))) - { - foreach (bool l4 in remove_pos(Args, NArgs)) - { - foreach (bool l5 in YP.univ(NewTerm, new ListPair(Func, NArgs))) - { - yield return false; - } - } - } - } - } - } - - public static IEnumerable portable_read_position(object Term, object PosTerm, object Syntax) - { - { - foreach (bool l2 in portable_read(PosTerm, Syntax)) - { - foreach (bool l3 in remove_pos(PosTerm, Term)) - { - yield return false; - } - } - } - } - - public static IEnumerable portable_read(object Answer, object Syntax) - { - { - Variable Tokens = new Variable(); - Variable ParseTokens = new Variable(); - foreach (bool l2 in read_tokens1(Tokens)) - { - foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) - { - foreach (bool l4 in parse2(ParseTokens, Answer)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable portable_read3(object Answer, object Variables, object Syntax) - { - { - Variable Tokens = new Variable(); - Variable ParseTokens = new Variable(); - foreach (bool l2 in read_tokens2(Tokens, Variables)) - { - foreach (bool l3 in remove_comments(Tokens, ParseTokens, Syntax)) - { - foreach (bool l4 in parse2(ParseTokens, Answer)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable remove_comments(object arg1, object arg2, object arg3) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - foreach (bool l4 in YP.unify(arg3, Atom.NIL)) - { - yield return false; - } - } - } - } - { - object Ys = arg2; - Variable S = new Variable(); - Variable E = new Variable(); - Variable Xs = new Variable(); - Variable Zs = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("comment", S, E), Xs))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("comment", S, E), Zs))) - { - foreach (bool l4 in remove_comments(Xs, Ys, Zs)) - { - yield return false; - } - yield break; - } - } - } - { - Variable Pos = new Variable(); - Variable Xs = new Variable(); - Variable Ys = new Variable(); - Variable Pos2 = new Variable(); - Variable Zs = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("/", Atom.a("["), Pos), Xs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("["), Ys))) - { - foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2("list", Pos, Pos2), Zs))) - { - foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) - { - foreach (bool l6 in remove_comments(Xs, Ys, Zs)) - { - yield return false; - } - } - yield break; - } - } - } - } - { - Variable Pos = new Variable(); - Variable Xs = new Variable(); - Variable Ys = new Variable(); - Variable Pos2 = new Variable(); - Variable Zs = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("/", Atom.a("]"), Pos), Xs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("]"), Ys))) - { - foreach (bool l4 in YP.unify(arg3, new ListPair(new Functor2("list", Pos, Pos2), Zs))) - { - foreach (bool l5 in YP.unify(Pos2, YP.add(Pos, 1))) - { - foreach (bool l6 in remove_comments(Xs, Ys, Zs)) - { - yield return false; - } - } - yield break; - } - } - } - } - { - object Zs = arg3; - Variable Token = new Variable(); - Variable Xs = new Variable(); - Variable Ys = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Xs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Token, Ys))) - { - foreach (bool l4 in remove_comments(Xs, Ys, Zs)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable expect(object Token, object arg2, object arg3) - { - { - object Rest = arg3; - foreach (bool l2 in YP.unify(arg2, new ListPair(Token, Rest))) - { - yield return true; - yield break; - } - } - { - object S0 = arg2; - object x3 = arg3; - foreach (bool l2 in syntax_error(ListPair.make(new object[] { Token, Atom.a("or"), Atom.a("operator"), Atom.a("expected") }), S0)) - { - yield return false; - } - } - } - - public static IEnumerable parse2(object Tokens, object Answer) - { - { - Variable Term = new Variable(); - Variable LeftOver = new Variable(); - foreach (bool l2 in clear_errors()) - { - foreach (bool l3 in parse(Tokens, 1200, Term, LeftOver)) - { - foreach (bool l4 in all_read(LeftOver)) - { - foreach (bool l5 in YP.unify(Answer, Term)) - { - yield return false; - } - yield break; - } - } - foreach (bool l3 in syntax_error(Tokens)) - { - yield return false; - } - } - } - } - - public static IEnumerable all_read(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - yield return false; - } - } - { - Variable Token = new Variable(); - Variable S = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S))) - { - foreach (bool l3 in syntax_error(ListPair.make(new object[] { Atom.a("operator"), Atom.a("expected"), Atom.a("after"), Atom.a("expression") }), new ListPair(Token, S))) - { - yield return false; - } - } - } - } - - public static IEnumerable parse(object arg1, object arg2, object arg3, object arg4) - { - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in syntax_error(new ListPair(Atom.a("expression"), new ListPair(Atom.a("expected"), Atom.NIL)), Atom.NIL)) - { - yield return false; - } - } - } - { - object Precedence = arg2; - object Term = arg3; - object LeftOver = arg4; - Variable Token = new Variable(); - Variable RestTokens = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, RestTokens))) - { - foreach (bool l3 in parse5(Token, RestTokens, Precedence, Term, LeftOver)) - { - yield return false; - } - } - } - } - - public static IEnumerable parse5(object arg1, object arg2, object arg3, object arg4, object arg5) - { - { - object S0 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - foreach (bool l2 in YP.unify(arg1, Atom.a("}"))) - { - foreach (bool l3 in cannot_start(Atom.a("}"), S0)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - foreach (bool l2 in YP.unify(arg1, Atom.a("]"))) - { - foreach (bool l3 in cannot_start(Atom.a("]"), S0)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - foreach (bool l2 in YP.unify(arg1, Atom.a(")"))) - { - foreach (bool l3 in cannot_start(Atom.a(")"), S0)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - foreach (bool l3 in cannot_start(Atom.a(","), S0)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - foreach (bool l3 in cannot_start(Atom.a("|"), S0)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Codes = new Variable(); - Variable Term = new Variable(); - Variable A = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("string", Codes))) - { - foreach (bool l3 in YP.current_prolog_flag(Atom.a("double_quotes"), Atom.a("atom"))) - { - foreach (bool l4 in YP.atom_codes(Term, Codes)) - { - foreach (bool l5 in exprtl0(S0, Term, Precedence, Answer, S)) - { - yield return false; - } - } - goto cutIf1; - } - foreach (bool l3 in YP.current_prolog_flag(Atom.a("double_quotes"), Atom.a("chars"))) - { - foreach (bool l4 in YP.atom_codes(A, Codes)) - { - foreach (bool l5 in YP.atom_chars(A, Term)) - { - foreach (bool l6 in exprtl0(S0, Term, Precedence, Answer, S)) - { - yield return false; - } - } - } - goto cutIf2; - } - foreach (bool l3 in YP.unify(Term, Codes)) - { - foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S)) - { - yield return false; - } - } - cutIf2: - cutIf1: - { } - } - } - { - object S0 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Number = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("number", Number))) - { - foreach (bool l3 in exprtl0(S0, Number, Precedence, Answer, S)) - { - yield return false; - } - } - } - { - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("]"), S1))) - { - foreach (bool l4 in read_atom(new Functor2("/", Atom.NIL, 0), S1, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - { - object S1 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Arg1 = new Variable(); - Variable S2 = new Variable(); - Variable RestArgs = new Variable(); - Variable S3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in parse(S1, 999, Arg1, S2)) - { - foreach (bool l4 in read_list(S2, RestArgs, S3)) - { - foreach (bool l5 in exprtl0(S3, new ListPair(Arg1, RestArgs), Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - } - { - object S1 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Term = new Variable(); - Variable S2 = new Variable(); - Variable S3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("("))) - { - foreach (bool l3 in parse(S1, 1200, Term, S2)) - { - foreach (bool l4 in expect(Atom.a(")"), S2, S3)) - { - foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - } - { - object S1 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Term = new Variable(); - Variable S2 = new Variable(); - Variable S3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a(" ("))) - { - foreach (bool l3 in parse(S1, 1200, Term, S2)) - { - foreach (bool l4 in expect(Atom.a(")"), S2, S3)) - { - foreach (bool l5 in exprtl0(S3, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - } - { - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable _Pos = new Variable(); - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("{"), _Pos))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("}"), S1))) - { - foreach (bool l4 in read_atom(Atom.a("{}"), S1, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - { - object S1 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Pos = new Variable(); - Variable Term = new Variable(); - Variable S2 = new Variable(); - Variable S3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("{"), Pos))) - { - foreach (bool l3 in parse(S1, 1200, Term, S2)) - { - foreach (bool l4 in expect(Atom.a("}"), S2, S3)) - { - foreach (bool l5 in exprtl0(S3, new Functor2("{}", Pos, Term), Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - } - { - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Variable_1 = new Variable(); - Variable Name = new Variable(); - Variable Pos = new Variable(); - Variable S1 = new Variable(); - Variable Arg1 = new Variable(); - Variable S2 = new Variable(); - Variable RestArgs = new Variable(); - Variable S3 = new Variable(); - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("var", Variable_1, Name, Pos))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("("), S1))) - { - foreach (bool l4 in parse(S1, 999, Arg1, S2)) - { - foreach (bool l5 in read_args(S2, RestArgs, S3)) - { - foreach (bool l6 in YP.univ(Term, new ListPair(Atom.a("call"), new ListPair(new Functor3("$VAR", Pos, Name, Variable_1), new ListPair(Arg1, RestArgs))))) - { - foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - } - yield break; - } - } - } - { - object S0 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Variable_1 = new Variable(); - Variable Name = new Variable(); - Variable Pos = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("var", Variable_1, Name, Pos))) - { - foreach (bool l3 in exprtl0(S0, new Functor3("$VAR", Pos, Name, Variable_1), Precedence, Answer, S)) - { - yield return false; - } - } - } - { - object S0 = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Atom_1 = new Variable(); - Variable P = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("atom", Atom_1, P))) - { - foreach (bool l3 in read_atom(new Functor2("/", Atom_1, P), S0, Precedence, Answer, S)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_atom(object arg1, object arg2, object Precedence, object Answer, object S) - { - { - Variable _Pos = new Variable(); - Variable Number = new Variable(); - Variable S1 = new Variable(); - Variable Negative = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom.a("-"), _Pos))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor1("number", Number), S1))) - { - foreach (bool l4 in YP.unify(Negative, YP.negate(Number))) - { - foreach (bool l5 in exprtl0(S1, Negative, Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - } - } - { - Variable Functor_1 = new Variable(); - Variable Pos = new Variable(); - Variable S1 = new Variable(); - Variable Arg1 = new Variable(); - Variable S2 = new Variable(); - Variable RestArgs = new Variable(); - Variable S3 = new Variable(); - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Functor_1, Pos))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Atom.a("("), S1))) - { - foreach (bool l4 in parse(S1, 999, Arg1, S2)) - { - foreach (bool l5 in read_args(S2, RestArgs, S3)) - { - foreach (bool l6 in YP.univ(Term, new ListPair(Functor_1, new ListPair(Pos, new ListPair(Arg1, RestArgs))))) - { - foreach (bool l7 in exprtl0(S3, Term, Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - } - yield break; - } - } - } - { - object S0 = arg2; - Variable Op = new Variable(); - Variable Pos = new Variable(); - Variable Oprec = new Variable(); - Variable Aprec = new Variable(); - Variable Flag = new Variable(); - Variable Term = new Variable(); - Variable Arg = new Variable(); - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Op, Pos))) - { - foreach (bool l3 in prefixop(Op, Oprec, Aprec)) - { - foreach (bool l4 in possible_right_operand(S0, Flag)) - { - if (YP.lessThan(Flag, 0)) - { - foreach (bool l6 in YP.univ(Term, new ListPair(Op, new ListPair(Pos, Atom.NIL)))) - { - foreach (bool l7 in exprtl0(S0, Term, Precedence, Answer, S)) - { - yield return false; - } - } - goto cutIf1; - } - if (YP.greaterThan(Oprec, Precedence)) - { - foreach (bool l6 in syntax_error(ListPair.make(new object[] { Atom.a("prefix"), Atom.a("operator"), Op, Atom.a("in"), Atom.a("context"), Atom.a("with"), Atom.a("precedence"), Precedence }), S0)) - { - yield return false; - } - goto cutIf2; - } - if (YP.greaterThan(Flag, 0)) - { - foreach (bool l6 in parse(S0, Aprec, Arg, S1)) - { - foreach (bool l7 in YP.univ(Term, ListPair.make(new object[] { Op, Pos, Arg }))) - { - foreach (bool l8 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - goto cutIf3; - } - foreach (bool l5 in peepop(S0, S1)) - { - foreach (bool l6 in prefix_is_atom(S1, Oprec)) - { - foreach (bool l7 in exprtl(S1, Oprec, new Functor2("/", Op, Pos), Precedence, Answer, S)) - { - yield return false; - } - } - } - foreach (bool l5 in parse(S0, Aprec, Arg, S1)) - { - foreach (bool l6 in YP.univ(Term, ListPair.make(new object[] { Op, Pos, Arg }))) - { - foreach (bool l7 in exprtl(S1, Oprec, Term, Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - cutIf3: - cutIf2: - cutIf1: - { } - } - yield break; - } - } - } - { - object S0 = arg2; - Variable Atom_1 = new Variable(); - Variable Pos = new Variable(); - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", Atom_1, Pos))) - { - foreach (bool l3 in YP.univ(Term, new ListPair(Atom_1, new ListPair(Pos, Atom.NIL)))) - { - foreach (bool l4 in exprtl0(S0, Term, Precedence, Answer, S)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable cannot_start(object Token, object S0) - { - { - foreach (bool l2 in syntax_error(ListPair.make(new object[] { Token, Atom.a("cannot"), Atom.a("start"), Atom.a("an"), Atom.a("expression") }), S0)) - { - yield return false; - } - } - } - - public static IEnumerable read_args(object arg1, object arg2, object arg3) - { - { - object S = arg3; - Variable S1 = new Variable(); - Variable Term = new Variable(); - Variable Rest = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(","), S1))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(Term, Rest))) - { - foreach (bool l4 in parse(S1, 999, Term, S2)) - { - foreach (bool l5 in read_args(S2, Rest, S)) - { - yield return false; - } - yield break; - } - yield break; - } - } - } - { - object S = arg3; - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a(")"), S))) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object S = arg1; - object x2 = arg2; - object x3 = arg3; - foreach (bool l2 in syntax_error(ListPair.make(new object[] { Atom.a(", or )"), Atom.a("expected"), Atom.a("in"), Atom.a("arguments") }), S)) - { - yield return false; - } - } - } - - public static IEnumerable read_list(object arg1, object arg2, object arg3) - { - { - object x1 = arg2; - object x2 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in syntax_error(ListPair.make(new object[] { Atom.a(", | or ]"), Atom.a("expected"), Atom.a("in"), Atom.a("list") }), Atom.NIL)) - { - yield return false; - } - } - } - { - object Rest = arg2; - object S = arg3; - Variable Token = new Variable(); - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) - { - foreach (bool l3 in read_list4(Token, S1, Rest, S)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_list4(object arg1, object arg2, object arg3, object arg4) - { - { - object S1 = arg2; - object S = arg4; - Variable Term = new Variable(); - Variable Rest = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Term, Rest))) - { - foreach (bool l4 in parse(S1, 999, Term, S2)) - { - foreach (bool l5 in read_list(S2, Rest, S)) - { - yield return false; - } - yield break; - } - yield break; - } - } - } - { - object S1 = arg2; - object Rest = arg3; - object S = arg4; - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - foreach (bool l3 in parse(S1, 999, Rest, S2)) - { - foreach (bool l4 in expect(Atom.a("]"), S2, S)) - { - yield return false; - } - yield break; - } - yield break; - } - } - { - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("]"))) - { - foreach (bool l3 in YP.unify(arg2, S1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.NIL)) - { - foreach (bool l5 in YP.unify(arg4, S1)) - { - yield return true; - yield break; - } - } - } - } - } - { - object Token = arg1; - object S1 = arg2; - object x3 = arg3; - object x4 = arg4; - foreach (bool l2 in syntax_error(ListPair.make(new object[] { Atom.a(", | or ]"), Atom.a("expected"), Atom.a("in"), Atom.a("list") }), new ListPair(Token, S1))) - { - yield return false; - } - } - } - - public static IEnumerable possible_right_operand(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - object Flag = arg2; - Variable H = new Variable(); - Variable T = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(H, T))) - { - foreach (bool l3 in possible_right_operand3(H, Flag, T)) - { - yield return false; - } - } - } - } - - public static IEnumerable possible_right_operand3(object arg1, object arg2, object arg3) - { - { - object x4 = arg3; - Variable x1 = new Variable(); - Variable x2 = new Variable(); - Variable x3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("var", x1, x2, x3))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x2 = arg3; - Variable x1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("number", x1))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x2 = arg3; - Variable x1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("string", x1))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a(" ("))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("("))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a(")"))) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - Variable x1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a("]"), x1))) - { - yield return true; - yield break; - } - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("]"))) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - Variable x1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("{"))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, new ListPair(Atom.a("}"), x1))) - { - yield return true; - yield break; - } - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("{"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("}"))) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - object x1 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - object x3 = arg3; - Variable x1 = new Variable(); - Variable x2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("atom", x1, x2))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - yield return false; - } - } - } - } - - public static IEnumerable peepop(object arg1, object arg2) - { - { - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), new ListPair(Atom.a("("), S1)))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor2("atom", F, Pos), new ListPair(Atom.a("("), S1)))) - { - yield return true; - yield break; - } - } - } - { - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable S1 = new Variable(); - Variable L = new Variable(); - Variable P = new Variable(); - Variable R = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), S1))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L, P, R }), S1))) - { - foreach (bool l4 in infixop(F, L, P, R)) - { - yield return false; - } - } - } - } - { - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable S1 = new Variable(); - Variable L = new Variable(); - Variable P = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", F, Pos), S1))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L, P), S1))) - { - foreach (bool l4 in postfixop(F, L, P)) - { - yield return false; - } - } - } - } - { - Variable S0 = new Variable(); - foreach (bool l2 in YP.unify(arg1, S0)) - { - foreach (bool l3 in YP.unify(arg2, S0)) - { - yield return false; - } - } - } - } - - public static IEnumerable prefix_is_atom(object arg1, object arg2) - { - { - object Precedence = arg2; - Variable Token = new Variable(); - Variable x2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, x2))) - { - foreach (bool l3 in prefix_is_atom(Token, Precedence)) - { - yield return false; - } - } - } - { - object P = arg2; - Variable x1 = new Variable(); - Variable L = new Variable(); - Variable x3 = new Variable(); - Variable x4 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a("infixop", Atom.a("")), new object[] { x1, L, x3, x4 }))) - { - if (YP.greaterThanOrEqual(L, P)) - { - yield return false; - } - } - } - { - object P = arg2; - Variable x1 = new Variable(); - Variable L = new Variable(); - Variable x3 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a("postfixop", Atom.a("")), x1, L, x3))) - { - if (YP.greaterThanOrEqual(L, P)) - { - yield return false; - } - } - } - { - object x1 = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a(")"))) - { - yield return false; - } - } - { - object x1 = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("]"))) - { - yield return false; - } - } - { - object x1 = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("}"))) - { - yield return false; - } - } - { - object P = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - if (YP.greaterThanOrEqual(1100, P)) - { - yield return false; - } - } - } - { - object P = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - if (YP.greaterThanOrEqual(1000, P)) - { - yield return false; - } - } - } - { - object x1 = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - yield return false; - } - } - } - - public static IEnumerable exprtl0(object arg1, object arg2, object arg3, object arg4, object arg5) - { - { - object x2 = arg3; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, Term)) - { - foreach (bool l4 in YP.unify(arg4, Term)) - { - foreach (bool l5 in YP.unify(arg5, Atom.NIL)) - { - yield return false; - } - } - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable Token = new Variable(); - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, S1))) - { - foreach (bool l3 in exprtl0_6(Token, Term, Precedence, Answer, S, S1)) - { - yield return false; - } - } - } - } - - public static IEnumerable exprtl0_6(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) - { - { - object x2 = arg3; - object S1 = arg6; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("}"))) - { - foreach (bool l3 in YP.unify(arg2, Term)) - { - foreach (bool l4 in YP.unify(arg4, Term)) - { - foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a("}"), S1))) - { - yield return false; - } - } - } - } - } - { - object x2 = arg3; - object S1 = arg6; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("]"))) - { - foreach (bool l3 in YP.unify(arg2, Term)) - { - foreach (bool l4 in YP.unify(arg4, Term)) - { - foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a("]"), S1))) - { - yield return false; - } - } - } - } - } - { - object x2 = arg3; - object S1 = arg6; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a(")"))) - { - foreach (bool l3 in YP.unify(arg2, Term)) - { - foreach (bool l4 in YP.unify(arg4, Term)) - { - foreach (bool l5 in YP.unify(arg5, new ListPair(Atom.a(")"), S1))) - { - yield return false; - } - } - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - object S1 = arg6; - Variable Next = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - if (YP.greaterThanOrEqual(Precedence, 1000)) - { - foreach (bool l4 in parse(S1, 1000, Next, S2)) - { - foreach (bool l5 in exprtl(S2, 1000, new Functor2(",", Term, Next), Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - goto cutIf1; - } - foreach (bool l3 in YP.unify(Answer, Term)) - { - foreach (bool l4 in YP.unify(S, new ListPair(Atom.a(","), S1))) - { - yield return false; - } - } - cutIf1: - { } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - object S1 = arg6; - Variable Next = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - if (YP.greaterThanOrEqual(Precedence, 1100)) - { - foreach (bool l4 in parse(S1, 1100, Next, S2)) - { - foreach (bool l5 in exprtl(S2, 1100, new Functor2(";", Term, Next), Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - goto cutIf2; - } - foreach (bool l3 in YP.unify(Answer, Term)) - { - foreach (bool l4 in YP.unify(S, new ListPair(Atom.a("|"), S1))) - { - yield return false; - } - } - cutIf2: - { } - } - } - { - object x2 = arg2; - object x3 = arg3; - object x4 = arg4; - object x5 = arg5; - object S1 = arg6; - Variable S = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("string", S))) - { - foreach (bool l3 in cannot_follow(Atom.a("chars"), new Functor1("string", S), S1)) - { - yield return false; - } - } - } - { - object x2 = arg2; - object x3 = arg3; - object x4 = arg4; - object x5 = arg5; - object S1 = arg6; - Variable N = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("number", N))) - { - foreach (bool l3 in cannot_follow(Atom.a("number"), new Functor1("number", N), S1)) - { - yield return false; - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("{"))) - { - foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a("}"), S1))) - { - foreach (bool l4 in exprtl0_atom(Atom.a("{}"), Term, Precedence, Answer, S, S1)) - { - yield return false; - } - yield break; - } - } - } - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - object S1 = arg6; - foreach (bool l2 in YP.unify(arg1, Atom.a("{"))) - { - foreach (bool l3 in cannot_follow(Atom.a("brace"), Atom.a("{"), S1)) - { - yield return false; - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable S1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in YP.unify(arg6, new ListPair(Atom.a("]"), S1))) - { - foreach (bool l4 in exprtl0_atom(Atom.NIL, Term, Precedence, Answer, S, S1)) - { - yield return false; - } - yield break; - } - } - } - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - object S1 = arg6; - foreach (bool l2 in YP.unify(arg1, Atom.a("["))) - { - foreach (bool l3 in cannot_follow(Atom.a("bracket"), Atom.a("["), S1)) - { - yield return false; - } - } - } - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - object S1 = arg6; - foreach (bool l2 in YP.unify(arg1, Atom.a("("))) - { - foreach (bool l3 in cannot_follow(Atom.a("parenthesis"), Atom.a("("), S1)) - { - yield return false; - } - } - } - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - object x4 = arg5; - object S1 = arg6; - foreach (bool l2 in YP.unify(arg1, Atom.a(" ("))) - { - foreach (bool l3 in cannot_follow(Atom.a("parenthesis"), Atom.a("("), S1)) - { - yield return false; - } - } - } - { - object x4 = arg2; - object x5 = arg3; - object x6 = arg4; - object x7 = arg5; - object S1 = arg6; - Variable A = new Variable(); - Variable B = new Variable(); - Variable P = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("var", A, B, P))) - { - foreach (bool l3 in cannot_follow(Atom.a("variable"), new Functor3("var", A, B, P), S1)) - { - yield return false; - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - object S1 = arg6; - Variable F = new Variable(); - Variable P = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("atom", F, P))) - { - foreach (bool l3 in exprtl0_atom(new Functor2("/", F, P), Term, Precedence, Answer, S, S1)) - { - yield return false; - } - } - } - } - - public static IEnumerable exprtl0_atom(object arg1, object arg2, object arg3, object arg4, object arg5, object S1) - { - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable L1 = new Variable(); - Variable O1 = new Variable(); - Variable R1 = new Variable(); - Variable L2 = new Variable(); - Variable O2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos))) - { - foreach (bool l3 in ambigop(F, Precedence, L1, O1, R1, L2, O2)) - { - foreach (bool l4 in prefix_is_atom(S1, Precedence)) - { - foreach (bool l5 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) - { - yield return false; - } - foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable L1 = new Variable(); - Variable O1 = new Variable(); - Variable R1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos))) - { - foreach (bool l3 in infixop(F, L1, O1, R1)) - { - foreach (bool l4 in exprtl(new ListPair(new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L1, O1, R1 }), S1), 0, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - { - object Term = arg2; - object Precedence = arg3; - object Answer = arg4; - object S = arg5; - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable L2 = new Variable(); - Variable O2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("/", F, Pos))) - { - foreach (bool l3 in postfixop(F, L2, O2)) - { - foreach (bool l4 in exprtl(new ListPair(new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L2, O2), S1), 0, Term, Precedence, Answer, S)) - { - yield return false; - } - yield break; - } - } - } - { - object X = arg1; - object x2 = arg2; - object x3 = arg3; - object x4 = arg4; - object x5 = arg5; - Variable x7 = new Variable(); - foreach (bool l2 in syntax_error(ListPair.make(new object[] { new Functor2("-", Atom.a("non"), Atom.a("operator")), X, Atom.a("follows"), Atom.a("expression") }), new ListPair(new Functor2("atom", X, x7), S1))) - { - yield return false; - } - yield break; - } - } - - public static IEnumerable cannot_follow(object Type, object Token, object Tokens) - { - { - foreach (bool l2 in syntax_error(ListPair.make(new object[] { Type, Atom.a("follows"), Atom.a("expression") }), new ListPair(Token, Tokens))) - { - yield return false; - } - } - } - - public static IEnumerable exprtl(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) - { - { - object x1 = arg2; - object x3 = arg4; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, Term)) - { - foreach (bool l4 in YP.unify(arg5, Term)) - { - foreach (bool l5 in YP.unify(arg6, Atom.NIL)) - { - yield return false; - } - } - } - } - } - { - object C = arg2; - object Term = arg3; - object Precedence = arg4; - object Answer = arg5; - object S = arg6; - Variable Token = new Variable(); - Variable Tokens = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Token, Tokens))) - { - foreach (bool l3 in exprtl_7(Token, C, Term, Precedence, Answer, S, Tokens)) - { - yield return false; - } - } - } - } - - public static IEnumerable exprtl_7(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6, object arg7) - { - { - object C = arg2; - object Term = arg3; - object Precedence = arg4; - object Answer = arg5; - object S = arg6; - object S1 = arg7; - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable L = new Variable(); - Variable O = new Variable(); - Variable R = new Variable(); - Variable Other = new Variable(); - Variable S2 = new Variable(); - Variable Expr = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor(Atom.a("infixop", Atom.a("")), new object[] { new Functor2("/", F, Pos), L, O, R }))) - { - if (YP.greaterThanOrEqual(Precedence, O)) - { - if (YP.lessThanOrEqual(C, L)) - { - foreach (bool l5 in parse(S1, R, Other, S2)) - { - foreach (bool l6 in YP.univ(Expr, ListPair.make(new object[] { F, Pos, Term, Other }))) - { - foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) - { - yield return false; - } - } - } - yield break; - } - } - } - } - { - object C = arg2; - object Term = arg3; - object Precedence = arg4; - object Answer = arg5; - object S = arg6; - object S1 = arg7; - Variable F = new Variable(); - Variable Pos = new Variable(); - Variable L = new Variable(); - Variable O = new Variable(); - Variable Expr = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3(Atom.a("postfixop", Atom.a("")), new Functor2("/", F, Pos), L, O))) - { - if (YP.greaterThanOrEqual(Precedence, O)) - { - if (YP.lessThanOrEqual(C, L)) - { - foreach (bool l5 in YP.univ(Expr, ListPair.make(new object[] { F, Pos, Term }))) - { - foreach (bool l6 in peepop(S1, S2)) - { - foreach (bool l7 in exprtl(S2, O, Expr, Precedence, Answer, S)) - { - yield return false; - } - } - } - yield break; - } - } - } - } - { - object C = arg2; - object Term = arg3; - object Precedence = arg4; - object Answer = arg5; - object S = arg6; - object S1 = arg7; - Variable Next = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a(","))) - { - if (YP.greaterThanOrEqual(Precedence, 1000)) - { - if (YP.lessThan(C, 1000)) - { - foreach (bool l5 in parse(S1, 1000, Next, S2)) - { - foreach (bool l6 in exprtl(S2, 1000, new Functor2(",", Term, Next), Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - } - } - } - { - object C = arg2; - object Term = arg3; - object Precedence = arg4; - object Answer = arg5; - object S = arg6; - object S1 = arg7; - Variable Next = new Variable(); - Variable S2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.a("|"))) - { - if (YP.greaterThanOrEqual(Precedence, 1100)) - { - if (YP.lessThan(C, 1100)) - { - foreach (bool l5 in parse(S1, 1100, Next, S2)) - { - foreach (bool l6 in exprtl(S2, 1100, new Functor2(";", Term, Next), Precedence, Answer, S)) - { - yield return false; - } - } - yield break; - } - } - } - } - { - object Token = arg1; - object x2 = arg2; - object x4 = arg4; - object Tokens = arg7; - Variable Term = new Variable(); - foreach (bool l2 in YP.unify(arg3, Term)) - { - foreach (bool l3 in YP.unify(arg5, Term)) - { - foreach (bool l4 in YP.unify(arg6, new ListPair(Token, Tokens))) - { - yield return false; - } - } - } - } - } - - public static IEnumerable syntax_error(object _Message, object _List) - { - { - yield break; - } - foreach (bool l1 in YP.fail()) - { - yield return false; - } - } - - public static IEnumerable syntax_error(object _List) - { - { - yield break; - } - foreach (bool l1 in YP.fail()) - { - yield return false; - } - } - - public static IEnumerable prefixop(object F, object O, object Q) - { - { - foreach (bool l2 in YP.current_op(O, Atom.a("fx"), F)) - { - foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) - { - yield return false; - } - goto cutIf1; - } - foreach (bool l2 in YP.current_op(O, Atom.a("fy"), F)) - { - foreach (bool l3 in YP.unify(Q, O)) - { - yield return false; - } - goto cutIf2; - } - cutIf2: - cutIf1: - { } - } - } - - public static IEnumerable postfixop(object F, object P, object O) - { - { - foreach (bool l2 in YP.current_op(O, Atom.a("xf"), F)) - { - foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) - { - yield return false; - } - goto cutIf1; - } - foreach (bool l2 in YP.current_op(O, Atom.a("yf"), F)) - { - foreach (bool l3 in YP.unify(P, O)) - { - yield return false; - } - goto cutIf2; - } - cutIf2: - cutIf1: - { } - } - } - - public static IEnumerable infixop(object F, object P, object O, object Q) - { - { - foreach (bool l2 in YP.current_op(O, Atom.a("xfy"), F)) - { - foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) - { - foreach (bool l4 in YP.unify(Q, O)) - { - yield return false; - } - } - goto cutIf1; - } - foreach (bool l2 in YP.current_op(O, Atom.a("xfx"), F)) - { - foreach (bool l3 in YP.unify(P, YP.subtract(O, 1))) - { - foreach (bool l4 in YP.unify(Q, P)) - { - yield return false; - } - } - goto cutIf2; - } - foreach (bool l2 in YP.current_op(O, Atom.a("yfx"), F)) - { - foreach (bool l3 in YP.unify(Q, YP.subtract(O, 1))) - { - foreach (bool l4 in YP.unify(P, O)) - { - yield return false; - } - } - goto cutIf3; - } - cutIf3: - cutIf2: - cutIf1: - { } - } - } - - public static IEnumerable ambigop(object F, object Precedence, object L1, object O1, object R1, object L2, object O2) - { - { - foreach (bool l2 in postfixop(F, L2, O2)) - { - if (YP.lessThanOrEqual(O2, Precedence)) - { - foreach (bool l4 in infixop(F, L1, O1, R1)) - { - if (YP.lessThanOrEqual(O1, Precedence)) - { - yield return false; - } - } - } - } - } - } - - public static IEnumerable read_tokens1(object arg1) - { - { - object TokenList = arg1; - Variable C1 = new Variable(); - Variable _X = new Variable(); - Variable ListOfTokens = new Variable(); - foreach (bool l2 in YP.get_code(C1)) - { - foreach (bool l3 in read_tokens(C1, _X, ListOfTokens)) - { - foreach (bool l4 in YP.unify(TokenList, ListOfTokens)) - { - yield return false; - } - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", Atom.a("end_of_file"), 0), Atom.NIL))) - { - yield return false; - } - } - } - - public static IEnumerable read_tokens2(object arg1, object arg2) - { - { - object TokenList = arg1; - object Dictionary = arg2; - Variable C1 = new Variable(); - Variable Dict = new Variable(); - Variable ListOfTokens = new Variable(); - foreach (bool l2 in YP.get_code(C1)) - { - foreach (bool l3 in read_tokens(C1, Dict, ListOfTokens)) - { - foreach (bool l4 in terminate_list(Dict)) - { - foreach (bool l5 in YP.unify(Dictionary, Dict)) - { - foreach (bool l6 in YP.unify(TokenList, ListOfTokens)) - { - yield return false; - } - } - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("atom", Atom.a("end_of_file"), 0), Atom.NIL))) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - yield return false; - } - } - } - } - - public static IEnumerable terminate_list(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - yield return false; - } - } - { - Variable x1 = new Variable(); - Variable Tail = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(x1, Tail))) - { - foreach (bool l3 in terminate_list(Tail)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_special(object arg1, object Dict, object arg3) - { - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 95)) - { - foreach (bool l3 in read_variable(95, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 247)) - { - foreach (bool l3 in read_symbol(247, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 215)) - { - foreach (bool l3 in read_symbol(215, Dict, Tokens)) - { - yield return false; - } - } - } - { - Variable StartPos = new Variable(); - Variable EndPos = new Variable(); - Variable Tokens = new Variable(); - Variable Ch = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 37)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("comment", StartPos, EndPos), Tokens))) - { - foreach (bool l4 in get_current_position(StartPos)) - { - foreach (bool l5 in YP.repeat()) - { - foreach (bool l6 in YP.get_code(Ch)) - { - if (YP.lessThan(Ch, new ListPair(32, Atom.NIL))) - { - if (YP.notEqual(Ch, 9)) - { - if (YP.termNotEqual(Ch, -1)) - { - foreach (bool l10 in get_current_position(EndPos)) - { - foreach (bool l11 in YP.get_code(NextCh)) - { - foreach (bool l12 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - yield break; - } - } - } - } - } - } - } - } - { - object T = arg3; - Variable C2 = new Variable(); - Variable StartPos = new Variable(); - Variable EndPos = new Variable(); - Variable Tokens = new Variable(); - Variable StartPos1 = new Variable(); - Variable NextCh = new Variable(); - Variable Chars = new Variable(); - foreach (bool l2 in YP.unify(arg1, 47)) - { - foreach (bool l3 in YP.get_code(C2)) - { - if (YP.equal(C2, new ListPair(42, Atom.NIL))) - { - foreach (bool l5 in YP.unify(T, new ListPair(new Functor2("comment", StartPos, EndPos), Tokens))) - { - foreach (bool l6 in get_current_position(StartPos1)) - { - foreach (bool l7 in YP.unify(StartPos, YP.subtract(StartPos1, 1))) - { - foreach (bool l8 in read_solidus(32, NextCh)) - { - foreach (bool l9 in get_current_position(EndPos)) - { - foreach (bool l10 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - goto cutIf1; - } - foreach (bool l4 in YP.unify(T, Tokens)) - { - foreach (bool l5 in rest_symbol(C2, Chars, NextCh)) - { - foreach (bool l6 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(47, Chars))) - { - yield return false; - } - } - } - cutIf1: - { } - } - } - } - { - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 33)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom.a("!"), Pos), Tokens))) - { - foreach (bool l4 in get_current_position(Pos)) - { - foreach (bool l5 in YP.get_code(NextCh)) - { - foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 40)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(" ("), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 41)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(")"), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 44)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a(","), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 59)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom.a(";"), Pos), Tokens))) - { - foreach (bool l4 in get_current_position(Pos)) - { - foreach (bool l5 in YP.get_code(NextCh)) - { - foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - { - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 91)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("["), Pos), Tokens))) - { - foreach (bool l4 in get_current_position(Pos)) - { - foreach (bool l5 in YP.get_code(NextCh)) - { - foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - { - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 93)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("]"), Pos), Tokens))) - { - foreach (bool l4 in get_current_position(Pos)) - { - foreach (bool l5 in YP.get_code(NextCh)) - { - foreach (bool l6 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - { - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 123)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("/", Atom.a("{"), Pos), Tokens))) - { - foreach (bool l4 in get_current_position(Pos)) - { - foreach (bool l5 in YP.get_code(NextCh)) - { - foreach (bool l6 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 124)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("|"), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 125)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("}"), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - object Tokens = arg3; - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 46)) - { - foreach (bool l3 in YP.get_code(NextCh)) - { - foreach (bool l4 in read_fullstop(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - { - Variable Chars = new Variable(); - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 34)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1("string", Chars), Tokens))) - { - foreach (bool l4 in read_string(Chars, 34, NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - { - object Tokens = arg3; - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 39)) - { - foreach (bool l3 in read_string(Chars, 39, NextCh)) - { - foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, Chars)) - { - yield return false; - } - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 35)) - { - foreach (bool l3 in read_symbol(35, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 36)) - { - foreach (bool l3 in read_symbol(36, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 38)) - { - foreach (bool l3 in read_symbol(38, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 42)) - { - foreach (bool l3 in read_symbol(42, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 43)) - { - foreach (bool l3 in read_symbol(43, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 45)) - { - foreach (bool l3 in read_symbol(45, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 58)) - { - foreach (bool l3 in read_symbol(58, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 60)) - { - foreach (bool l3 in read_symbol(60, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 61)) - { - foreach (bool l3 in read_symbol(61, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 62)) - { - foreach (bool l3 in read_symbol(62, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 63)) - { - foreach (bool l3 in read_symbol(63, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 64)) - { - foreach (bool l3 in read_symbol(64, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 92)) - { - foreach (bool l3 in read_symbol(92, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 94)) - { - foreach (bool l3 in read_symbol(94, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 96)) - { - foreach (bool l3 in read_symbol(96, Dict, Tokens)) - { - yield return false; - } - } - } - { - object Tokens = arg3; - foreach (bool l2 in YP.unify(arg1, 126)) - { - foreach (bool l3 in read_symbol(126, Dict, Tokens)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_symbol(object C1, object Dict, object Tokens) - { - { - Variable C2 = new Variable(); - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.get_code(C2)) - { - foreach (bool l3 in rest_symbol(C2, Chars, NextCh)) - { - foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(C1, Chars))) - { - yield return false; - } - } - } - } - } - - public static IEnumerable rest_symbol(object arg1, object arg2, object arg3) - { - { - object C2 = arg1; - object LastCh = arg3; - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(C2, Chars))) - { - if (YP.greaterThan(C2, 160)) - { - if (YP.lessThan(C2, 192)) - { - if (YP.notEqual(C2, 186)) - { - if (YP.notEqual(C2, 170)) - { - foreach (bool l7 in YP.get_code(NextCh)) - { - foreach (bool l8 in rest_symbol(NextCh, Chars, LastCh)) - { - yield return false; - } - } - yield break; - } - } - } - goto cutIf1; - } - foreach (bool l3 in symbol_char(C2)) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in rest_symbol(NextCh, Chars, LastCh)) - { - yield return false; - } - } - yield break; - } - cutIf1: - { } - } - } - { - Variable C2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, C2)) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - foreach (bool l4 in YP.unify(arg3, C2)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable symbol_char(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, 35)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 36)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 38)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 42)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 43)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 45)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 46)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 47)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 58)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 60)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 61)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 62)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 63)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 64)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 92)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 94)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 96)) - { - yield return false; - } - } - { - foreach (bool l2 in YP.unify(arg1, 126)) - { - yield return false; - } - } - } - - public static IEnumerable get_current_position(object Pos) - { - { - foreach (bool l2 in YP.unify(Pos, 0)) - { - yield return false; - } - } - } - - public static IEnumerable read_after_atom4(object Ch, object Dict, object arg3, object Chars) - { - { - Variable Atom_1 = new Variable(); - Variable Pos = new Variable(); - Variable Tokens = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor2("atom", Atom_1, Pos), Tokens))) - { - foreach (bool l3 in YP.unify(Pos, 0)) - { - foreach (bool l4 in YP.atom_codes(Atom_1, Chars)) - { - foreach (bool l5 in read_after_atom(Ch, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - - public static IEnumerable read_after_atom(object arg1, object Dict, object arg3) - { - { - Variable Tokens = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, 40)) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("("), Tokens))) - { - foreach (bool l4 in YP.get_code(NextCh)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - yield break; - } - } - } - { - object Ch = arg1; - object Tokens = arg3; - foreach (bool l2 in read_tokens(Ch, Dict, Tokens)) - { - yield return false; - } - } - } - - public static IEnumerable read_string(object Chars, object Quote, object NextCh) - { - { - Variable Ch = new Variable(); - Variable Char = new Variable(); - Variable Next = new Variable(); - foreach (bool l2 in YP.get_code(Ch)) - { - foreach (bool l3 in read_char(Ch, Quote, Char, Next)) - { - foreach (bool l4 in rest_string5(Char, Next, Chars, Quote, NextCh)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable rest_string5(object arg1, object arg2, object arg3, object arg4, object arg5) - { - { - object _X = arg4; - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg1, -1)) - { - foreach (bool l3 in YP.unify(arg2, NextCh)) - { - foreach (bool l4 in YP.unify(arg3, Atom.NIL)) - { - foreach (bool l5 in YP.unify(arg5, NextCh)) - { - yield return true; - yield break; - } - } - } - } - } - { - object Char = arg1; - object Next = arg2; - object Quote = arg4; - object NextCh = arg5; - Variable Chars = new Variable(); - Variable Char2 = new Variable(); - Variable Next2 = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(Char, Chars))) - { - foreach (bool l3 in read_char(Next, Quote, Char2, Next2)) - { - foreach (bool l4 in rest_string5(Char2, Next2, Chars, Quote, NextCh)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable escape_char(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, 110)) - { - foreach (bool l3 in YP.unify(arg2, 10)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 78)) - { - foreach (bool l3 in YP.unify(arg2, 10)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 116)) - { - foreach (bool l3 in YP.unify(arg2, 9)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 84)) - { - foreach (bool l3 in YP.unify(arg2, 9)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 114)) - { - foreach (bool l3 in YP.unify(arg2, 13)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 82)) - { - foreach (bool l3 in YP.unify(arg2, 13)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 118)) - { - foreach (bool l3 in YP.unify(arg2, 11)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 86)) - { - foreach (bool l3 in YP.unify(arg2, 11)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 98)) - { - foreach (bool l3 in YP.unify(arg2, 8)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 66)) - { - foreach (bool l3 in YP.unify(arg2, 8)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 102)) - { - foreach (bool l3 in YP.unify(arg2, 12)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 70)) - { - foreach (bool l3 in YP.unify(arg2, 12)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 101)) - { - foreach (bool l3 in YP.unify(arg2, 27)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 69)) - { - foreach (bool l3 in YP.unify(arg2, 27)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 100)) - { - foreach (bool l3 in YP.unify(arg2, 127)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 68)) - { - foreach (bool l3 in YP.unify(arg2, 127)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 115)) - { - foreach (bool l3 in YP.unify(arg2, 32)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 83)) - { - foreach (bool l3 in YP.unify(arg2, 32)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 122)) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, 90)) - { - foreach (bool l3 in YP.unify(arg2, -1)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_variable(object C1, object Dict, object arg3) - { - { - Variable Var = new Variable(); - Variable Name = new Variable(); - Variable StartPos = new Variable(); - Variable Tokens = new Variable(); - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor3("var", Var, Name, StartPos), Tokens))) - { - foreach (bool l3 in get_current_position(StartPos)) - { - foreach (bool l4 in read_name(C1, Chars, NextCh)) - { - foreach (bool l5 in YP.atom_codes(Name, Chars)) - { - if (YP.termEqual(Name, Atom.a("_"))) - { - foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - goto cutIf1; - } - foreach (bool l6 in read_lookup(Dict, Name, Var)) - { - foreach (bool l7 in read_after_atom(NextCh, Dict, Tokens)) - { - yield return false; - } - } - cutIf1: - { } - } - } - } - } - } - } - - public static IEnumerable read_lookup(object arg1, object Name, object Var) - { - { - Variable N = new Variable(); - Variable V = new Variable(); - Variable L = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("=", N, V), L))) - { - foreach (bool l3 in YP.unify(N, Name)) - { - foreach (bool l4 in YP.unify(V, Var)) - { - yield return false; - } - goto cutIf1; - } - foreach (bool l3 in read_lookup(L, Name, Var)) - { - yield return false; - } - cutIf1: - { } - } - } - } - - public static IEnumerable read_solidus(object Ch, object LastCh) - { - { - Variable NextCh = new Variable(); - if (YP.equal(Ch, 42)) - { - foreach (bool l3 in YP.get_code(NextCh)) - { - if (YP.equal(NextCh, 47)) - { - foreach (bool l5 in YP.get_code(LastCh)) - { - yield return false; - } - goto cutIf2; - } - foreach (bool l4 in read_solidus(NextCh, LastCh)) - { - yield return false; - } - cutIf2: - { } - } - goto cutIf1; - } - if (YP.notEqual(Ch, -1)) - { - foreach (bool l3 in YP.get_code(NextCh)) - { - foreach (bool l4 in read_solidus(NextCh, LastCh)) - { - yield return false; - } - } - goto cutIf3; - } - foreach (bool l2 in YP.unify(LastCh, Ch)) - { - foreach (bool l3 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in /*comment~n"), Atom.NIL)) - { - yield return false; - } - } - cutIf3: - cutIf1: - { } - } - } - - public static IEnumerable read_identifier(object C1, object Dict, object Tokens) - { - { - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in read_name(C1, Chars, NextCh)) - { - foreach (bool l3 in read_after_atom4(NextCh, Dict, Tokens, Chars)) - { - yield return false; - } - } - } - } - - public static IEnumerable read_name(object C1, object arg2, object LastCh) - { - { - Variable Chars = new Variable(); - Variable C2 = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) - { - foreach (bool l3 in YP.get_code(C2)) - { - if (YP.greaterThanOrEqual(C2, new ListPair(97, Atom.NIL))) - { - if (YP.lessThanOrEqual(C2, new ListPair(122, Atom.NIL))) - { - foreach (bool l6 in read_name(C2, Chars, LastCh)) - { - yield return false; - } - goto cutIf2; - } - if (YP.lessThan(C2, 192)) - { - if (YP.notEqual(YP.bitwiseOr(C2, 16), 186)) - { - foreach (bool l7 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l8 in YP.unify(LastCh, C2)) - { - yield return false; - } - } - goto cutIf3; - } - } - if (YP.equal(YP.bitwiseOr(C2, 32), 247)) - { - foreach (bool l6 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l7 in YP.unify(LastCh, C2)) - { - yield return false; - } - } - goto cutIf4; - } - foreach (bool l5 in read_name(C2, Chars, LastCh)) - { - yield return false; - } - cutIf4: - cutIf3: - cutIf2: - goto cutIf1; - } - if (YP.greaterThanOrEqual(C2, new ListPair(65, Atom.NIL))) - { - if (YP.greaterThan(C2, new ListPair(90, Atom.NIL))) - { - if (YP.notEqual(C2, new ListPair(95, Atom.NIL))) - { - foreach (bool l7 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l8 in YP.unify(LastCh, C2)) - { - yield return false; - } - } - goto cutIf6; - } - } - foreach (bool l5 in read_name(C2, Chars, LastCh)) - { - yield return false; - } - cutIf6: - goto cutIf5; - } - if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) - { - foreach (bool l6 in read_name(C2, Chars, LastCh)) - { - yield return false; - } - goto cutIf7; - } - } - foreach (bool l4 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l5 in YP.unify(LastCh, C2)) - { - yield return false; - } - } - cutIf7: - cutIf5: - cutIf1: - { } - } - } - } - } - - public static IEnumerable read_fullstop(object Ch, object Dict, object Tokens) - { - { - Variable Number = new Variable(); - Variable Tokens1 = new Variable(); - Variable Chars = new Variable(); - Variable NextCh = new Variable(); - if (YP.lessThanOrEqual(Ch, new ListPair(57, Atom.NIL))) - { - if (YP.greaterThanOrEqual(Ch, new ListPair(48, Atom.NIL))) - { - foreach (bool l4 in YP.unify(Tokens, new ListPair(new Functor1("number", Number), Tokens1))) - { - foreach (bool l5 in read_float(Number, Dict, Tokens1, new ListPair(48, Atom.NIL), Ch)) - { - yield return false; - } - } - goto cutIf1; - } - } - if (YP.greaterThan(Ch, new ListPair(32, Atom.NIL))) - { - foreach (bool l3 in rest_symbol(Ch, Chars, NextCh)) - { - foreach (bool l4 in read_after_atom4(NextCh, Dict, Tokens, new ListPair(46, Chars))) - { - yield return false; - } - } - goto cutIf2; - } - if (YP.greaterThanOrEqual(Ch, 0)) - { - foreach (bool l3 in YP.unify(Tokens, Atom.NIL)) - { - yield return false; - } - goto cutIf3; - } - foreach (bool l2 in formatError(Atom.a("user_error"), Atom.a("~N** end of file just after full stop~n"), Atom.NIL)) - { - } - cutIf3: - cutIf2: - cutIf1: - { } - } - } - - public static IEnumerable read_float(object Number, object Dict, object Tokens, object Digits, object Digit) - { - { - Variable Chars = new Variable(); - Variable Rest = new Variable(); - Variable NextCh = new Variable(); - foreach (bool l2 in prepend(Digits, Chars, Rest)) - { - foreach (bool l3 in read_float4(Digit, Rest, NextCh, Chars)) - { - foreach (bool l4 in YP.number_codes(Number, Chars)) - { - foreach (bool l5 in read_tokens(NextCh, Dict, Tokens)) - { - yield return false; - } - } - } - } - } - } - - public static IEnumerable prepend(object arg1, object arg2, object arg3) - { - { - object X = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(46, X))) - { - yield return false; - } - } - } - { - object Y = arg3; - Variable C = new Variable(); - Variable Cs = new Variable(); - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(C, Cs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(C, X))) - { - foreach (bool l4 in prepend(Cs, X, Y)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable read_float4(object C1, object arg2, object NextCh, object Total) - { - { - Variable Chars = new Variable(); - Variable C2 = new Variable(); - Variable C3 = new Variable(); - Variable C4 = new Variable(); - Variable More = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) - { - foreach (bool l3 in YP.get_code(C2)) - { - if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) - { - foreach (bool l6 in read_float4(C2, Chars, NextCh, Total)) - { - yield return false; - } - goto cutIf1; - } - } - if (YP.equal(YP.bitwiseOr(C2, 32), new ListPair(101, Atom.NIL))) - { - foreach (bool l5 in YP.get_code(C3)) - { - if (YP.equal(C3, new ListPair(45, Atom.NIL))) - { - foreach (bool l7 in YP.get_code(C4)) - { - foreach (bool l8 in YP.unify(Chars, new ListPair(C2, new ListPair(45, More)))) - { - if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) - { - foreach (bool l11 in read_exponent(C4, More, NextCh)) - { - yield return false; - } - goto cutIf4; - } - } - foreach (bool l9 in YP.unify(More, Atom.NIL)) - { - foreach (bool l10 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) - { - } - } - foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) - { - foreach (bool l10 in YP.unify(NextCh, C4)) - { - yield return false; - } - } - cutIf4: - { } - } - } - goto cutIf3; - } - if (YP.equal(C3, new ListPair(43, Atom.NIL))) - { - foreach (bool l7 in YP.get_code(C4)) - { - foreach (bool l8 in YP.unify(Chars, new ListPair(C2, More))) - { - if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) - { - foreach (bool l11 in read_exponent(C4, More, NextCh)) - { - yield return false; - } - goto cutIf6; - } - } - foreach (bool l9 in YP.unify(More, Atom.NIL)) - { - foreach (bool l10 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) - { - } - } - foreach (bool l9 in YP.unify(More, new ListPair(48, Atom.NIL))) - { - foreach (bool l10 in YP.unify(NextCh, C4)) - { - yield return false; - } - } - cutIf6: - { } - } - } - goto cutIf5; - } - foreach (bool l6 in YP.unify(C4, C3)) - { - foreach (bool l7 in YP.unify(Chars, new ListPair(C2, More))) - { - if (YP.greaterThanOrEqual(C4, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C4, new ListPair(57, Atom.NIL))) - { - foreach (bool l10 in read_exponent(C4, More, NextCh)) - { - yield return false; - } - goto cutIf7; - } - } - foreach (bool l8 in YP.unify(More, Atom.NIL)) - { - foreach (bool l9 in formatError(Atom.a("user_error"), Atom.a("~N** Missing exponent in ~s~n"), new ListPair(Total, Atom.NIL))) - { - } - } - foreach (bool l8 in YP.unify(More, new ListPair(48, Atom.NIL))) - { - foreach (bool l9 in YP.unify(NextCh, C4)) - { - yield return false; - } - } - cutIf7: - { } - } - } - cutIf5: - cutIf3: - { } - } - goto cutIf2; - } - foreach (bool l4 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l5 in YP.unify(NextCh, C2)) - { - yield return false; - } - } - cutIf2: - cutIf1: - { } - } - } - } - } - - public static IEnumerable read_exponent(object C1, object arg2, object NextCh) - { - { - Variable Chars = new Variable(); - Variable C2 = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(C1, Chars))) - { - foreach (bool l3 in YP.get_code(C2)) - { - if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C2, new ListPair(57, Atom.NIL))) - { - foreach (bool l6 in read_exponent(C2, Chars, NextCh)) - { - yield return false; - } - goto cutIf1; - } - } - foreach (bool l4 in YP.unify(Chars, Atom.NIL)) - { - foreach (bool l5 in YP.unify(NextCh, C2)) - { - yield return false; - } - } - cutIf1: - { } - } - } - } - } - - public static IEnumerable read_number(object C1, object Dict, object arg3) - { - { - Variable Number = new Variable(); - Variable Tokens = new Variable(); - Variable C2 = new Variable(); - Variable N = new Variable(); - Variable C = new Variable(); - Variable C3 = new Variable(); - Variable Digits = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor1("number", Number), Tokens))) - { - foreach (bool l3 in read_number4(C1, C2, 0, N)) - { - if (YP.equal(C2, 39)) - { - if (YP.greaterThanOrEqual(N, 2)) - { - if (YP.lessThanOrEqual(N, 36)) - { - foreach (bool l7 in read_based(N, 0, Number, C)) - { - foreach (bool l8 in read_tokens(C, Dict, Tokens)) - { - yield return false; - } - } - goto cutIf2; - } - } - if (YP.equal(N, 0)) - { - foreach (bool l6 in YP.get_code(C3)) - { - foreach (bool l7 in read_char(C3, -1, Number, C)) - { - foreach (bool l8 in read_tokens(C, Dict, Tokens)) - { - yield return false; - } - } - } - goto cutIf3; - } - foreach (bool l5 in formatError(Atom.a("user_error"), Atom.a("~N** ~d' read as ~d '~n"), new ListPair(N, new ListPair(N, Atom.NIL)))) - { - foreach (bool l6 in YP.unify(Number, N)) - { - foreach (bool l7 in YP.unify(C, C2)) - { - foreach (bool l8 in read_tokens(C, Dict, Tokens)) - { - yield return false; - } - } - } - } - cutIf3: - cutIf2: - goto cutIf1; - } - if (YP.equal(C2, 46)) - { - foreach (bool l5 in YP.get_code(C3)) - { - if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C3, new ListPair(57, Atom.NIL))) - { - foreach (bool l8 in YP.number_codes(N, Digits)) - { - foreach (bool l9 in read_float(Number, Dict, Tokens, Digits, C3)) - { - yield return false; - } - } - goto cutIf5; - } - } - foreach (bool l6 in YP.unify(Number, N)) - { - foreach (bool l7 in read_fullstop(C3, Dict, Tokens)) - { - yield return false; - } - } - cutIf5: - { } - } - goto cutIf4; - } - foreach (bool l4 in YP.unify(Number, N)) - { - foreach (bool l5 in read_tokens(C2, Dict, Tokens)) - { - yield return false; - } - } - cutIf4: - cutIf1: - { } - } - } - } - } - - public static IEnumerable read_number4(object C0, object C, object N0, object N) - { - { - Variable N1 = new Variable(); - Variable C1 = new Variable(); - if (YP.greaterThanOrEqual(C0, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C0, new ListPair(57, Atom.NIL))) - { - foreach (bool l4 in YP.unify(N1, YP.add(YP.subtract(YP.multiply(N0, 10), new ListPair(48, Atom.NIL)), C0))) - { - foreach (bool l5 in YP.get_code(C1)) - { - foreach (bool l6 in read_number4(C1, C, N1, N)) - { - yield return false; - } - } - } - goto cutIf1; - } - } - if (YP.equal(C0, 95)) - { - foreach (bool l3 in YP.get_code(C1)) - { - foreach (bool l4 in read_number4(C1, C, N0, N)) - { - yield return false; - } - } - goto cutIf2; - } - foreach (bool l2 in YP.unify(C, C0)) - { - foreach (bool l3 in YP.unify(N, N0)) - { - yield return false; - } - } - cutIf2: - cutIf1: - { } - } - } - - public static IEnumerable read_based(object Base, object N0, object N, object C) - { - { - Variable C1 = new Variable(); - Variable Digit = new Variable(); - Variable N1 = new Variable(); - foreach (bool l2 in YP.get_code(C1)) - { - if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(57, Atom.NIL))) - { - foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, new ListPair(48, Atom.NIL)))) - { - if (YP.lessThan(Digit, Base)) - { - foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) - { - foreach (bool l8 in read_based(Base, N1, N, C)) - { - yield return false; - } - } - goto cutIf2; - } - if (YP.equal(C1, new ListPair(95, Atom.NIL))) - { - foreach (bool l7 in read_based(Base, N0, N, C)) - { - yield return false; - } - goto cutIf3; - } - foreach (bool l6 in YP.unify(N, N0)) - { - foreach (bool l7 in YP.unify(C, C1)) - { - yield return false; - } - } - cutIf3: - cutIf2: - { } - } - goto cutIf1; - } - } - if (YP.greaterThanOrEqual(C1, new ListPair(65, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(90, Atom.NIL))) - { - foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(65, Atom.NIL), 10)))) - { - if (YP.lessThan(Digit, Base)) - { - foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) - { - foreach (bool l8 in read_based(Base, N1, N, C)) - { - yield return false; - } - } - goto cutIf5; - } - if (YP.equal(C1, new ListPair(95, Atom.NIL))) - { - foreach (bool l7 in read_based(Base, N0, N, C)) - { - yield return false; - } - goto cutIf6; - } - foreach (bool l6 in YP.unify(N, N0)) - { - foreach (bool l7 in YP.unify(C, C1)) - { - yield return false; - } - } - cutIf6: - cutIf5: - { } - } - goto cutIf4; - } - } - if (YP.greaterThanOrEqual(C1, new ListPair(97, Atom.NIL))) - { - if (YP.lessThanOrEqual(C1, new ListPair(122, Atom.NIL))) - { - foreach (bool l5 in YP.unify(Digit, YP.subtract(C1, YP.subtract(new ListPair(97, Atom.NIL), 10)))) - { - if (YP.lessThan(Digit, Base)) - { - foreach (bool l7 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) - { - foreach (bool l8 in read_based(Base, N1, N, C)) - { - yield return false; - } - } - goto cutIf8; - } - if (YP.equal(C1, new ListPair(95, Atom.NIL))) - { - foreach (bool l7 in read_based(Base, N0, N, C)) - { - yield return false; - } - goto cutIf9; - } - foreach (bool l6 in YP.unify(N, N0)) - { - foreach (bool l7 in YP.unify(C, C1)) - { - yield return false; - } - } - cutIf9: - cutIf8: - { } - } - goto cutIf7; - } - } - foreach (bool l3 in YP.unify(Digit, 99)) - { - if (YP.lessThan(Digit, Base)) - { - foreach (bool l5 in YP.unify(N1, YP.add(YP.multiply(N0, Base), Digit))) - { - foreach (bool l6 in read_based(Base, N1, N, C)) - { - yield return false; - } - } - goto cutIf10; - } - if (YP.equal(C1, new ListPair(95, Atom.NIL))) - { - foreach (bool l5 in read_based(Base, N0, N, C)) - { - yield return false; - } - goto cutIf11; - } - foreach (bool l4 in YP.unify(N, N0)) - { - foreach (bool l5 in YP.unify(C, C1)) - { - yield return false; - } - } - cutIf11: - cutIf10: - { } - } - cutIf7: - cutIf4: - cutIf1: - { } - } - } - } - - public static IEnumerable read_char(object Char, object Quote, object Result, object Next) - { - { - Variable C1 = new Variable(); - Variable C2 = new Variable(); - Variable C3 = new Variable(); - Variable Ch = new Variable(); - if (YP.equal(Char, 92)) - { - foreach (bool l3 in YP.get_code(C1)) - { - if (YP.lessThan(C1, 0)) - { - foreach (bool l5 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in ~cquoted~c~n"), new ListPair(Quote, new ListPair(Quote, Atom.NIL)))) - { - foreach (bool l6 in YP.unify(Result, -1)) - { - foreach (bool l7 in YP.unify(Next, C1)) - { - yield return false; - } - } - } - goto cutIf2; - } - if (YP.lessThanOrEqual(C1, new ListPair(32, Atom.NIL))) - { - foreach (bool l5 in YP.get_code(C2)) - { - foreach (bool l6 in read_char(C2, Quote, Result, Next)) - { - yield return false; - } - } - goto cutIf3; - } - if (YP.equal(YP.bitwiseOr(C1, 32), new ListPair(99, Atom.NIL))) - { - foreach (bool l5 in YP.get_code(C2)) - { - foreach (bool l6 in read_char(C2, Quote, Result, Next)) - { - yield return false; - } - } - goto cutIf4; - } - if (YP.lessThanOrEqual(C1, new ListPair(55, Atom.NIL))) - { - if (YP.greaterThanOrEqual(C1, new ListPair(48, Atom.NIL))) - { - foreach (bool l6 in YP.get_code(C2)) - { - if (YP.lessThanOrEqual(C2, new ListPair(55, Atom.NIL))) - { - if (YP.greaterThanOrEqual(C2, new ListPair(48, Atom.NIL))) - { - foreach (bool l9 in YP.get_code(C3)) - { - if (YP.lessThanOrEqual(C3, new ListPair(55, Atom.NIL))) - { - if (YP.greaterThanOrEqual(C3, new ListPair(48, Atom.NIL))) - { - foreach (bool l12 in YP.get_code(Next)) - { - foreach (bool l13 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(YP.add(YP.multiply(C1, 8), C2), 8), C3), YP.multiply(73, new ListPair(48, Atom.NIL))))) - { - yield return false; - } - } - goto cutIf7; - } - } - foreach (bool l10 in YP.unify(Next, C3)) - { - foreach (bool l11 in YP.unify(Result, YP.subtract(YP.add(YP.multiply(C1, 8), C2), YP.multiply(9, new ListPair(48, Atom.NIL))))) - { - yield return false; - } - } - cutIf7: - { } - } - goto cutIf6; - } - } - foreach (bool l7 in YP.unify(Next, C2)) - { - foreach (bool l8 in YP.unify(Result, YP.subtract(C1, new ListPair(48, Atom.NIL)))) - { - yield return false; - } - } - cutIf6: - { } - } - goto cutIf5; - } - } - if (YP.equal(C1, new ListPair(94, Atom.NIL))) - { - foreach (bool l5 in YP.get_code(C2)) - { - if (YP.lessThan(C2, 0)) - { - foreach (bool l7 in formatError(Atom.a("user_error"), Atom.a("~N** end of file in ~c..~c^..~c~n"), ListPair.make(new object[] { Quote, 92, Quote }))) - { - foreach (bool l8 in YP.unify(Result, -1)) - { - foreach (bool l9 in YP.unify(Next, C2)) - { - yield return false; - } - } - } - goto cutIf9; - } - if (YP.equal(C2, new ListPair(63, Atom.NIL))) - { - foreach (bool l7 in YP.unify(Result, 127)) - { - foreach (bool l8 in YP.get_code(Next)) - { - yield return false; - } - } - goto cutIf10; - } - foreach (bool l6 in YP.unify(Result, YP.bitwiseAnd(C2, 31))) - { - foreach (bool l7 in YP.get_code(Next)) - { - yield return false; - } - } - cutIf10: - cutIf9: - { } - } - goto cutIf8; - } - foreach (bool l4 in escape_char(C1, Result)) - { - foreach (bool l5 in YP.get_code(Next)) - { - yield return false; - } - goto cutIf11; - } - foreach (bool l4 in YP.unify(Result, C1)) - { - foreach (bool l5 in YP.get_code(Next)) - { - yield return false; - } - } - cutIf11: - cutIf8: - cutIf5: - cutIf4: - cutIf3: - cutIf2: - { } - } - goto cutIf1; - } - if (YP.equal(Char, Quote)) - { - foreach (bool l3 in YP.get_code(Ch)) - { - if (YP.equal(Ch, Quote)) - { - foreach (bool l5 in YP.unify(Result, Quote)) - { - foreach (bool l6 in YP.get_code(Next)) - { - yield return false; - } - } - goto cutIf13; - } - foreach (bool l4 in YP.unify(Result, -1)) - { - foreach (bool l5 in YP.unify(Next, Ch)) - { - yield return false; - } - } - cutIf13: - { } - } - goto cutIf12; - } - if (YP.lessThan(Char, new ListPair(32, Atom.NIL))) - { - if (YP.notEqual(Char, 9)) - { - if (YP.notEqual(Char, 10)) - { - if (YP.notEqual(Char, 13)) - { - foreach (bool l6 in YP.unify(Result, -1)) - { - foreach (bool l7 in YP.unify(Next, Char)) - { - foreach (bool l8 in formatError(Atom.a("user_error"), Atom.a("~N** Strange character ~d ends ~ctoken~c~n"), ListPair.make(new object[] { Char, Quote, Quote }))) - { - yield return false; - } - } - } - goto cutIf14; - } - } - } - } - foreach (bool l2 in YP.unify(Result, Char)) - { - foreach (bool l3 in YP.get_code(Next)) - { - yield return false; - } - } - cutIf14: - cutIf12: - cutIf1: - { } - } - } - #pragma warning restore 0168, 0219, 0162 - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/PrologException.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/PrologException.cs deleted file mode 100644 index 9f5ae3d..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/PrologException.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// A PrologException is used as the exception thrown by YP.throw(Term). - /// - public class PrologException : Exception - { - public readonly object _term; - - /// - /// Create a PrologException with the given Term. The printable exception message is the full Term. - /// - /// the term of the exception - public PrologException(object Term) - : base(YP.getValue(Term).ToString()) - { - _term = YP.makeCopy(Term, new Variable.CopyStore()); - } - - /// - /// Create a PrologException where the Term is error(ErrorTerm, Message). - /// This uses YP.makeCopy to copy the ErrorTerm and Message so that they are valid after unbinding. - /// - /// the error term of the error - /// the message term of the error. If this is a string, it is converted to an - /// Atom so it can be used by Prolog code. - /// Message, converted to a string, is use as the printable exception message. - /// - public PrologException(object ErrorTerm, object Message) - : base(YP.getValue(Message).ToString()) - { - if (Message is string) - Message = Atom.a((string)Message); - _term = YP.makeCopy(new Functor2(Atom.a("error"), ErrorTerm, Message), new Variable.CopyStore()); - } - - public class TypeErrorInfo - { - public readonly Atom _Type; - public readonly object _Culprit; - public readonly object _Message; - - public TypeErrorInfo(Atom Type, object Culprit, object Message) - { - _Type = Type; - _Culprit = Culprit; - _Message = Message; - } - } - /// - /// Return the TypeErrorInfo for this exception, or null if _term does not match - /// error(type_error(Type, Culprit), Message). - /// - /// - public TypeErrorInfo getTypeErrorInfo() - { - if (!(_term is Functor2 && ((Functor2)_term)._name._name == "error")) - return null; - object errorTerm = ((Functor2)_term)._arg1; - if (!(errorTerm is Functor2 && ((Functor2)errorTerm)._name._name == "type_error")) - return null; - if (!(((Functor2)errorTerm)._arg1 is Atom)) - return null; - return new TypeErrorInfo - ((Atom)((Functor2)errorTerm)._arg1, ((Functor2)errorTerm)._arg2, ((Functor2)_term)._arg2); - } - - public class ExistenceErrorInfo - { - public readonly Atom _Type; - public readonly object _Culprit; - public readonly object _Message; - - public ExistenceErrorInfo(Atom Type, object Culprit, object Message) - { - _Type = Type; - _Culprit = Culprit; - _Message = Message; - } - - /// - /// If _Type is procedure and _Culprit is name/artity, return the name. Otherwise return null. - /// - /// - public object getProcedureName() - { - if (!(_Type._name == "procedure" && - _Culprit is Functor2 && ((Functor2)_Culprit)._name == Atom.SLASH)) - return null; - return ((Functor2)_Culprit)._arg1; - } - - /// - /// If _Type is procedure and _Culprit is name/arity and arity is an integer, return the arity. - /// Otherwise return -1. - /// - /// - public int getProcedureArity() - { - if (!(_Type._name == "procedure" && - _Culprit is Functor2 && ((Functor2)_Culprit)._name == Atom.SLASH)) - return -1; - if (!(((Functor2)_Culprit)._arg2 is int)) - return -1; - return (int)((Functor2)_Culprit)._arg2; - } - } - /// - /// Return the ExistenceErrorInfo for this exception, or null if _term does not match - /// error(existence_error(Type, Culprit), Message). If the returned ExistenceErrorInfo _Culprit is - /// procedure, you can use its getProcedureName and getProcedureArity. - /// - /// - public ExistenceErrorInfo getExistenceErrorInfo() - { - if (!(_term is Functor2 && ((Functor2)_term)._name._name == "error")) - return null; - object errorTerm = ((Functor2)_term)._arg1; - if (!(errorTerm is Functor2 && ((Functor2)errorTerm)._name._name == "existence_error")) - return null; - if (!(((Functor2)errorTerm)._arg1 is Atom)) - return null; - return new ExistenceErrorInfo - ((Atom)((Functor2)errorTerm)._arg1, ((Functor2)errorTerm)._arg2, ((Functor2)_term)._arg2); - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs deleted file mode 100644 index f6d5d41..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.YieldProlog")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("http://opensimulator.org")] -[assembly: AssemblyProduct("OpenSim")] -[assembly: AssemblyCopyright("OpenSimulator developers")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8df98e6b-0425-44d6-8d91-2b3b4c56acdf")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("0.7.5.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/UndefinedPredicateException.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/UndefinedPredicateException.cs deleted file mode 100644 index 4b6112f..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/UndefinedPredicateException.cs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// An UndefinedPredicateException extends PrologException to create an existence_error exception. - /// - public class UndefinedPredicateException : PrologException - { - private Atom _predicateName; - private int _arity; - - public UndefinedPredicateException(object message, Atom predicateName, int arity) - : base(new Functor2 - (Atom.a("existence_error"), Atom.a("procedure"), new Functor2(Atom.a("/"), predicateName, arity)), - message) - { - _predicateName = predicateName; - _arity = arity; - } - - public Atom PredicateName - { - get { return _predicateName; } - } - - public int Arity - { - get { return _arity; } - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs deleted file mode 100644 index ea5b7a6..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public interface IUnifiable - { - IEnumerable unify(object arg); - void addUniqueVariables(List variableSet); - object makeCopy(Variable.CopyStore copyStore); - bool termEqual(object term); - bool ground(); - } - - /// - /// A Variable is passed to a function so that it can be unified with - /// value or another Variable. See getValue and unify for details. - /// - public class Variable : IUnifiable - { - // Use _isBound separate from _value so that it can be bound to any value, - // including null. - private bool _isBound = false; - private object _value; - - /// - /// If this Variable is unbound, then just return this Variable. - /// Otherwise, if this has been bound to a value with unify, return the value. - /// If the bound value is another Variable, this follows the "variable chain" - /// to the end and returns the final value, or the final Variable if it is unbound. - /// For more details, see http://yieldprolog.sourceforge.net/tutorial1.html - /// - /// - public object getValue() - { - if (!_isBound) - return this; - - object result = _value; - while (result is Variable) - { - if (!((Variable)result)._isBound) - return result; - - // Keep following the Variable chain. - result = ((Variable)result)._value; - } - - return result; - } - - /// - /// If this Variable is bound, then just call YP.unify to unify this with arg. - /// (Note that if arg is an unbound Variable, then YP.unify will bind it to - /// this Variable's value.) - /// Otherwise, bind this Variable to YP.getValue(arg) and yield once. After the - /// yield, return this Variable to the unbound state. - /// For more details, see http://yieldprolog.sourceforge.net/tutorial1.html - /// - /// - /// - public IEnumerable unify(object arg) - { - if (!_isBound) - { - _value = YP.getValue(arg); - if (_value == this) - // We are unifying this unbound variable with itself, so leave it unbound. - yield return false; - else - { - _isBound = true; - try - { - yield return false; - } - finally - { - // Remove the binding. - _isBound = false; - } - } - } - else - { - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - foreach (bool l1 in YP.unify(this, arg)) - yield return false; - #pragma warning restore 0168, 0219 - } - } - - public override string ToString() - { - object value = getValue(); - if (value == this) - return "_Variable"; - else - return getValue().ToString(); - } - - /// - /// If bound, call YP.addUniqueVariables on the value. Otherwise, if this unbound - /// variable is not already in variableSet, add it. - /// - /// - public void addUniqueVariables(List variableSet) - { - if (_isBound) - YP.addUniqueVariables(getValue(), variableSet); - else - { - if (variableSet.IndexOf(this) < 0) - variableSet.Add(this); - } - } - - /// - /// If bound, return YP.makeCopy for the value, else return copyStore.getCopy(this). - /// However, if copyStore is null, just return this. - /// - /// - /// - public object makeCopy(Variable.CopyStore copyStore) - { - if (_isBound) - return YP.makeCopy(getValue(), copyStore); - else - return copyStore == null ? this : copyStore.getCopy(this); - } - - public bool termEqual(object term) - { - if (_isBound) - return YP.termEqual(getValue(), term); - else - return this == YP.getValue(term); - } - - public bool ground() - { - if (_isBound) - // This is usually called by YP.ground which already did getValue, so this - // should never be reached, but check anyway. - return YP.ground(getValue()); - else - return false; - } - - /// - /// A CopyStore is used by makeCopy to track which Variable objects have - /// been copied. - /// - public class CopyStore - { - private List _inVariableSet = new List(); - private List _outVariableSet = new List(); - - /// - /// If inVariable has already been copied, return its copy. Otherwise, - /// return a fresh Variable associated with inVariable. - /// - /// - /// - public Variable getCopy(Variable inVariable) - { - int index = _inVariableSet.IndexOf(inVariable); - if (index >= 0) - return _outVariableSet[index]; - else - { - Variable outVariable = new Variable(); - _inVariableSet.Add(inVariable); - _outVariableSet.Add(outVariable); - return outVariable; - } - } - - /// - /// Return the number of unique variables that have been copied. - /// - /// - public int getNUniqueVariables() - { - return _inVariableSet.Count; - } - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs deleted file mode 100644 index f2171dd..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ /dev/null @@ -1,2701 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Net.Sockets; -using System.Text; -using System.Text.RegularExpressions; -using log4net; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - /// - /// YP has static methods for general functions in Yield Prolog such as - /// and . - /// - public class YP - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private static Fail _fail = new Fail(); - private static Repeat _repeat = new Repeat(); - private static Dictionary> _predicatesStore = - new Dictionary>(); - private static TextWriter _outputStream = System.Console.Out; - private static TextReader _inputStream = System.Console.In; - private static IndexedAnswers _operatorTable = null; - private static Dictionary _prologFlags = new Dictionary(); - public const int MAX_ARITY = 255; - - /// - /// An IClause is used so that dynamic predicates can call match. - /// - public interface IClause - { - IEnumerable match(object[] args); - IEnumerable clause(object Head, object Body); - } - - /// - /// If value is a Variable, then return its getValue. Otherwise, just - /// return value. You should call YP.getValue on any object that - /// may be a Variable to get the value to pass to other functions in - /// your system that are not part of Yield Prolog, such as math functions - /// or file I/O. - /// For more details, see http://yieldprolog.sourceforge.net/tutorial1.html - /// - /// - /// - public static object getValue(object value) - { - if (value is Variable) - return ((Variable)value).getValue(); - else - return value; - } - - /// - /// If arg1 or arg2 is an object with a unify method (such as Variable or - /// Functor) then just call its unify with the other argument. The object's - /// unify method will bind the values or check for equals as needed. - /// Otherwise, both arguments are "normal" (atomic) values so if they - /// are equal then succeed (yield once), else fail (don't yield). - /// For more details, see http://yieldprolog.sourceforge.net/tutorial1.html - /// - /// - /// - /// - public static IEnumerable unify(object arg1, object arg2) - { - arg1 = getValue(arg1); - arg2 = getValue(arg2); - if (arg1 is IUnifiable) - return ((IUnifiable)arg1).unify(arg2); - else if (arg2 is IUnifiable) - return ((IUnifiable)arg2).unify(arg1); - else - { - // Arguments are "normal" types. - if (arg1.Equals(arg2)) - return new Succeed(); - else - return _fail; - } - } - - /// - /// This is used for the lookup key in _factStore. - /// - public struct NameArity - { - public readonly Atom _name; - public readonly int _arity; - - public NameArity(Atom name, int arity) - { - _name = name; - _arity = arity; - } - - public override bool Equals(object obj) - { - if (obj is NameArity) - { - NameArity nameArity = (NameArity)obj; - return nameArity._name.Equals(_name) && nameArity._arity.Equals(_arity); - } - else - { - return false; - } - } - - public override int GetHashCode() - { - return _name.GetHashCode() ^ _arity.GetHashCode(); - } - } - - /// - /// Convert term to an int. - /// If term is a single-element List, use its first element - /// (to handle the char types like "a"). - /// If can't convert, throw a PrologException for type_error evaluable (because this is only - /// called from arithmetic functions). - /// - /// - /// - public static int convertInt(object term) - { - term = YP.getValue(term); - if (term is Functor2 && ((Functor2)term)._name == Atom.DOT && - YP.getValue(((Functor2)term)._arg2) == Atom.NIL) - // Assume it is a char type like "a". - term = YP.getValue(((Functor2)term)._arg1); - if (term is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Expected a number but the argument is an unbound variable"); - - try - { - return (int)term; - } - catch (InvalidCastException) - { - throw new PrologException - (new Functor2 - ("type_error", Atom.a("evaluable"), - new Functor2(Atom.SLASH, getFunctorName(term), getFunctorArgs(term).Length)), - "Term must be an integer"); - } - } - - /// - /// Convert term to a double. This may convert an int to a double, etc. - /// If term is a single-element List, use its first element - /// (to handle the char types like "a"). - /// If can't convert, throw a PrologException for type_error evaluable (because this is only - /// called from arithmetic functions). - /// - /// - /// - public static double convertDouble(object term) - { - term = YP.getValue(term); - if (term is Functor2 && ((Functor2)term)._name == Atom.DOT && - YP.getValue(((Functor2)term)._arg2) == Atom.NIL) - // Assume it is a char type like "a". - term = YP.getValue(((Functor2)term)._arg1); - if (term is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Expected a number but the argument is an unbound variable"); - - try - { - return Convert.ToDouble(term); - } - catch (InvalidCastException) - { - throw new PrologException - (new Functor2 - ("type_error", Atom.a("evaluable"), - new Functor2(Atom.SLASH, getFunctorName(term), getFunctorArgs(term).Length)), - "Term must be an integer"); - } - } - - /// - /// If term is an integer, set intTerm. - /// If term is a single-element List, use its first element - /// (to handle the char types like "a"). Return true for success, false if can't convert. - /// We use a success return value because throwing an exception is inefficient. - /// - /// - /// - public static bool getInt(object term, out int intTerm) - { - term = YP.getValue(term); - if (term is Functor2 && ((Functor2)term)._name == Atom.DOT && - YP.getValue(((Functor2)term)._arg2) == Atom.NIL) - // Assume it is a char type like "a". - term = YP.getValue(((Functor2)term)._arg1); - - if (term is int) - { - intTerm = (int)term; - return true; - } - - intTerm = 0; - return false; - } - - public static bool equal(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x == (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) == YP.convertDouble(y); - } - - public static bool notEqual(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x != (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) != YP.convertDouble(y); - } - - public static bool greaterThan(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x > (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) > YP.convertDouble(y); - } - - public static bool lessThan(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x < (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) < YP.convertDouble(y); - } - - public static bool greaterThanOrEqual(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x >= (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) >= YP.convertDouble(y); - } - - public static bool lessThanOrEqual(object x, object y) - { - x = YP.getValue(x); - if (x is DateTime) - return (DateTime)x <= (DateTime)YP.getValue(y); - // Assume convertDouble converts an int to a double perfectly. - return YP.convertDouble(x) <= YP.convertDouble(y); - } - - public static object negate(object x) - { - int intX; - if (getInt(x, out intX)) - return -intX; - return -convertDouble(x); - } - - public static object abs(object x) - { - int intX; - if (getInt(x, out intX)) - return Math.Abs(intX); - return Math.Abs(convertDouble(x)); - } - - public static object sign(object x) - { - int intX; - if (getInt(x, out intX)) - return Math.Sign(intX); - return Math.Sign(convertDouble(x)); - } - - // Use toFloat instead of float because it is a reserved keyword. - public static object toFloat(object x) - { - return convertDouble(x); - } - - /// - /// The ISO standard returns an int. - /// - /// - /// - public static object floor(object x) - { - return (int)Math.Floor(convertDouble(x)); - } - - /// - /// The ISO standard returns an int. - /// - /// - /// - public static object truncate(object x) - { - return (int)Math.Truncate(convertDouble(x)); - } - - /// - /// The ISO standard returns an int. - /// - /// - /// - public static object round(object x) - { - return (int)Math.Round(convertDouble(x)); - } - - /// - /// The ISO standard returns an int. - /// - /// - /// - public static object ceiling(object x) - { - return (int)Math.Ceiling(convertDouble(x)); - } - - public static object sin(object x) - { - return Math.Sin(YP.convertDouble(x)); - } - - public static object cos(object x) - { - return Math.Cos(YP.convertDouble(x)); - } - - public static object atan(object x) - { - return Math.Atan(YP.convertDouble(x)); - } - - public static object exp(object x) - { - return Math.Exp(YP.convertDouble(x)); - } - - public static object log(object x) - { - return Math.Log(YP.convertDouble(x)); - } - - public static object sqrt(object x) - { - return Math.Sqrt(convertDouble(x)); - } - - public static object bitwiseComplement(object x) - { - return ~YP.convertInt(x); - } - - public static object add(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return intX + intY; - return convertDouble(x) + convertDouble(y); - } - - public static object subtract(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return intX - intY; - return convertDouble(x) - convertDouble(y); - } - - public static object multiply(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return intX * intY; - return convertDouble(x) * convertDouble(y); - } - - /// - /// Return floating point, even if both arguments are integer. - /// - /// - /// - /// - public static object divide(object x, object y) - { - return convertDouble(x) / convertDouble(y); - } - - public static object intDivide(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return intX / intY; - // Still allow passing a double, but treat as an int. - return (int)convertDouble(x) / (int)convertDouble(y); - } - - public static object mod(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return intX % intY; - // Still allow passing a double, but treat as an int. - return (int)convertDouble(x) % (int)convertDouble(y); - } - - public static object pow(object x, object y) - { - return Math.Pow(YP.convertDouble(x), YP.convertDouble(y)); - } - - public static object bitwiseShiftRight(object x, object y) - { - return YP.convertInt(x) >> YP.convertInt(y); - } - - public static object bitwiseShiftLeft(object x, object y) - { - return YP.convertInt(x) << YP.convertInt(y); - } - - public static object bitwiseAnd(object x, object y) - { - return YP.convertInt(x) & YP.convertInt(y); - } - - public static object bitwiseOr(object x, object y) - { - return YP.convertInt(x) | YP.convertInt(y); - } - - public static object min(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return Math.Min(intX, intY); - return Math.Min(convertDouble(x), convertDouble(y)); - } - - public static object max(object x, object y) - { - int intX, intY; - if (getInt(x, out intX) && getInt(y, out intY)) - return Math.Max(intX, intY); - return Math.Max(convertDouble(x), convertDouble(y)); - } - - public static IEnumerable copy_term(object inTerm, object outTerm) - { - return YP.unify(outTerm, YP.makeCopy(inTerm, new Variable.CopyStore())); - } - - public static void addUniqueVariables(object term, List variableSet) - { - term = YP.getValue(term); - if (term is IUnifiable) - ((IUnifiable)term).addUniqueVariables(variableSet); - } - - public static object makeCopy(object term, Variable.CopyStore copyStore) - { - term = YP.getValue(term); - if (term is IUnifiable) - return ((IUnifiable)term).makeCopy(copyStore); - else - // term is a "normal" type. Assume it is ground. - return term; - } - - /// - /// Sort the array in place according to termLessThan. This does not remove duplicates - /// - /// - public static void sortArray(object[] array) - { - Array.Sort(array, YP.compareTerms); - } - - /// - /// Sort the array in place according to termLessThan. This does not remove duplicates - /// - /// - public static void sortArray(List array) - { - array.Sort(YP.compareTerms); - } - - /// - /// Sort List according to termLessThan, remove duplicates and unify with Sorted. - /// - /// - /// - /// - public static IEnumerable sort(object List, object Sorted) - { - object[] array = ListPair.toArray(List); - if (array == null) - return YP.fail(); - if (array.Length > 1) - sortArray(array); - return YP.unify(Sorted, ListPair.makeWithoutRepeatedTerms(array)); - } - - /// - /// Use YP.unify to unify each of the elements of the two arrays, and yield - /// once if they all unify. - /// - /// - /// - /// - public static IEnumerable unifyArrays(object[] array1, object[] array2) - { - if (array1.Length != array2.Length) - yield break; - - IEnumerator[] iterators = new IEnumerator[array1.Length]; - bool gotMatch = true; - int nIterators = 0; - // Try to bind all the arguments. - for (int i = 0; i < array1.Length; ++i) - { - IEnumerator iterator = YP.unify(array1[i], array2[i]).GetEnumerator(); - iterators[nIterators++] = iterator; - // MoveNext() is true if YP.unify succeeds. - if (!iterator.MoveNext()) - { - gotMatch = false; - break; - } - } - int z = 0; - try - { - if (gotMatch) - yield return false; - } - finally - { - // Manually finalize all the iterators. - for (z = 0; z < nIterators; ++z) - iterators[z].Dispose(); - } - } - - /// - /// Return an iterator (which you can use in a for-in loop) which does - /// zero iterations. This returns a pre-existing iterator which is - /// more efficient than letting the compiler generate a new one. - /// - /// - public static IEnumerable fail() - { - return _fail; - } - - /// - /// Return an iterator (which you can use in a for-in loop) which does - /// one iteration. This returns a pre-existing iterator which is - /// more efficient than letting the compiler generate a new one. - /// - /// - public static IEnumerable succeed() - { - return new Succeed(); - } - - /// - /// Return an iterator (which you can use in a for-in loop) which repeats - /// indefinitely. This returns a pre-existing iterator which is - /// more efficient than letting the compiler generate a new one. - /// - /// - public static IEnumerable repeat() - { - return _repeat; - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219 - public static IEnumerable univ(object Term, object List) - { - Term = YP.getValue(Term); - List = YP.getValue(List); - - if (nonvar(Term)) - return YP.unify(new ListPair - (getFunctorName(Term), ListPair.make(getFunctorArgs(Term))), List); - - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l1 in new ListPair(Name, ArgList).unify(List)) - { - object[] args = ListPair.toArray(ArgList); - if (args == null) - throw new PrologException - (new Functor2("type_error", Atom.a("list"), ArgList), - "Expected a list. Got: " + ArgList.getValue()); - if (args.Length == 0) - // Return the Name, even if it is not an Atom. - return YP.unify(Term, Name); - if (args.Length > MAX_ARITY) - throw new PrologException - (new Functor1("representation_error", Atom.a("max_arity")), - "Functor arity " + args.Length + " may not be greater than " + MAX_ARITY); - if (!atom(Name)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Name), - "Expected an atom. Got: " + Name.getValue()); - - return YP.unify(Term, Functor.make((Atom)YP.getValue(Name), args)); - } - - return YP.fail(); - } - - public static IEnumerable functor(object Term, object FunctorName, object Arity) - { - Term = YP.getValue(Term); - FunctorName = YP.getValue(FunctorName); - Arity = YP.getValue(Arity); - - if (Term is Variable) - { - if (FunctorName is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 2 FunctorName is an unbound variable"); - if (Arity is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 3 Arity is an unbound variable"); - if (!(Arity is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), Arity), "Arity is not an integer"); - if (!YP.atomic(FunctorName)) - throw new PrologException - (new Functor2("type_error", Atom.a("atomic"), FunctorName), "FunctorName is not atomic"); - - if ((int)Arity < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), Arity), - "Arity may not be less than zero"); - else if ((int)Arity == 0) - { - // Just unify Term with the atomic FunctorName. - foreach (bool l1 in YP.unify(Term, FunctorName)) - yield return false; - } - else - { - if ((int)Arity > MAX_ARITY) - throw new PrologException - (new Functor1("representation_error", Atom.a("max_arity")), - "Functor arity " + Arity + " may not be greater than " + MAX_ARITY); - if (!(FunctorName is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), FunctorName), "FunctorName is not an atom"); - // Construct a functor with unbound variables. - object[] args = new object[(int)Arity]; - for (int i = 0; i < args.Length; ++i) - args[i] = new Variable(); - foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args))) - yield return false; - } - } - else - { - foreach (bool l1 in YP.unify(FunctorName, getFunctorName(Term))) - { - foreach (bool l2 in YP.unify(Arity, getFunctorArgs(Term).Length)) - yield return false; - } - } - } - - public static IEnumerable arg(object ArgNumber, object Term, object Value) - { - if (var(ArgNumber)) - throw new PrologException(Atom.a("instantiation_error"), "Arg 1 ArgNumber is an unbound variable"); - int argNumberInt; - if (!getInt(ArgNumber, out argNumberInt)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), ArgNumber), "Arg 1 ArgNumber must be integer"); - if (argNumberInt < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), argNumberInt), - "ArgNumber may not be less than zero"); - - if (YP.var(Term)) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 2 Term is an unbound variable"); - if (!YP.compound(Term)) - throw new PrologException - (new Functor2("type_error", Atom.a("compound"), Term), "Arg 2 Term must be compound"); - - object[] termArgs = YP.getFunctorArgs(Term); - // Silently fail if argNumberInt is out of range. - if (argNumberInt >= 1 && argNumberInt <= termArgs.Length) - { - // The first ArgNumber is at 1, not 0. - foreach (bool l1 in YP.unify(Value, termArgs[argNumberInt - 1])) - yield return false; - } - } - - public static bool termEqual(object Term1, object Term2) - { - Term1 = YP.getValue(Term1); - if (Term1 is IUnifiable) - return ((IUnifiable)Term1).termEqual(Term2); - return Term1.Equals(YP.getValue(Term2)); - } - - public static bool termNotEqual(object Term1, object Term2) - { - return !termEqual(Term1, Term2); - } - - public static bool termLessThan(object Term1, object Term2) - { - Term1 = YP.getValue(Term1); - Term2 = YP.getValue(Term2); - int term1TypeCode = getTypeCode(Term1); - int term2TypeCode = getTypeCode(Term2); - if (term1TypeCode != term2TypeCode) - return term1TypeCode < term2TypeCode; - - // The terms are the same type code. - if (term1TypeCode == -2) - { - // Variable. - // We always check for equality first because we want to be sure - // that less than returns false if the terms are equal, in - // case that the less than check really behaves like less than or equal. - if ((Variable)Term1 != (Variable)Term2) - // The hash code should be unique to a Variable object. - return Term1.GetHashCode() < Term2.GetHashCode(); - return false; - } - if (term1TypeCode == 0) - return ((Atom)Term1)._name.CompareTo(((Atom)Term2)._name) < 0; - if (term1TypeCode == 1) - return ((Functor1)Term1).lessThan((Functor1)Term2); - if (term1TypeCode == 2) - return ((Functor2)Term1).lessThan((Functor2)Term2); - if (term1TypeCode == 3) - return ((Functor3)Term1).lessThan((Functor3)Term2); - if (term1TypeCode == 4) - return ((Functor)Term1).lessThan((Functor)Term2); - - // Type code is -1 for general objects. First compare their type names. - // Note that this puts Double before Int32 as required by ISO Prolog. - string term1TypeName = Term1.GetType().ToString(); - string term2TypeName = Term2.GetType().ToString(); - if (term1TypeName != term2TypeName) - return term1TypeName.CompareTo(term2TypeName) < 0; - - // The terms are the same type name. - if (Term1 is int) - return (int)Term1 < (int)Term2; - else if (Term1 is double) - return (double)Term1 < (double)Term2; - else if (Term1 is DateTime) - return (DateTime)Term1 < (DateTime)Term2; - else if (Term1 is String) - return ((String)Term1).CompareTo((String)Term2) < 0; - // Debug: Should we try arrays, etc.? - - if (!Term1.Equals(Term2)) - // Could be equal or greater than. - return Term1.GetHashCode() < Term2.GetHashCode(); - return false; - } - - /// - /// Type code is -2 if term is a Variable, 0 if it is an Atom, - /// 1 if it is a Functor1, 2 if it is a Functor2, 3 if it is a Functor3, - /// 4 if it is Functor. - /// Otherwise, type code is -1. - /// This does not call YP.getValue(term). - /// - /// - /// - private static int getTypeCode(object term) - { - if (term is Variable) - return -2; - else if (term is Atom) - return 0; - else if (term is Functor1) - return 1; - else if (term is Functor2) - return 2; - else if (term is Functor3) - return 3; - else if (term is Functor) - return 4; - else - return -1; - } - - public static bool termLessThanOrEqual(object Term1, object Term2) - { - if (YP.termEqual(Term1, Term2)) - return true; - return YP.termLessThan(Term1, Term2); - } - - public static bool termGreaterThan(object Term1, object Term2) - { - return !YP.termLessThanOrEqual(Term1, Term2); - } - - public static bool termGreaterThanOrEqual(object Term1, object Term2) - { - // termLessThan should ensure that it returns false if terms are equal, - // so that this would return true. - return !YP.termLessThan(Term1, Term2); - } - - public static int compareTerms(object Term1, object Term2) - { - if (YP.termEqual(Term1, Term2)) - return 0; - else if (YP.termLessThan(Term1, Term2)) - return -1; - else - return 1; - } - - public static bool ground(object Term) - { - Term = YP.getValue(Term); - if (Term is IUnifiable) - return ((IUnifiable)Term).ground(); - return true; - } - - public static IEnumerable current_op - (object Priority, object Specifier, object Operator) - { - if (_operatorTable == null) - { - // Initialize. - _operatorTable = new IndexedAnswers(3); - _operatorTable.addAnswer(new object[] { 1200, Atom.a("xfx"), Atom.a(":-") }); - _operatorTable.addAnswer(new object[] { 1200, Atom.a("xfx"), Atom.a("-->") }); - _operatorTable.addAnswer(new object[] { 1200, Atom.a("fx"), Atom.a(":-") }); - _operatorTable.addAnswer(new object[] { 1200, Atom.a("fx"), Atom.a("?-") }); - _operatorTable.addAnswer(new object[] { 1100, Atom.a("xfy"), Atom.a(";") }); - _operatorTable.addAnswer(new object[] { 1050, Atom.a("xfy"), Atom.a("->") }); - _operatorTable.addAnswer(new object[] { 1000, Atom.a("xfy"), Atom.a(",") }); - _operatorTable.addAnswer(new object[] { 900, Atom.a("fy"), Atom.a("\\+") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("=") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("\\=") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("==") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("\\==") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("@<") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("@=<") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("@>") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("@>=") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("=..") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("is") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("=:=") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("=\\=") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("<") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a("=<") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a(">") }); - _operatorTable.addAnswer(new object[] { 700, Atom.a("xfx"), Atom.a(">=") }); - _operatorTable.addAnswer(new object[] { 600, Atom.a("xfy"), Atom.a(":") }); - _operatorTable.addAnswer(new object[] { 500, Atom.a("yfx"), Atom.a("+") }); - _operatorTable.addAnswer(new object[] { 500, Atom.a("yfx"), Atom.a("-") }); - _operatorTable.addAnswer(new object[] { 500, Atom.a("yfx"), Atom.a("/\\") }); - _operatorTable.addAnswer(new object[] { 500, Atom.a("yfx"), Atom.a("\\/") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("*") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("/") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("//") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("rem") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("mod") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a("<<") }); - _operatorTable.addAnswer(new object[] { 400, Atom.a("yfx"), Atom.a(">>") }); - _operatorTable.addAnswer(new object[] { 200, Atom.a("xfx"), Atom.a("**") }); - _operatorTable.addAnswer(new object[] { 200, Atom.a("xfy"), Atom.a("^") }); - _operatorTable.addAnswer(new object[] { 200, Atom.a("fy"), Atom.a("-") }); - _operatorTable.addAnswer(new object[] { 200, Atom.a("fy"), Atom.a("\\") }); - // Debug: This is hacked in to run the Prolog test suite until we implement op/3. - _operatorTable.addAnswer(new object[] { 20, Atom.a("xfx"), Atom.a("<--") }); - } - - return _operatorTable.match(new object[] { Priority, Specifier, Operator }); - } - - public static IEnumerable atom_length(object atom, object Length) - { - atom = YP.getValue(atom); - Length = YP.getValue(Length); - if (atom is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Expected atom(Arg1) but it is an unbound variable"); - if (!(atom is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), atom), "Arg 1 Atom is not an atom"); - if (!(Length is Variable)) - { - if (!(Length is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), Length), "Length must be var or integer"); - if ((int)Length < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), Length), - "Length must not be less than zero"); - } - return YP.unify(Length, ((Atom)atom)._name.Length); - } - - public static IEnumerable atom_concat(object Start, object End, object Whole) - { - // Debug: Should we try to preserve the _declaringClass? - Start = YP.getValue(Start); - End = YP.getValue(End); - Whole = YP.getValue(Whole); - if (Whole is Variable) - { - if (Start is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Start and arg 3 Whole are both var"); - if (End is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 2 End and arg 3 Whole are both var"); - if (!(Start is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Start), "Arg 1 Start is not an atom"); - if (!(End is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), End), "Arg 2 End is not an atom"); - - foreach (bool l1 in YP.unify(Whole, Atom.a(((Atom)Start)._name + ((Atom)End)._name))) - yield return false; - } - else - { - if (!(Whole is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Whole), "Arg 3 Whole is not an atom"); - bool gotStartLength = false; - int startLength = 0; - if (!(Start is Variable)) - { - if (!(Start is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Start), "Arg 1 Start is not var or atom"); - startLength = ((Atom)Start)._name.Length; - gotStartLength = true; - } - - bool gotEndLength = false; - int endLength = 0; - if (!(End is Variable)) - { - if (!(End is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), End), "Arg 2 End is not var or atom"); - endLength = ((Atom)End)._name.Length; - gotEndLength = true; - } - - // We are doing a search through all possible Start and End which concatenate to Whole. - string wholeString = ((Atom)Whole)._name; - for (int i = 0; i <= wholeString.Length; ++i) - { - // If we got either startLength or endLength, we know the lengths have to match so check - // the lengths instead of constructing an Atom to do it. - if (gotStartLength && startLength != i) - continue; - if (gotEndLength && endLength != wholeString.Length - i) - continue; - foreach (bool l1 in YP.unify(Start, Atom.a(wholeString.Substring(0, i)))) - { - foreach (bool l2 in YP.unify(End, Atom.a(wholeString.Substring(i, wholeString.Length - i)))) - yield return false; - } - } - } - } - - public static IEnumerable sub_atom - (object atom, object Before, object Length, object After, object Sub_atom) - { - // Debug: Should we try to preserve the _declaringClass? - atom = YP.getValue(atom); - Before = YP.getValue(Before); - Length = YP.getValue(Length); - After = YP.getValue(After); - Sub_atom = YP.getValue(Sub_atom); - if (atom is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Expected atom(Arg1) but it is an unbound variable"); - if (!(atom is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), atom), "Arg 1 Atom is not an atom"); - if (!(Sub_atom is Variable)) - { - if (!(Sub_atom is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Sub_atom), "Sub_atom is not var or atom"); - } - - bool beforeIsInt = false; - bool lengthIsInt = false; - bool afterIsInt = false; - if (!(Before is Variable)) - { - if (!(Before is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), Before), "Before must be var or integer"); - beforeIsInt = true; - if ((int)Before < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), Before), - "Before must not be less than zero"); - } - if (!(Length is Variable)) - { - if (!(Length is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), Length), "Length must be var or integer"); - lengthIsInt = true; - if ((int)Length < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), Length), - "Length must not be less than zero"); - } - if (!(After is Variable)) - { - if (!(After is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), After), "After must be var or integer"); - afterIsInt = true; - if ((int)After < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), After), - "After must not be less than zero"); - } - - Atom atomAtom = (Atom)atom; - int atomLength = atomAtom._name.Length; - if (beforeIsInt && lengthIsInt) - { - // Special case: the caller is just trying to extract a substring, so do it quickly. - int xAfter = atomLength - (int)Before - (int)Length; - if (xAfter >= 0) - { - foreach (bool l1 in YP.unify(After, xAfter)) - { - foreach (bool l2 in YP.unify - (Sub_atom, Atom.a(atomAtom._name.Substring((int)Before, (int)Length)))) - yield return false; - } - } - } - else if (afterIsInt && lengthIsInt) - { - // Special case: the caller is just trying to extract a substring, so do it quickly. - int xBefore = atomLength - (int)After - (int)Length; - if (xBefore >= 0) - { - foreach (bool l1 in YP.unify(Before, xBefore)) - { - foreach (bool l2 in YP.unify - (Sub_atom, Atom.a(atomAtom._name.Substring(xBefore, (int)Length)))) - yield return false; - } - } - } - else - { - // We are underconstrained and doing a search, so go through all possibilities. - for (int xBefore = 0; xBefore <= atomLength; ++xBefore) - { - foreach (bool l1 in YP.unify(Before, xBefore)) - { - for (int xLength = 0; xLength <= (atomLength - xBefore); ++xLength) - { - foreach (bool l2 in YP.unify(Length, xLength)) - { - foreach (bool l3 in YP.unify(After, atomLength - (xBefore + xLength))) - { - foreach (bool l4 in YP.unify - (Sub_atom, Atom.a(atomAtom._name.Substring(xBefore, xLength)))) - yield return false; - } - } - } - } - } - } - } - - public static IEnumerable atom_chars(object atom, object List) - { - atom = YP.getValue(atom); - List = YP.getValue(List); - - if (atom is Variable) - { - if (List is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Atom and arg 2 List are both unbound variables"); - object[] codeArray = ListPair.toArray(List); - if (codeArray == null) - throw new PrologException - (new Functor2("type_error", Atom.a("list"), List), "Arg 2 List is not a list"); - - char[] charArray = new char[codeArray.Length]; - for (int i = 0; i < codeArray.Length; ++i) - { - object listAtom = YP.getValue(codeArray[i]); - if (listAtom is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 2 List has an element which is an unbound variable"); - if (!(listAtom is Atom && ((Atom)listAtom)._name.Length == 1)) - throw new PrologException - (new Functor2("type_error", Atom.a("character"), listAtom), - "Arg 2 List has an element which is not a one character atom"); - charArray[i] = ((Atom)listAtom)._name[0]; - } - return YP.unify(atom, Atom.a(new String(charArray))); - } - else - { - if (!(atom is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), atom), "Arg 1 Atom is not var or atom"); - - string atomString = ((Atom)atom)._name; - object charList = Atom.NIL; - // Start from the back to make the list. - for (int i = atomString.Length - 1; i >= 0; --i) - charList = new ListPair(Atom.a(atomString.Substring(i, 1)), charList); - return YP.unify(List, charList); - } - } - - public static IEnumerable atom_codes(object atom, object List) - { - atom = YP.getValue(atom); - List = YP.getValue(List); - - if (atom is Variable) - { - if (List is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Atom and arg 2 List are both unbound variables"); - object[] codeArray = ListPair.toArray(List); - if (codeArray == null) - throw new PrologException - (new Functor2("type_error", Atom.a("list"), List), "Arg 2 List is not a list"); - - char[] charArray = new char[codeArray.Length]; - for (int i = 0; i < codeArray.Length; ++i) - { - int codeInt; - if (!getInt(codeArray[i], out codeInt) || codeInt < 0) - throw new PrologException - (new Functor1("representation_error", Atom.a("character_code")), - "Element of Arg 2 List is not a character code"); - charArray[i] = (char)codeInt; - } - return YP.unify(atom, Atom.a(new String(charArray))); - } - else - { - if (!(atom is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), atom), "Arg 1 Atom is not var or atom"); - - string atomString = ((Atom)atom)._name; - object codeList = Atom.NIL; - // Start from the back to make the list. - for (int i = atomString.Length - 1; i >= 0; --i) - codeList = new ListPair((int)atomString[i], codeList); - return YP.unify(List, codeList); - } - } - - public static IEnumerable number_chars(object Number, object List) - { - Number = YP.getValue(Number); - List = YP.getValue(List); - - if (Number is Variable) - { - if (List is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Number and arg 2 List are both unbound variables"); - object[] codeArray = ListPair.toArray(List); - if (codeArray == null) - throw new PrologException - (new Functor2("type_error", Atom.a("list"), List), "Arg 2 List is not a list"); - - char[] charArray = new char[codeArray.Length]; - for (int i = 0; i < codeArray.Length; ++i) - { - object listAtom = YP.getValue(codeArray[i]); - if (listAtom is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 2 List has an element which is an unbound variable"); - if (!(listAtom is Atom && ((Atom)listAtom)._name.Length == 1)) - throw new PrologException - (new Functor2("type_error", Atom.a("character"), listAtom), - "Arg 2 List has an element which is not a one character atom"); - charArray[i] = ((Atom)listAtom)._name[0]; - } - return YP.unify(Number, parseNumberString(charArray)); - } - else - { - string numberString = null; - // Try converting to an int first. - int intNumber; - if (YP.getInt(Number, out intNumber)) - numberString = intNumber.ToString(); - else - { - if (!YP.number(Number)) - throw new PrologException - (new Functor2("type_error", Atom.a("number"), Number), - "Arg 1 Number is not var or number"); - // We just checked, so convertDouble shouldn't throw an exception. - numberString = YP.doubleToString(YP.convertDouble(Number)); - } - - object charList = Atom.NIL; - // Start from the back to make the list. - for (int i = numberString.Length - 1; i >= 0; --i) - charList = new ListPair(Atom.a(numberString.Substring(i, 1)), charList); - return YP.unify(List, charList); - } - } - - public static IEnumerable number_codes(object Number, object List) - { - Number = YP.getValue(Number); - List = YP.getValue(List); - - if (Number is Variable) - { - if (List is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Number and arg 2 List are both unbound variables"); - object[] codeArray = ListPair.toArray(List); - if (codeArray == null) - throw new PrologException - (new Functor2("type_error", Atom.a("list"), List), "Arg 2 List is not a list"); - - char[] charArray = new char[codeArray.Length]; - for (int i = 0; i < codeArray.Length; ++i) - { - int codeInt; - if (!getInt(codeArray[i], out codeInt) || codeInt < 0) - throw new PrologException - (new Functor1("representation_error", Atom.a("character_code")), - "Element of Arg 2 List is not a character code"); - charArray[i] = (char)codeInt; - } - return YP.unify(Number, parseNumberString(charArray)); - } - else - { - string numberString = null; - // Try converting to an int first. - int intNumber; - if (YP.getInt(Number, out intNumber)) - numberString = intNumber.ToString(); - else - { - if (!YP.number(Number)) - throw new PrologException - (new Functor2("type_error", Atom.a("number"), Number), - "Arg 1 Number is not var or number"); - // We just checked, so convertDouble shouldn't throw an exception. - numberString = YP.doubleToString(YP.convertDouble(Number)); - } - - object codeList = Atom.NIL; - // Start from the back to make the list. - for (int i = numberString.Length - 1; i >= 0; --i) - codeList = new ListPair((int)numberString[i], codeList); - return YP.unify(List, codeList); - } - } - - /// - /// Used by number_chars and number_codes. Return the number in charArray or - /// throw an exception if can't parse. - /// - /// - /// - private static object parseNumberString(char[] charArray) - { - string numberString = new String(charArray); - if (charArray.Length == 3 && numberString.StartsWith("0'")) - // This is a char code. - return (int)charArray[2]; - if (numberString.StartsWith("0x")) - { - try - { - return Int32.Parse - (numberString.Substring(2), System.Globalization.NumberStyles.AllowHexSpecifier); - } - catch (FormatException) - { - throw new PrologException - (new Functor1("syntax_error", Atom.a("number_format: " + numberString)), - "Arg 2 List is not a list for a hexadecimal number"); - } - } - // Debug: Is there a way in C# to ask if a string parses as int without throwing an exception? - try - { - // Try an int first. - return Convert.ToInt32(numberString); - } - catch (FormatException) { } - try - { - return Convert.ToDouble(numberString); - } - catch (FormatException) - { - throw new PrologException - (new Functor1("syntax_error", Atom.a("number_format: " + numberString)), - "Arg 2 List is not a list for a number"); - } - } - - public static IEnumerable char_code(object Char, object Code) - { - Char = YP.getValue(Char); - Code = YP.getValue(Code); - - int codeInt = 0; - if (!(Code is Variable)) - { - // Get codeInt now so we type check it whether or not Char is Variable. - if (!getInt(Code, out codeInt)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), Code), - "Arg 2 Code is not var or a character code"); - if (codeInt < 0) - throw new PrologException - (new Functor1("representation_error", Atom.a("character_code")), - "Arg 2 Code is not a character code"); - } - - if (Char is Variable) - { - if (Code is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Char and arg 2 Code are both unbound variables"); - - return YP.unify(Char, Atom.a(new String(new char[] {(char)codeInt}))); - } - else - { - if (!(Char is Atom) || ((Atom)Char)._name.Length != 1) - throw new PrologException - (new Functor2("type_error", Atom.a("character"), Char), - "Arg 1 Char is not var or one-character atom"); - - if (Code is Variable) - return YP.unify(Code, (int)((Atom)Char)._name[0]); - else - // Use codeInt to handle whether Code is supplied as, e.g., 97 or 0'a . - return YP.unify(codeInt, (int)((Atom)Char)._name[0]); - } - } - - /// - /// If term is an Atom or functor type, return its name. - /// Otherwise, return term. - /// - /// - /// - public static object getFunctorName(object term) - { - term = YP.getValue(term); - if (term is Functor1) - return ((Functor1)term)._name; - else if (term is Functor2) - return ((Functor2)term)._name; - else if (term is Functor3) - return ((Functor3)term)._name; - else if (term is Functor) - return ((Functor)term)._name; - else - return term; - } - - /// - /// If term is an Atom or functor type, return an array of its args. - /// Otherwise, return an empty array. - /// - /// - /// - public static object[] getFunctorArgs(object term) - { - term = YP.getValue(term); - if (term is Functor1) - { - Functor1 functor = (Functor1)term; - return new object[] { functor._arg1 }; - } - else if (term is Functor2) - { - Functor2 functor = (Functor2)term; - return new object[] { functor._arg1, functor._arg2 }; - } - else if (term is Functor3) - { - Functor3 functor = (Functor3)term; - return new object[] { functor._arg1, functor._arg2, functor._arg3 }; - } - else if (term is Functor) { - Functor functor = (Functor)term; - return functor._args; - } - else - return new object[0]; - } - - public static bool var(object Term) - { - return YP.getValue(Term) is Variable; - } - - public static bool nonvar(object Term) - { - return !YP.var(Term); - } - - public static bool atom(object Term) - { - return YP.getValue(Term) is Atom; - } - - public static bool integer(object Term) - { - // Debug: Should exhaustively check for all integer types. - return getValue(Term) is int; - } - - // Use isFloat instead of float because it is a reserved keyword. - public static bool isFloat(object Term) - { - // Debug: Should exhaustively check for all float types. - return getValue(Term) is double; - } - - public static bool number(object Term) - { - return YP.integer(Term) || YP.isFloat(Term); - } - - public static bool atomic(object Term) - { - return YP.atom(Term) || YP.number(Term); - } - - public static bool compound(object Term) - { - Term = getValue(Term); - return Term is Functor1 || Term is Functor2 || Term is Functor3 || Term is Functor; - } - - /// - /// If input is a TextReader, use it. If input is an Atom or String, create a StreamReader with the - /// input as the filename. If input is a Prolog list, then read character codes from it. - /// - /// - public static void see(object input) - { - input = YP.getValue(input); - if (input is Variable) - throw new PrologException(Atom.a("instantiation_error"), "Arg is an unbound variable"); - - if (input == null) - { - _inputStream = null; - return; - } - if (input is TextReader) - { - _inputStream = (TextReader)input; - return; - } - else if (input is Atom) - { - _inputStream = new StreamReader(((Atom)input)._name); - return; - } - else if (input is String) - { - _inputStream = new StreamReader((String)input); - return; - } - else if (input is Functor2 && ((Functor2)input)._name == Atom.DOT) - { - _inputStream = new CodeListReader(input); - return; - } - else - throw new PrologException - (new Functor2("domain_error", Atom.a("stream_or_alias"), input), - "Input stream specifier not recognized"); - } - - public static void seen() - { - if (_inputStream == null) - return; - if (_inputStream == Console.In) - return; - _inputStream.Close(); - _inputStream = Console.In; - } - - public static IEnumerable current_input(object Stream) - { - return YP.unify(Stream, _inputStream); - } - - /// - /// If output is a TextWriter, use it. If output is an Atom or a String, create a StreamWriter - /// with the input as the filename. - /// - /// - public static void tell(object output) - { - output = YP.getValue(output); - if (output is Variable) - throw new PrologException(Atom.a("instantiation_error"), "Arg is an unbound variable"); - - if (output == null) - { - _outputStream = null; - return; - } - if (output is TextWriter) - { - _outputStream = (TextWriter)output; - return; - } - else if (output is Atom) - { - _outputStream = new StreamWriter(((Atom)output)._name); - return; - } - else if (output is String) - { - _outputStream = new StreamWriter((String)output); - return; - } - else - throw new PrologException - (new Functor2("domain_error", Atom.a("stream_or_alias"), output), - "Can't open stream for " + output); - } - - public static void told() - { - if (_outputStream == null) - return; - if (_outputStream == Console.Out) - return; - _outputStream.Close(); - _outputStream = Console.Out; - } - - public static IEnumerable current_output(object Stream) - { - return YP.unify(Stream, _outputStream); - } - - public static void write(object x) - { - if (_outputStream == null) - return; - x = YP.getValue(x); - if (x is double) - _outputStream.Write(doubleToString((double)x)); - else - _outputStream.Write(x.ToString()); - } - - /// - /// Format x as a string, making sure that it won't parse as an int later. I.e., for 1.0, don't just - /// use "1" which will parse as an int. - /// - /// - /// - private static string doubleToString(double x) - { - string xString = x.ToString(); - // Debug: Is there a way in C# to ask if a string parses as int without throwing an exception? - try - { - Convert.ToInt32(xString); - // The string will parse as an int, not a double, so re-format so that it does. - // Use float if possible, else exponential if it would be too big. - return x.ToString(x >= 100000.0 ? "E1" : "f1"); - } - catch (FormatException) - { - // Assume it will parse as a double. - } - return xString; - } - - public static void put_code(object x) - { - if (_outputStream == null) - return; - if (var(x)) - throw new PrologException(Atom.a("instantiation_error"), "Arg 1 is an unbound variable"); - int xInt; - if (!getInt(x, out xInt)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), x), "Arg 1 must be integer"); - _outputStream.Write((char)xInt); - } - - public static void nl() - { - if (_outputStream == null) - return; - _outputStream.WriteLine(); - } - - public static IEnumerable get_code(object code) - { - if (_inputStream == null) - return YP.unify(code, -1); - else - return YP.unify(code, _inputStream.Read()); - } - - public static void asserta(object Term, Type declaringClass) - { - assertDynamic(Term, declaringClass, true); - } - - public static void assertz(object Term, Type declaringClass) - { - assertDynamic(Term, declaringClass, false); - } - - public static void assertDynamic(object Term, Type declaringClass, bool prepend) - { - Term = getValue(Term); - if (Term is Variable) - throw new PrologException("instantiation_error", "Term to assert is an unbound variable"); - - Variable.CopyStore copyStore = new Variable.CopyStore(); - object TermCopy = makeCopy(Term, copyStore); - object Head, Body; - if (TermCopy is Functor2 && ((Functor2)TermCopy)._name == Atom.RULE) - { - Head = YP.getValue(((Functor2)TermCopy)._arg1); - Body = YP.getValue(((Functor2)TermCopy)._arg2); - if (Head is Variable) - throw new PrologException("instantiation_error", "Head to assert is an unbound variable"); - if (Body is Variable) - throw new PrologException("instantiation_error", "Body to assert is an unbound variable"); - } - else - { - Head = TermCopy; - Body = Atom.a("true"); - } - - Atom name = getFunctorName(Head) as Atom; - if (name == null) - // name is a non-Atom, such as a number. - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Head), "Term to assert is not callable"); - object[] args = getFunctorArgs(Head); - if (isSystemPredicate(name, args.Length)) - throw new PrologException - (new Functor3("permission_error", Atom.a("modify"), Atom.a("static_procedure"), - new Functor2(Atom.SLASH, name, args.Length)), - "Assert cannot modify static predicate " + name + "/" + args.Length); - - if (copyStore.getNUniqueVariables() == 0 && Body == Atom.a("true")) - { - // This is a fact with no unbound variables - // assertFact and prependFact use IndexedAnswers, so don't we don't need to compile. - if (prepend) - prependFact(name, args); - else - assertFact(name, args); - - return; - } - - IClause clause = YPCompiler.compileAnonymousClause(Head, Body, declaringClass); - // We expect clause to be a ClauseHeadAndBody (from Compiler.compileAnonymousFunction) - // so we can set the Head and Body. - if (clause is ClauseHeadAndBody) - ((ClauseHeadAndBody)clause).setHeadAndBody(Head, Body); - - // Add the clause to the entry in _predicatesStore. - NameArity nameArity = new NameArity(name, args.Length); - List clauses; - if (!_predicatesStore.TryGetValue(nameArity, out clauses)) - // Create an entry for the nameArity. - _predicatesStore[nameArity] = (clauses = new List()); - - if (prepend) - clauses.Insert(0, clause); - else - clauses.Add(clause); - } - - private static bool isSystemPredicate(Atom name, int arity) - { - if (arity == 2 && (name == Atom.a(",") || name == Atom.a(";") || name == Atom.DOT)) - return true; - // Use the same mapping to static predicates in YP as the compiler. - foreach (bool l1 in YPCompiler.functorCallYPFunctionName(name, arity, new Variable())) - return true; - // Debug: Do we need to check if name._module is null? - return false; - } - - /// - /// Assert values at the end of the set of facts for the predicate with the - /// name and with arity values.Length. - /// - /// must be an Atom - /// the array of arguments to the fact predicate. - /// It is an error if an value has an unbound variable. - public static void assertFact(Atom name, object[] values) - { - NameArity nameArity = new NameArity(name, values.Length); - List clauses; - IndexedAnswers indexedAnswers; - if (!_predicatesStore.TryGetValue(nameArity, out clauses)) - { - // Create an IndexedAnswers as the only clause of the predicate. - _predicatesStore[nameArity] = (clauses = new List()); - clauses.Add(indexedAnswers = new IndexedAnswers(values.Length)); - } - else - { - indexedAnswers = null; - if (clauses.Count >= 1) - indexedAnswers = clauses[clauses.Count - 1] as IndexedAnswers; - if (indexedAnswers == null) - // The latest clause is not an IndexedAnswers, so add one. - clauses.Add(indexedAnswers = new IndexedAnswers(values.Length)); - } - - indexedAnswers.addAnswer(values); - } - - /// - /// Assert values, prepending to the front of the set of facts for the predicate with the - /// name and with arity values.Length. - /// - /// must be an Atom - /// the array of arguments to the fact predicate. - /// It is an error if an value has an unbound variable. - public static void prependFact(Atom name, object[] values) - { - NameArity nameArity = new NameArity(name, values.Length); - List clauses; - IndexedAnswers indexedAnswers; - if (!_predicatesStore.TryGetValue(nameArity, out clauses)) - { - // Create an IndexedAnswers as the only clause of the predicate. - _predicatesStore[nameArity] = (clauses = new List()); - clauses.Add(indexedAnswers = new IndexedAnswers(values.Length)); - } - else - { - indexedAnswers = null; - if (clauses.Count >= 1) - indexedAnswers = clauses[0] as IndexedAnswers; - if (indexedAnswers == null) - // The first clause is not an IndexedAnswers, so prepend one. - clauses.Insert(0, indexedAnswers = new IndexedAnswers(values.Length)); - } - - indexedAnswers.prependAnswer(values); - } - - /// - /// Match all clauses of the dynamic predicate with the name and with arity - /// arguments.Length. - /// If the predicate is not defined, return the result of YP.unknownPredicate. - /// - /// must be an Atom - /// an array of arity number of arguments - /// an iterator which you can use in foreach - public static IEnumerable matchDynamic(Atom name, object[] arguments) - { - List clauses; - if (!_predicatesStore.TryGetValue(new NameArity(name, arguments.Length), out clauses)) - return unknownPredicate(name, arguments.Length, - "Undefined dynamic predicate: " + name + "/" + arguments.Length); - - if (clauses.Count == 1) - // Usually there is only one clause, so return it without needing to wrap it in an iterator. - return clauses[0].match(arguments); - else - return matchAllClauses(clauses, arguments); - } - - /// - /// Call match(arguments) for each IClause in clauses. We make this a separate - /// function so that matchDynamic itself does not need to be an iterator object. - /// - /// - /// - /// - private static IEnumerable matchAllClauses(List clauses, object[] arguments) - { - // Debug: If the caller asserts another clause into this same predicate during yield, the iterator - // over clauses will be corrupted. Should we take the time to copy clauses? - foreach (IClause clause in clauses) - { - foreach (bool lastCall in clause.match(arguments)) - { - yield return false; - if (lastCall) - // This happens after a cut in a clause. - yield break; - } - } - } - - /// - /// If _prologFlags["unknown"] is fail then return fail(), else if - /// _prologFlags["unknown"] is warning then write the message to YP.write and - /// return fail(), else throw a PrologException for existence_error. . - /// - /// - /// - /// - /// - public static IEnumerable unknownPredicate(Atom name, int arity, string message) - { - establishPrologFlags(); - - if (_prologFlags["unknown"] == Atom.a("fail")) - return fail(); - else if (_prologFlags["unknown"] == Atom.a("warning")) - { - write(message); - nl(); - return fail(); - } - else - throw new PrologException - (new Functor2 - (Atom.a("existence_error"), Atom.a("procedure"), - new Functor2(Atom.SLASH, name, arity)), message); - } - - /// - /// This is deprecated and just calls matchDynamic. This matches all clauses, - /// not just the ones defined with assertFact. - /// - /// - /// - /// - public static IEnumerable matchFact(Atom name, object[] arguments) - { - return matchDynamic(name, arguments); - } - - public static IEnumerable clause(object Head, object Body) - { - Head = getValue(Head); - Body = getValue(Body); - if (Head is Variable) - throw new PrologException("instantiation_error", "Head is an unbound variable"); - - Atom name = getFunctorName(Head) as Atom; - if (name == null) - // name is a non-Atom, such as a number. - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Head), "Head is not callable"); - object[] args = getFunctorArgs(Head); - if (isSystemPredicate(name, args.Length)) - throw new PrologException - (new Functor3("permission_error", Atom.a("access"), Atom.a("private_procedure"), - new Functor2(Atom.SLASH, name, args.Length)), - "clause cannot access private predicate " + name + "/" + args.Length); - if (!(Body is Variable) && !(YP.getFunctorName(Body) is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Body), "Body is not callable"); - - List clauses; - if (!_predicatesStore.TryGetValue(new NameArity(name, args.Length), out clauses)) - yield break; - // The caller can assert another clause into this same predicate during yield, so we have to - // make a copy of the clauses. - foreach (IClause predicateClause in clauses.ToArray()) - { - foreach (bool l1 in predicateClause.clause(Head, Body)) - yield return false; - } - } - - public static IEnumerable retract(object Term) - { - Term = getValue(Term); - if (Term is Variable) - throw new PrologException("instantiation_error", "Term to retract is an unbound variable"); - - object Head, Body; - if (Term is Functor2 && ((Functor2)Term)._name == Atom.RULE) - { - Head = YP.getValue(((Functor2)Term)._arg1); - Body = YP.getValue(((Functor2)Term)._arg2); - } - else - { - Head = Term; - Body = Atom.a("true"); - } - if (Head is Variable) - throw new PrologException("instantiation_error", "Head is an unbound variable"); - - Atom name = getFunctorName(Head) as Atom; - if (name == null) - // name is a non-Atom, such as a number. - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Head), "Head is not callable"); - object[] args = getFunctorArgs(Head); - if (isSystemPredicate(name, args.Length)) - throw new PrologException - (new Functor3("permission_error", Atom.a("modify"), Atom.a("static_procedure"), - new Functor2(Atom.SLASH, name, args.Length)), - "clause cannot access private predicate " + name + "/" + args.Length); - if (!(Body is Variable) && !(YP.getFunctorName(Body) is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Body), "Body is not callable"); - - List clauses; - if (!_predicatesStore.TryGetValue(new NameArity(name, args.Length), out clauses)) - yield break; - // The caller can assert another clause into this same predicate during yield, so we have to - // make a copy of the clauses. - foreach (IClause predicateClause in clauses.ToArray()) - { - if (predicateClause is IndexedAnswers) - { - // IndexedAnswers handles its own retract. Even if it removes all of its - // answers, it is OK to leave it empty as one of the elements in clauses. - foreach (bool l1 in ((IndexedAnswers)predicateClause).retract(Head, Body)) - yield return false; - } - else - { - foreach (bool l1 in predicateClause.clause(Head, Body)) - { - clauses.Remove(predicateClause); - yield return false; - } - } - } - } - - /// - /// This is deprecated for backward compatibility. You should use retractall. - /// - /// must be an Atom - /// an array of arity number of arguments - public static void retractFact(Atom name, object[] arguments) - { - retractall(Functor.make(name, arguments)); - } - - /// - /// Retract all dynamic clauses which unify with Head. If this matches all clauses in a predicate, - /// the predicate is still defined. To completely remove the predicate, see abolish. - /// - /// - public static void retractall(object Head) - { - object name = YP.getFunctorName(Head); - object[] arguments = getFunctorArgs(Head); - if (!(name is Atom)) - return; - NameArity nameArity = new NameArity((Atom)name, arguments.Length); - List clauses; - if (!_predicatesStore.TryGetValue(nameArity, out clauses)) - // Can't find, so ignore. - return; - - foreach (object arg in arguments) - { - if (!YP.var(arg)) - throw new InvalidOperationException - ("Until matching retractall is supported, all arguments must be unbound to retract all clauses"); - } - // Clear all clauses. - _predicatesStore[nameArity] = new List(); - } - - /// - /// If NameSlashArity is var, match with all the dynamic predicates using the - /// Name/Artity form. - /// If NameSlashArity is not var, check if the Name/Arity exists as a static or - /// dynamic predicate. - /// - /// - /// if not null, used to resolve references to the default - /// module Atom.a("") - /// - public static IEnumerable current_predicate(object NameSlashArity, Type declaringClass) - { - NameSlashArity = YP.getValue(NameSlashArity); - // First check if Name and Arity are nonvar so we can do a direct lookup. - if (YP.ground(NameSlashArity)) - { - Functor2 NameArityFunctor = NameSlashArity as Functor2; - if (!(NameArityFunctor != null && NameArityFunctor._name == Atom.SLASH)) - throw new PrologException - (new Functor2("type_error", Atom.a("predicate_indicator"), NameSlashArity), - "Must be a name/arity predicate indicator"); - object name = YP.getValue(NameArityFunctor._arg1); - object arity = YP.getValue(NameArityFunctor._arg2); - if (name is Variable || arity is Variable) - throw new PrologException - ("instantiation_error", "Predicate indicator name or arity is an unbound variable"); - if (!(name is Atom && arity is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("predicate_indicator"), NameSlashArity), - "Must be a name/arity predicate indicator"); - if ((int)arity < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), arity), - "Arity may not be less than zero"); - - if (YPCompiler.isCurrentPredicate((Atom)name, (int)arity, declaringClass)) - // The predicate is defined. - yield return false; - } - else - { - foreach (NameArity key in _predicatesStore.Keys) - { - foreach (bool l1 in YP.unify - (new Functor2(Atom.SLASH, key._name, key._arity), NameSlashArity)) - yield return false; - } - } - } - - /// - /// Return true if the dynamic predicate store has an entry for the predicate - /// with name and arity. - /// - /// - /// - /// - public static bool isDynamicCurrentPredicate(Atom name, int arity) - { - return _predicatesStore.ContainsKey(new NameArity(name, arity)); - } - - public static void abolish(object NameSlashArity) - { - NameSlashArity = YP.getValue(NameSlashArity); - if (NameSlashArity is Variable) - throw new PrologException - ("instantiation_error", "Predicate indicator is an unbound variable"); - Functor2 NameArityFunctor = NameSlashArity as Functor2; - if (!(NameArityFunctor != null && NameArityFunctor._name == Atom.SLASH)) - throw new PrologException - (new Functor2("type_error", Atom.a("predicate_indicator"), NameSlashArity), - "Must be a name/arity predicate indicator"); - object name = YP.getValue(NameArityFunctor._arg1); - object arity = YP.getValue(NameArityFunctor._arg2); - if (name is Variable || arity is Variable) - throw new PrologException - ("instantiation_error", "Predicate indicator name or arity is an unbound variable"); - if (!(name is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), name), - "Predicate indicator name must be an atom"); - if (!(arity is int)) - throw new PrologException - (new Functor2("type_error", Atom.a("integer"), arity), - "Predicate indicator arity must be an integer"); - if ((int)arity < 0) - throw new PrologException - (new Functor2("domain_error", Atom.a("not_less_than_zero"), arity), - "Arity may not be less than zero"); - if ((int)arity > MAX_ARITY) - throw new PrologException - (new Functor1("representation_error", Atom.a("max_arity")), - "Arity may not be greater than " + MAX_ARITY); - - if (isSystemPredicate((Atom)name, (int)arity)) - throw new PrologException - (new Functor3("permission_error", Atom.a("modify"), Atom.a("static_procedure"), - new Functor2(Atom.SLASH, name, arity)), - "Abolish cannot modify static predicate " + name + "/" + arity); - _predicatesStore.Remove(new NameArity((Atom)name, (int)arity)); - } - - /// - /// If Goal is a simple predicate, call YP.getFunctorName(Goal) using arguments from - /// YP.getFunctorArgs(Goal). If not found, this throws a PrologException for existence_error. - /// Otherwise, compile the goal as a single clause predicate and invoke it. - /// - /// - /// if not null, used to resolve references to the default - /// module Atom.a("") - /// - public static IEnumerable getIterator(object Goal, Type declaringClass) - { - Atom name; - object[] args; - while (true) - { - Goal = YP.getValue(Goal); - if (Goal is Variable) - throw new PrologException("instantiation_error", "Goal to call is an unbound variable"); - name = YP.getFunctorName(Goal) as Atom; - if (name == null) - throw new PrologException - (new Functor2("type_error", Atom.a("callable"), Goal), "Goal to call is not callable"); - args = YP.getFunctorArgs(Goal); - if (name == Atom.HAT && args.Length == 2) - // Assume this is called from a bagof operation. Skip the leading qualifiers. - Goal = YP.getValue(((Functor2)Goal)._arg2); - else - break; - } - - IEnumerable simpleIterator = YPCompiler.getSimpleIterator(name, args, declaringClass); - if (simpleIterator != null) - // We don't need to compile since the goal is a simple predicate which we call directly. - return simpleIterator; - - // Compile the goal as a clause. - List variableSetList = new List(); - addUniqueVariables(Goal, variableSetList); - Variable[] variableSet = variableSetList.ToArray(); - - // Use Atom.F since it is ignored. - return YPCompiler.compileAnonymousClause - (Functor.make(Atom.F, variableSet), Goal, declaringClass).match(variableSet); - } - - public static void throwException(object Term) - { - throw new PrologException(Term); - } - /// - /// This must be called by any function that uses YP._prologFlags to make sure - /// the initial defaults are loaded. - /// - private static void establishPrologFlags() - { - if (_prologFlags.Count > 0) - // Already established. - return; - - // List these in the order they appear in the ISO standard. - _prologFlags["bounded"] = Atom.a("true"); - _prologFlags["max_integer"] = Int32.MaxValue; - _prologFlags["min_integer"] = Int32.MinValue; - _prologFlags["integer_rounding_function"] = Atom.a("toward_zero"); - _prologFlags["char_conversion"] = Atom.a("off"); - _prologFlags["debug"] = Atom.a("off"); - _prologFlags["max_arity"] = MAX_ARITY; - _prologFlags["unknown"] = Atom.a("error"); - _prologFlags["double_quotes"] = Atom.a("codes"); - } - - public static IEnumerable current_prolog_flag(object Key, object Value) - { - establishPrologFlags(); - - Key = YP.getValue(Key); - Value = YP.getValue(Value); - - if (Key is Variable) - { - // Bind all key values. - foreach (string key in _prologFlags.Keys) - { - foreach (bool l1 in YP.unify(Key, Atom.a(key))) - { - foreach (bool l2 in YP.unify(Value, _prologFlags[key])) - yield return false; - } - } - } - else - { - if (!(Key is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Key), "Arg 1 Key is not an atom"); - if (!_prologFlags.ContainsKey(((Atom)Key)._name)) - throw new PrologException - (new Functor2("domain_error", Atom.a("prolog_flag"), Key), - "Arg 1 Key is not a recognized flag"); - - foreach (bool l1 in YP.unify(Value, _prologFlags[((Atom)Key)._name])) - yield return false; - } - } - - public static void set_prolog_flag(object Key, object Value) - { - establishPrologFlags(); - - Key = YP.getValue(Key); - Value = YP.getValue(Value); - - if (Key is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Key is an unbound variable"); - if (Value is Variable) - throw new PrologException(Atom.a("instantiation_error"), - "Arg 1 Key is an unbound variable"); - if (!(Key is Atom)) - throw new PrologException - (new Functor2("type_error", Atom.a("atom"), Key), "Arg 1 Key is not an atom"); - - string keyName = ((Atom)Key)._name; - if (!_prologFlags.ContainsKey(keyName)) - throw new PrologException - (new Functor2("domain_error", Atom.a("prolog_flag"), Key), - "Arg 1 Key " + Key + " is not a recognized flag"); - - bool valueIsOK = false; - if (keyName == "char_conversion") - valueIsOK = (Value == _prologFlags[keyName]); - else if (keyName == "debug") - valueIsOK = (Value == _prologFlags[keyName]); - else if (keyName == "unknown") - valueIsOK = (Value == Atom.a("fail") || Value == Atom.a("warning") || - Value == Atom.a("error")); - else if (keyName == "double_quotes") - valueIsOK = (Value == Atom.a("codes") || Value == Atom.a("chars") || - Value == Atom.a("atom")); - else - throw new PrologException - (new Functor3("permission_error", Atom.a("modify"), Atom.a("flag"), Key), - "May not modify Prolog flag " + Key); - - if (!valueIsOK) - throw new PrologException - (new Functor2("domain_error", Atom.a("flag_value"), new Functor2("+", Key, Value)), - "May not set arg 1 Key " + Key + " to arg 2 Value " + Value); - - _prologFlags[keyName] = Value; - } - /// - /// script_event calls hosting script with events as a callback method. - /// - /// - /// - /// - public static IEnumerable script_event(object script_event, object script_params) - { - // string function = ((Atom)YP.getValue(script_event))._name; - object[] array = ListPair.toArray(script_params); - if (array == null) - yield return false; // return; // YP.fail(); - if (array.Length > 1) - { - //m_CmdManager.m_ScriptEngine.m_EventQueManager.AddToScriptQueue - //(localID, itemID, function, array); - // sortArray(array); - } - //return YP.unify(Sorted, ListPair.makeWithoutRepeatedTerms(array)); - yield return false; - } - - /* Non-prolog-ish functions for inline coding */ - public static string regexString(string inData, string inPattern, string presep,string postsep) - { - //string str=cycMessage; - //string strMatch = @"\. \#\$(.*)\)"; - string results = ""; - for (Match m = Regex.Match(inData,inPattern); m.Success; m=m.NextMatch()) - { - //m_log.Debug(m); - results += presep+ m + postsep; - } - return results; - } - - public static string cycComm(object msgobj) - { - string cycInputString = msgobj.ToString(); - string cycOutputString=""; - TcpClient socketForServer; - - try - { - socketForServer = new TcpClient("localHost", 3601); - } - catch - { - m_log.Error("Failed to connect to server at localhost:999"); - return ""; - } - - NetworkStream networkStream = socketForServer.GetStream(); - - System.IO.StreamReader streamReader = new System.IO.StreamReader(networkStream); - - System.IO.StreamWriter streamWriter = new System.IO.StreamWriter(networkStream); - - try - { - // read the data from the host and display it - - { - - streamWriter.WriteLine(cycInputString); - streamWriter.Flush(); - - cycOutputString = streamReader.ReadLine(); - m_log.Debug("Cycoutput:" + cycOutputString); - //streamWriter.WriteLine("Client Message"); - //m_log.Debug("Client Message"); - streamWriter.Flush(); - } - - } - catch - { - m_log.Error("Exception reading from Server"); - return ""; - } - // tidy up - networkStream.Close(); - return cycOutputString; - - } - //public static void throwException(object Term) - //{ - // throw new PrologException(Term); - //} - /// - /// An enumerator that does zero loops. - /// - private class Fail : IEnumerator, IEnumerable - { - public bool MoveNext() - { - return false; - } - - public IEnumerator GetEnumerator() - { - return (IEnumerator)this; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public bool Current - { - get { return true; } - } - - object IEnumerator.Current - { - get { return true; } - } - - public void Dispose() - { - } - - public void Reset() - { - throw new NotImplementedException(); - } - } - - /// - /// An enumerator that does one iteration. - /// - private class Succeed : IEnumerator, IEnumerable - { - private bool _didIteration = false; - - public bool MoveNext() - { - if (!_didIteration) - { - _didIteration = true; - return true; - } - else - return false; - } - - public IEnumerator GetEnumerator() - { - return (IEnumerator)this; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public bool Current - { - get { return false; } - } - - object IEnumerator.Current - { - get { return false; } - } - - public void Dispose() - { - } - - public void Reset() - { - throw new NotImplementedException(); - } - } - - /// - /// An enumerator that repeats forever. - /// - private class Repeat : IEnumerator, IEnumerable - { - public bool MoveNext() - { - return true; - } - - public IEnumerator GetEnumerator() - { - return (IEnumerator)this; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public bool Current - { - get { return false; } - } - - object IEnumerator.Current - { - get { return false; } - } - - public void Dispose() - { - } - - public void Reset() - { - throw new NotImplementedException(); - } - } - - /// - /// An enumerator that wraps another enumerator in order to catch a PrologException. - /// - public class Catch : IEnumerator, IEnumerable - { - private IEnumerator _enumerator; - private PrologException _exception = null; - - /// - /// Call YP.getIterator(Goal, declaringClass) and save the returned iterator. - /// If getIterator throws an exception, save it the same as MoveNext(). - /// - /// - /// - public Catch(object Goal, Type declaringClass) - { - try - { - _enumerator = getIterator(Goal, declaringClass).GetEnumerator(); - } - catch (PrologException exception) - { - // MoveNext() will check this. - _exception = exception; - } - } - - /// - /// Call _enumerator.MoveNext(). If it throws a PrologException, set _exception - /// and return false. After this returns false, call unifyExceptionOrThrow. - /// - /// - public bool MoveNext() - { - if (_exception != null) - return false; - - try - { - return _enumerator.MoveNext(); - } - catch (PrologException exception) - { - _exception = exception; - return false; - } - } - - /// - /// Call this after MoveNext() returns false to check for an exception. If - /// MoveNext did not get a PrologException, don't yield. - /// Otherwise, unify the exception with Catcher and yield so the caller can - /// do the handler code. However, if can't unify with Catcher then throw the exception. - /// - /// - /// - public IEnumerable unifyExceptionOrThrow(object Catcher) - { - if (_exception != null) - { - bool didUnify = false; - foreach (bool l1 in YP.unify(_exception._term, Catcher)) - { - didUnify = true; - yield return false; - } - if (!didUnify) - throw _exception; - } - } - - public IEnumerator GetEnumerator() - { - return (IEnumerator)this; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public bool Current - { - get { return _enumerator.Current; } - } - - object IEnumerator.Current - { - get { return _enumerator.Current; } - } - - public void Dispose() - { - if (_enumerator != null) - _enumerator.Dispose(); - } - - public void Reset() - { - throw new NotImplementedException(); - } - } - #pragma warning restore 0168, 0219 - /// - /// A ClauseHeadAndBody is used in Compiler.compileAnonymousFunction as a base class - /// in order to implement YP.IClause. After creating the object, you must call setHeadAndBody. - /// - public class ClauseHeadAndBody - { - private object _Head; - private object _Body; - - public void setHeadAndBody(object Head, object Body) - { - _Head = Head; - _Body = Body; - } - - public IEnumerable clause(object Head, object Body) - { - if (_Head == null || _Body == null) - yield break; - - #pragma warning disable 0168, 0219 - foreach (bool l1 in YP.unify(Head, _Head)) - { - foreach (bool l2 in YP.unify(Body, _Body)) - yield return false; - } - #pragma warning restore 0168, 0219 - } - } - - /// - /// CodeListReader extends TextReader and overrides Read to read the next code from - /// the CodeList which is a Prolog list of integer character codes. - /// - public class CodeListReader : TextReader - { - private object _CodeList; - - public CodeListReader(object CodeList) - { - _CodeList = YP.getValue(CodeList); - } - - /// - /// If the head of _CodeList is an integer, return it and advance the list. Otherwise, - /// return -1 for end of file. - /// - /// - public override int Read() - { - Functor2 CodeListPair = _CodeList as Functor2; - int code; - if (!(CodeListPair != null && CodeListPair._name == Atom.DOT && - getInt(CodeListPair._arg1, out code))) - { - _CodeList = Atom.NIL; - return -1; - } - - // Advance. - _CodeList = YP.getValue(CodeListPair._arg2); - return code; - } - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs deleted file mode 100644 index c6a6748..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs +++ /dev/null @@ -1,6382 +0,0 @@ -/* - * Copyright (C) 2007-2008, Jeff Thompson - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.CodeDom.Compiler; -using System.Reflection; - -namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog -{ - public class YPCompiler - { - private class CompilerState - { - public IndexedAnswers _pred = new IndexedAnswers(4); - public Dictionary _moduleForNameArity = new Dictionary(); - public int _gensymCounter; - public bool _useFinalCutCode; - public Variable _finalCutCode; - public bool _codeUsesYield; - public Atom _determinism; - // a list of '='(Name, Variable) - public List _variableNames; - - // Make these static functions that explicitly take the State so Prolog can call it. - - /// - /// Make a new CompilerState and bind it to State. - /// - /// - /// - public static IEnumerable make(object State) - { - return YP.unify(State, new CompilerState()); - } - - public static void assertPred(object State, object Pred, object Determinism) - { - State = YP.getValue(State); - object functorName = YP.getFunctorName(Pred); - object[] functorArgs = YP.getFunctorArgs(Pred); - // Debug: Should check if it's already asserted and is the same. - ((CompilerState)State)._pred.addAnswer - (new object[] { functorName, functorArgs.Length, Pred, YP.getValue(Determinism) }); - } - - public static void assertModuleForNameArity(object State, object Name, object Arity, object Module) - { - State = YP.getValue(State); - Name = YP.getValue(Name); - Arity = YP.getValue(Arity); - Module = YP.getValue(Module); - // If the Module Atom comes from the parser, it always has null _declaringClass. - if (Module is Atom && ((Atom)Module)._module == null && Name is Atom && Arity is int) - // Replace a previous entry if it exists. - ((CompilerState)State)._moduleForNameArity[new YP.NameArity((Atom)Name, (int)Arity)] = - (Atom)Module; - } - - public static void startFunction(object State, object Head) - { - State = YP.getValue(State); - ((CompilerState)State)._gensymCounter = 0; - ((CompilerState)State)._useFinalCutCode = false; - ((CompilerState)State)._finalCutCode = new Variable(); - ((CompilerState)State)._codeUsesYield = false; - if (CompilerState.isDetNoneOut(State, Head)) - ((CompilerState)State)._determinism = Atom.a("detNoneOut"); - else if (CompilerState.isSemidetNoneOut(State, Head)) - ((CompilerState)State)._determinism = Atom.a("semidetNoneOut"); - else - ((CompilerState)State)._determinism = Atom.a("nondet"); - } - - public static void setCodeUsesYield(object State) - { - State = YP.getValue(State); - ((CompilerState)State)._codeUsesYield = true; - } - - public static bool codeUsesYield(object State) - { - State = YP.getValue(State); - return ((CompilerState)State)._codeUsesYield; - } - - public static bool determinismEquals(object State, object Term) - { - State = YP.getValue(State); - return YP.termEqual(((CompilerState)State)._determinism, Term); - } - - /// - /// Set _variableNames to a new list of (Name = Variable) for each unique variable in rule. - /// If the variable is in variableNameSuggestions, use it, otherwise use x1, x2, etc. - /// - /// - /// - /// - public static void newVariableNames(object State, object Rule, object VariableNameSuggestions) - { - State = YP.getValue(State); - List variablesSet = new List(); - YP.addUniqueVariables(Rule, variablesSet); - - ((CompilerState)State)._variableNames = new List(); - int xCounter = 0; - foreach (Variable variable in variablesSet) - ((CompilerState)State)._variableNames.Add - (new Functor2(Atom.a("="), makeVariableName(variable, VariableNameSuggestions, ++xCounter), - variable)); - } - - private static object makeVariableName(object variable, object variableNameSuggestions, int xCounter) - { - // Debug: should require named variables to start with _ or capital. Should - // check for duplicates and clashes with keywords. - for (object element = YP.getValue(variableNameSuggestions); - element is Functor2 && ((Functor2)element)._name == Atom.DOT; - element = YP.getValue(((Functor2)element)._arg2)) - { - object suggestionPair = YP.getValue(((Functor2)element)._arg1); - if (sameVariable(variable, ((Functor2)suggestionPair)._arg2)) - { - Atom suggestion = (Atom)YP.getValue(((Functor2)suggestionPair)._arg1); - if (suggestion.Equals(Atom.a("Atom"))) - suggestion = Atom.a("Atom_1"); - if (suggestion.Equals(Atom.a("Variable"))) - suggestion = Atom.a("Variable_1"); - if (suggestion.Equals(Atom.a("Functor"))) - suggestion = Atom.a("Functor_1"); - return suggestion; - } - } - - return Atom.a("x" + xCounter); - } - - /// - /// Unify Result with the name assigned by CompilerState.newVariableNames in State._variableNames - /// for variable. - /// - /// a Variable - /// - /// the assigned Name - public static IEnumerable getVariableName(object State, object variable, object Result) - { - State = YP.getValue(State); - foreach (object variableInfo in ((CompilerState)State)._variableNames) - { - if (variableInfo is Functor2 && ((Functor2)variableInfo)._name.Equals(Atom.a("="))) - { - if (sameVariable(variable, ((Functor2)variableInfo)._arg2)) - return YP.unify(Result, ((Functor2)variableInfo)._arg1); - } - } - - // We set up names for all unique variables, so this should never happen. - throw new PrologException(Atom.a("Can't find entry in _variableNames")); - } - - public static IEnumerable variableNamesList(object State, object VariableNamesList) - { - State = YP.getValue(State); - return YP.unify(VariableNamesList, ListPair.make(((CompilerState)State)._variableNames)); - } - - public static IEnumerable gensym(object State, object Base, object Symbol) - { - State = YP.getValue(State); - return YP.unify(Symbol, Atom.a(Base.ToString() + ++((CompilerState)State)._gensymCounter)); - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0164, 0162, 0219 - public static bool isDetNoneOut(object State, object Term) - { - State = YP.getValue(State); - object functorName = YP.getFunctorName(Term); - object[] functorArgs = YP.getFunctorArgs(Term); - - Variable pred = new Variable(); - foreach (bool l1 in ((CompilerState)State)._pred.match - (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) - { - if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) - { - return true; - } - } - - return false; - } - - public static bool isSemidetNoneOut(object State, object Term) - { - State = YP.getValue(State); - object functorName = YP.getFunctorName(Term); - object[] functorArgs = YP.getFunctorArgs(Term); - - Variable pred = new Variable(); - foreach (bool l1 in ((CompilerState)State)._pred.match - (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) - { - if (CompilerState.isNoneOut(YP.getFunctorArgs(pred.getValue()))) - { - return true; - } - } - - return false; - } - #pragma warning restore 0168, 0164, 0162, 0219 - - /// - /// Return false if any of args is out, otherwise true. - /// args is an array of ::(Type,Mode) where Mode is in or out. - /// - /// - /// - private static bool isNoneOut(object[] args) - { - foreach (object arg in args) - { - if (arg is Functor2 && ((Functor2)arg)._name == Atom.a("::") && - ((Functor2)arg)._arg2 == Atom.a("out")) - return false; - } - return true; - } - - public static bool nameArityHasModule(object State, object Name, object Arity, object Module) - { - State = YP.getValue(State); - Name = YP.getValue(Name); - Arity = YP.getValue(Arity); - Module = YP.getValue(Module); - if (Name is Atom && Arity is int) - { - Atom FoundModule; - if (!((CompilerState)State)._moduleForNameArity.TryGetValue - (new YP.NameArity((Atom)Name, (int)Arity), out FoundModule)) - return false; - return FoundModule == Module; - } - return false; - } - } - - // disable warning on l1, don't see how we can - // code this differently - #pragma warning disable 0168, 0219,0164,0162 - - /// - /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction - /// to return an anonymous YP.IClause for the Head and Body of a rule clause. - /// - /// a prolog term such as new Functor2("test1", X, Y). - /// Note that the name of the head is ignored. - /// - /// a prolog term such as - /// new Functor2(",", new Functor1(Atom.a("test2", Atom.a("")), X), - /// new Functor2("=", Y, X)). - /// This may not be null. (For a head-only clause, set the Body to Atom.a("true"). - /// - /// if not null, the code is compiled as a subclass of this class - /// to resolve references to the default module Atom.a("") - /// a new YP.IClause object on which you can call match(object[] args) where - /// args length is the arity of the Head - public static YP.IClause compileAnonymousClause(object Head, object Body, Type declaringClass) - { - object[] args = YP.getFunctorArgs(Head); - // compileAnonymousFunction wants "function". - object Rule = new Functor2(Atom.RULE, Functor.make("function", args), Body); - object RuleList = ListPair.make(new Functor2(Atom.F, Rule, Atom.NIL)); - - StringWriter functionCode = new StringWriter(); - Variable SaveOutputStream = new Variable(); - foreach (bool l1 in YP.current_output(SaveOutputStream)) - { - try - { - YP.tell(functionCode); - Variable PseudoCode = new Variable(); - foreach (bool l2 in makeFunctionPseudoCode(RuleList, PseudoCode)) - { - if (YP.termEqual(PseudoCode, Atom.a("getDeclaringClass"))) - // Ignore getDeclaringClass since we have access to the one passed in. - continue; - - convertFunctionCSharp(PseudoCode); - } - YP.told(); - } - finally - { - // Restore after calling tell. - YP.tell(SaveOutputStream.getValue()); - } - } - return YPCompiler.compileAnonymousFunction - (functionCode.ToString(), args.Length, declaringClass); - } - - /// - /// Use CodeDomProvider to compile the functionCode and return a YP.ClauseHeadAndBody - /// which implements YP.IClause. - /// The function name must be "function" and have nArgs arguments. - /// - /// the code for the iterator, such as - /// "public static IEnumerable function() { yield return false; }" - /// - /// the number of args in the function - /// if not null, then use the functionCode inside a class which - /// inherits from contextClass, so that references in functionCode to methods in declaringClass don't - /// have to be qualified - /// a new YP.IClause object on which you can call match(object[] args) where - /// args length is nArgs - public static YP.IClause compileAnonymousFunction(string functionCode, int nArgs, Type declaringClass) - { - CompilerParameters parameters = new CompilerParameters(); - // This gets the location of the System assembly. - parameters.ReferencedAssemblies.Add(typeof(System.Int32).Assembly.Location); - // This gets the location of this assembly which also has YieldProlog.YP, etc. - parameters.ReferencedAssemblies.Add(typeof(YPCompiler).Assembly.Location); - if (declaringClass != null) - parameters.ReferencedAssemblies.Add(declaringClass.Assembly.Location); - parameters.GenerateInMemory = true; - - StringBuilder sourceCode = new StringBuilder(); - sourceCode.Append(@" -using System; -using System.Collections.Generic; -using OpenSim.Region.ScriptEngine.Shared.YieldProlog; - -namespace Temporary { - public class Temporary : YP.ClauseHeadAndBody, YP.IClause {"); - if (declaringClass == null) - // We don't extend a class with getDeclaringClass, so define it. - sourceCode.Append(@" - public class Inner { - public static System.Type getDeclaringClass() { return null; } -"); - else - sourceCode.Append(@" - public class Inner : " + declaringClass.FullName + @" { -"); - sourceCode.Append(functionCode); - // Basically, match applies the args to function. - sourceCode.Append(@" - } - public IEnumerable match(object[] args) { - return Inner.function("); - if (nArgs >= 1) - sourceCode.Append("args[0]"); - for (int i = 1; i < nArgs; ++i) - sourceCode.Append(", args[" + i + "]"); - sourceCode.Append(@"); - } - } -} -"); - - CompilerResults results = CodeDomProvider.CreateProvider - ("CSharp").CompileAssemblyFromSource(parameters, sourceCode.ToString()); - if (results.Errors.Count > 0) - throw new Exception("Error evaluating code: " + results.Errors[0]); - - // Return a new Temporary.Temporary object. - return (YP.IClause)results.CompiledAssembly.GetType - ("Temporary.Temporary").GetConstructor(Type.EmptyTypes).Invoke(null); - } - - /// - /// If the functor with name and args can be called directly as determined by - /// functorCallFunctionName, then call it and return its iterator. If the predicate is - /// dynamic and undefined, or if static and the method cannot be found, return - /// the result of YP.unknownPredicate. - /// This returns null if the functor has a special form than needs to be compiled - /// (including ,/2 and ;/2). - /// - /// - /// - /// used to resolve references to the default - /// module Atom.a(""). If a declaringClass is needed to resolve the reference but it is - /// null, this throws a PrologException for existence_error - /// - public static IEnumerable getSimpleIterator(Atom name, object[] args, Type declaringClass) - { - CompilerState state = new CompilerState(); - Variable FunctionName = new Variable(); - foreach (bool l1 in functorCallFunctionName(state, name, args.Length, FunctionName)) - { - Atom functionNameAtom = ((Atom)FunctionName.getValue()); - if (functionNameAtom == Atom.NIL) - // name is for a dynamic predicate. - return YP.matchDynamic(name, args); - - string methodName = functionNameAtom._name; - // Set the default for the method to call. - Type methodClass = declaringClass; - - bool checkMode = false; - if (methodName.StartsWith("YP.")) - { - // Assume we only check mode in calls to standard Prolog predicates in YP. - checkMode = true; - - // Use the method in class YP. - methodName = methodName.Substring(3); - methodClass = typeof(YP); - } - if (methodName.Contains(".")) - // We don't support calling inner classes, etc. - return null; - - if (methodClass == null) - return YP.unknownPredicate - (name, args.Length, - "Cannot find predicate function for: " + name + "/" + args.Length + - " because declaringClass is null. Set declaringClass to the class containing " + - methodName); - try - { - if (checkMode) - { - assertYPPred(state); - object functor = Functor.make(name, args); - if (CompilerState.isDetNoneOut(state, functor)) - { - methodClass.InvokeMember - (methodName, BindingFlags.InvokeMethod, null, null, args); - return YP.succeed(); - } - if (CompilerState.isSemidetNoneOut(state, functor)) - { - if ((bool)methodClass.InvokeMember - (methodName, BindingFlags.InvokeMethod, null, null, args)) - return YP.succeed(); - else - return YP.fail(); - } - - } - return (IEnumerable)methodClass.InvokeMember - (methodName, BindingFlags.InvokeMethod, null, null, args); - } - catch (TargetInvocationException exception) - { - throw exception.InnerException; - } - catch (MissingMethodException) - { - return YP.unknownPredicate - (name, args.Length, - "Cannot find predicate function " + methodName + " for " + name + "/" + args.Length + - " in " + methodClass.FullName); - } - } - - return null; - } - - /// - /// Return true if there is a dynamic or static predicate with name and arity. - /// This returns false for built-in predicates. - /// - /// - /// - /// used to resolve references to the default - /// module Atom.a(""). If a declaringClass is needed to resolve the reference but it is - /// null, return false - /// - public static bool isCurrentPredicate(Atom name, int arity, Type declaringClass) - { - CompilerState state = new CompilerState(); - Variable FunctionName = new Variable(); - foreach (bool l1 in functorCallFunctionName(state, name, arity, FunctionName)) - { - Atom functionNameAtom = ((Atom)FunctionName.getValue()); - if (functionNameAtom == Atom.NIL) - // name is for a dynamic predicate. - return YP.isDynamicCurrentPredicate(name, arity); - - string methodName = functionNameAtom._name; - - if (methodName.StartsWith("YP.")) - // current_predicate/1 should fail for built-ins. - return false; - if (methodName.Contains(".")) - // We don't support calling inner classes, etc. - return false; - if (declaringClass == null) - return false; - - foreach (MemberInfo member in declaringClass.GetMember(methodName)) - { - MethodInfo method = member as MethodInfo; - if (method == null) - continue; - if ((method.Attributes | MethodAttributes.Static) == 0) - // Not a static method. - continue; - if (method.GetParameters().Length == arity) - return true; - } - } - - return false; - } - - // Compiler output follows. - - public class YPInnerClass { } - public static System.Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; } - - public static void repeatWrite(object arg1, object N) - { - { - object _Value = arg1; - if (YP.termEqual(N, 0)) - { - return; - } - } - { - object Value = arg1; - Variable NextN = new Variable(); - YP.write(Value); - foreach (bool l2 in YP.unify(NextN, YP.subtract(N, 1))) - { - repeatWrite(Value, NextN); - return; - } - } - } - - public static bool sameVariable(object Variable1, object Variable2) - { - { - if (YP.var(Variable1)) - { - if (YP.var(Variable2)) - { - if (YP.termEqual(Variable1, Variable2)) - { - return true; - } - } - } - } - return false; - } - - public static IEnumerable makeFunctionPseudoCode(object RuleList, object FunctionCode) - { - { - Variable State = new Variable(); - foreach (bool l2 in CompilerState.make(State)) - { - assertYPPred(State); - processCompilerDirectives(RuleList, State); - foreach (bool l3 in YP.unify(FunctionCode, Atom.a("getDeclaringClass"))) - { - yield return false; - } - foreach (bool l3 in makeFunctionPseudoCode3(RuleList, State, FunctionCode)) - { - yield return false; - } - } - } - } - - public static void assertYPPred(object State) - { - { - CompilerState.assertPred(State, Atom.a("nl"), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("write", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("put_code", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("see", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, Atom.a("seen"), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("tell", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, Atom.a("told"), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("throw", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("abolish", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("retractall", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor2("set_prolog_flag", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("det")); - CompilerState.assertPred(State, new Functor1("var", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("nonvar", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("atom", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("integer", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("float", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("number", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("atomic", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor1("compound", new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("==", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("\\==", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("@<", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("@=<", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("@>", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - CompilerState.assertPred(State, new Functor2("@>=", new Functor2("::", Atom.a("univ"), Atom.a("in")), new Functor2("::", Atom.a("univ"), Atom.a("in"))), Atom.a("semidet")); - return; - } - } - - public static void processCompilerDirectives(object arg1, object arg2) - { - { - object _State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - object State = arg2; - Variable Pred = new Variable(); - Variable Determinism = new Variable(); - Variable x3 = new Variable(); - Variable RestRules = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", new Functor1(":-", new Functor1("pred", new Functor2("is", Pred, Determinism))), x3), RestRules))) - { - CompilerState.assertPred(State, Pred, Determinism); - processCompilerDirectives(RestRules, State); - return; - } - } - { - object State = arg2; - Variable Module = new Variable(); - Variable PredicateList = new Variable(); - Variable x3 = new Variable(); - Variable RestRules = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", new Functor1(":-", new Functor2("import", Module, PredicateList)), x3), RestRules))) - { - foreach (bool l3 in importPredicateList(State, Module, PredicateList)) - { - processCompilerDirectives(RestRules, State); - return; - } - } - } - { - object State = arg2; - Variable x1 = new Variable(); - Variable x2 = new Variable(); - Variable RestRules = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", new Functor1(":-", x1), x2), RestRules))) - { - processCompilerDirectives(RestRules, State); - return; - } - } - { - object State = arg2; - Variable Head = new Variable(); - Variable _Body = new Variable(); - Variable x3 = new Variable(); - Variable RestRules = new Variable(); - Variable Name = new Variable(); - Variable Arity = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", new Functor2(":-", Head, _Body), x3), RestRules))) - { - foreach (bool l3 in YP.functor(Head, Name, Arity)) - { - CompilerState.assertModuleForNameArity(State, Name, Arity, Atom.a("")); - processCompilerDirectives(RestRules, State); - return; - } - } - } - { - object State = arg2; - Variable Fact = new Variable(); - Variable x2 = new Variable(); - Variable RestRules = new Variable(); - Variable Name = new Variable(); - Variable Arity = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", Fact, x2), RestRules))) - { - foreach (bool l3 in YP.functor(Fact, Name, Arity)) - { - CompilerState.assertModuleForNameArity(State, Name, Arity, Atom.a("")); - processCompilerDirectives(RestRules, State); - return; - } - } - } - { - object State = arg2; - Variable x1 = new Variable(); - Variable RestRules = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(x1, RestRules))) - { - processCompilerDirectives(RestRules, State); - return; - } - } - } - - public static IEnumerable importPredicateList(object arg1, object arg2, object arg3) - { - { - object _State = arg1; - object _Module = arg2; - foreach (bool l2 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - { - object State = arg1; - object Module = arg2; - Variable Name = new Variable(); - Variable Arity = new Variable(); - Variable Rest = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(new Functor2("/", Name, Arity), Rest))) - { - CompilerState.assertModuleForNameArity(State, Name, Arity, Module); - foreach (bool l3 in importPredicateList(State, Module, Rest)) - { - yield return true; - yield break; - } - } - } - { - object State = arg1; - object Module = arg2; - Variable x3 = new Variable(); - Variable Rest = new Variable(); - foreach (bool l2 in YP.unify(arg3, new ListPair(x3, Rest))) - { - foreach (bool l3 in importPredicateList(State, Module, Rest)) - { - yield return true; - yield break; - } - } - } - } - - public static IEnumerable makeFunctionPseudoCode3(object RuleList, object State, object FunctionCode) - { - { - Variable SamePredicateRuleList = new Variable(); - Variable RestRules = new Variable(); - foreach (bool l2 in samePredicateRuleList(RuleList, SamePredicateRuleList, RestRules)) - { - if (YP.termNotEqual(SamePredicateRuleList, Atom.NIL)) - { - foreach (bool l4 in compileSamePredicateFunction(SamePredicateRuleList, State, FunctionCode)) - { - yield return false; - } - foreach (bool l4 in makeFunctionPseudoCode3(RestRules, State, FunctionCode)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable compileSamePredicateFunction(object SamePredicateRuleList, object State, object FunctionCode) - { - { - Variable FirstRule = new Variable(); - Variable x5 = new Variable(); - Variable x6 = new Variable(); - Variable x7 = new Variable(); - Variable Head = new Variable(); - Variable x9 = new Variable(); - Variable ArgAssignments = new Variable(); - Variable Calls = new Variable(); - Variable Rule = new Variable(); - Variable VariableNameSuggestions = new Variable(); - Variable ClauseBag = new Variable(); - Variable Name = new Variable(); - Variable ArgsList = new Variable(); - Variable FunctionArgNames = new Variable(); - Variable MergedArgName = new Variable(); - Variable ArgName = new Variable(); - Variable MergedArgNames = new Variable(); - Variable FunctionArgs = new Variable(); - Variable BodyCode = new Variable(); - Variable ReturnType = new Variable(); - Variable BodyWithReturn = new Variable(); - foreach (bool l2 in YP.unify(new ListPair(new Functor2("f", FirstRule, x5), x6), SamePredicateRuleList)) - { - foreach (bool l3 in YP.unify(FirstRule, new Functor1(":-", x7))) - { - goto cutIf1; - } - foreach (bool l3 in YP.unify(new Functor2(":-", Head, x9), FirstRule)) - { - CompilerState.startFunction(State, Head); - FindallAnswers findallAnswers3 = new FindallAnswers(new Functor2("f", ArgAssignments, Calls)); - foreach (bool l4 in member(new Functor2("f", Rule, VariableNameSuggestions), SamePredicateRuleList)) - { - foreach (bool l5 in compileBodyWithHeadBindings(Rule, VariableNameSuggestions, State, ArgAssignments, Calls)) - { - findallAnswers3.add(); - } - } - foreach (bool l4 in findallAnswers3.result(ClauseBag)) - { - foreach (bool l5 in YP.univ(Head, new ListPair(Name, ArgsList))) - { - foreach (bool l6 in getFunctionArgNames(ArgsList, 1, FunctionArgNames)) - { - FindallAnswers findallAnswers4 = new FindallAnswers(MergedArgName); - foreach (bool l7 in member(ArgName, FunctionArgNames)) - { - foreach (bool l8 in argAssignedAll(ArgName, ClauseBag, MergedArgName)) - { - findallAnswers4.add(); - goto cutIf5; - } - foreach (bool l8 in YP.unify(MergedArgName, ArgName)) - { - findallAnswers4.add(); - } - cutIf5: - { } - } - foreach (bool l7 in findallAnswers4.result(MergedArgNames)) - { - foreach (bool l8 in maplist_arg(MergedArgNames, FunctionArgs)) - { - foreach (bool l9 in maplist_compileClause(ClauseBag, MergedArgNames, BodyCode)) - { - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l11 in YP.unify(ReturnType, Atom.a("void"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l13 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf7; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf8; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf9; - } - foreach (bool l12 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf9: - cutIf8: - cutIf7: - { } - } - goto cutIf6; - } - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l11 in YP.unify(ReturnType, Atom.a("bool"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l13 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf11; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf12; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf13; - } - foreach (bool l12 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf13: - cutIf12: - cutIf11: - { } - } - goto cutIf10; - } - foreach (bool l10 in YP.unify(ReturnType, Atom.a("IEnumerable"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l12 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf14; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l12 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf15; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l12 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf16; - } - foreach (bool l11 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l12 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf16: - cutIf15: - cutIf14: - { } - } - cutIf10: - cutIf6: - { } - } - } - } - } - } - } - goto cutIf2; - } - foreach (bool l3 in YP.unify(Head, FirstRule)) - { - CompilerState.startFunction(State, Head); - FindallAnswers findallAnswers17 = new FindallAnswers(new Functor2("f", ArgAssignments, Calls)); - foreach (bool l4 in member(new Functor2("f", Rule, VariableNameSuggestions), SamePredicateRuleList)) - { - foreach (bool l5 in compileBodyWithHeadBindings(Rule, VariableNameSuggestions, State, ArgAssignments, Calls)) - { - findallAnswers17.add(); - } - } - foreach (bool l4 in findallAnswers17.result(ClauseBag)) - { - foreach (bool l5 in YP.univ(Head, new ListPair(Name, ArgsList))) - { - foreach (bool l6 in getFunctionArgNames(ArgsList, 1, FunctionArgNames)) - { - FindallAnswers findallAnswers18 = new FindallAnswers(MergedArgName); - foreach (bool l7 in member(ArgName, FunctionArgNames)) - { - foreach (bool l8 in argAssignedAll(ArgName, ClauseBag, MergedArgName)) - { - findallAnswers18.add(); - goto cutIf19; - } - foreach (bool l8 in YP.unify(MergedArgName, ArgName)) - { - findallAnswers18.add(); - } - cutIf19: - { } - } - foreach (bool l7 in findallAnswers18.result(MergedArgNames)) - { - foreach (bool l8 in maplist_arg(MergedArgNames, FunctionArgs)) - { - foreach (bool l9 in maplist_compileClause(ClauseBag, MergedArgNames, BodyCode)) - { - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l11 in YP.unify(ReturnType, Atom.a("void"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l13 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf21; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf22; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf23; - } - foreach (bool l12 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf23: - cutIf22: - cutIf21: - { } - } - goto cutIf20; - } - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l11 in YP.unify(ReturnType, Atom.a("bool"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l13 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf25; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf26; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l13 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l14 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf27; - } - foreach (bool l12 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf27: - cutIf26: - cutIf25: - { } - } - goto cutIf24; - } - foreach (bool l10 in YP.unify(ReturnType, Atom.a("IEnumerable"))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - foreach (bool l12 in append(BodyCode, new ListPair(Atom.a("returnfalse"), Atom.NIL), BodyWithReturn)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf28; - } - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - foreach (bool l12 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf29; - } - if (CompilerState.codeUsesYield(State)) - { - foreach (bool l12 in YP.unify(BodyWithReturn, BodyCode)) - { - foreach (bool l13 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - goto cutIf30; - } - foreach (bool l11 in append(BodyCode, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.fail"), Atom.NIL), new ListPair(Atom.a("yieldfalse"), Atom.NIL)), Atom.NIL), BodyWithReturn)) - { - foreach (bool l12 in YP.unify(FunctionCode, new Functor("function", new object[] { ReturnType, Name, FunctionArgs, BodyWithReturn }))) - { - yield return false; - } - } - cutIf30: - cutIf29: - cutIf28: - { } - } - cutIf24: - cutIf20: - { } - } - } - } - } - } - } - } - cutIf2: - cutIf1: - { } - } - } - } - - public static IEnumerable samePredicateRuleList(object arg1, object arg2, object arg3) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - foreach (bool l4 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - } - { - Variable First = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Atom.NIL))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(First, Atom.NIL))) - { - foreach (bool l4 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - } - { - object SamePredicateRuleList = arg2; - object RestRules = arg3; - Variable First = new Variable(); - Variable Rest = new Variable(); - Variable FirstRule = new Variable(); - Variable x6 = new Variable(); - Variable SecondRule = new Variable(); - Variable x8 = new Variable(); - Variable x9 = new Variable(); - Variable FirstHead = new Variable(); - Variable x11 = new Variable(); - Variable SecondHead = new Variable(); - Variable x13 = new Variable(); - Variable Name = new Variable(); - Variable Arity = new Variable(); - Variable RestSamePredicates = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Rest))) - { - foreach (bool l3 in YP.unify(new Functor2("f", FirstRule, x6), First)) - { - foreach (bool l4 in YP.unify(new ListPair(new Functor2("f", SecondRule, x8), x9), Rest)) - { - foreach (bool l5 in YP.unify(new Functor2(":-", FirstHead, x11), FirstRule)) - { - foreach (bool l6 in YP.unify(new Functor2(":-", SecondHead, x13), SecondRule)) - { - foreach (bool l7 in YP.functor(FirstHead, Name, Arity)) - { - foreach (bool l8 in YP.functor(SecondHead, Name, Arity)) - { - foreach (bool l9 in samePredicateRuleList(Rest, RestSamePredicates, RestRules)) - { - foreach (bool l10 in YP.unify(SamePredicateRuleList, new ListPair(First, RestSamePredicates))) - { - yield return true; - yield break; - } - } - goto cutIf3; - } - foreach (bool l8 in YP.unify(SamePredicateRuleList, new ListPair(First, Atom.NIL))) - { - foreach (bool l9 in YP.unify(RestRules, Rest)) - { - yield return true; - yield break; - } - } - cutIf3: - { } - } - goto cutIf2; - } - foreach (bool l6 in YP.unify(SecondHead, SecondRule)) - { - foreach (bool l7 in YP.functor(FirstHead, Name, Arity)) - { - foreach (bool l8 in YP.functor(SecondHead, Name, Arity)) - { - foreach (bool l9 in samePredicateRuleList(Rest, RestSamePredicates, RestRules)) - { - foreach (bool l10 in YP.unify(SamePredicateRuleList, new ListPair(First, RestSamePredicates))) - { - yield return true; - yield break; - } - } - goto cutIf4; - } - foreach (bool l8 in YP.unify(SamePredicateRuleList, new ListPair(First, Atom.NIL))) - { - foreach (bool l9 in YP.unify(RestRules, Rest)) - { - yield return true; - yield break; - } - } - cutIf4: - { } - } - } - cutIf2: - goto cutIf1; - } - foreach (bool l5 in YP.unify(FirstHead, FirstRule)) - { - foreach (bool l6 in YP.unify(new Functor2(":-", SecondHead, x13), SecondRule)) - { - foreach (bool l7 in YP.functor(FirstHead, Name, Arity)) - { - foreach (bool l8 in YP.functor(SecondHead, Name, Arity)) - { - foreach (bool l9 in samePredicateRuleList(Rest, RestSamePredicates, RestRules)) - { - foreach (bool l10 in YP.unify(SamePredicateRuleList, new ListPair(First, RestSamePredicates))) - { - yield return true; - yield break; - } - } - goto cutIf6; - } - foreach (bool l8 in YP.unify(SamePredicateRuleList, new ListPair(First, Atom.NIL))) - { - foreach (bool l9 in YP.unify(RestRules, Rest)) - { - yield return true; - yield break; - } - } - cutIf6: - { } - } - goto cutIf5; - } - foreach (bool l6 in YP.unify(SecondHead, SecondRule)) - { - foreach (bool l7 in YP.functor(FirstHead, Name, Arity)) - { - foreach (bool l8 in YP.functor(SecondHead, Name, Arity)) - { - foreach (bool l9 in samePredicateRuleList(Rest, RestSamePredicates, RestRules)) - { - foreach (bool l10 in YP.unify(SamePredicateRuleList, new ListPair(First, RestSamePredicates))) - { - yield return true; - yield break; - } - } - goto cutIf7; - } - foreach (bool l8 in YP.unify(SamePredicateRuleList, new ListPair(First, Atom.NIL))) - { - foreach (bool l9 in YP.unify(RestRules, Rest)) - { - yield return true; - yield break; - } - } - cutIf7: - { } - } - } - cutIf5: - { } - } - cutIf1: - { } - } - } - } - } - } - - public static IEnumerable maplist_compileClause(object arg1, object arg2, object arg3) - { - { - object _MergedArgNames = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object MergedArgNames = arg2; - Variable ArgAssignments = new Variable(); - Variable Calls = new Variable(); - Variable Rest = new Variable(); - Variable ClauseCode = new Variable(); - Variable RestResults = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", ArgAssignments, Calls), Rest))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1("blockScope", ClauseCode), RestResults))) - { - foreach (bool l4 in prependArgAssignments(ArgAssignments, Calls, MergedArgNames, ClauseCode)) - { - foreach (bool l5 in maplist_compileClause(Rest, MergedArgNames, RestResults)) - { - yield return true; - yield break; - } - } - } - } - } - } - - public static IEnumerable prependArgAssignments(object arg1, object arg2, object arg3, object arg4) - { - { - object _MergedArgNames = arg3; - Variable In = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, In)) - { - foreach (bool l4 in YP.unify(arg4, In)) - { - yield return true; - yield break; - } - } - } - } - { - object In = arg2; - object MergedArgNames = arg3; - object ClauseCode = arg4; - Variable VariableName = new Variable(); - Variable ArgName = new Variable(); - Variable RestArgAssignments = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("f", VariableName, ArgName), RestArgAssignments))) - { - foreach (bool l3 in member(VariableName, MergedArgNames)) - { - foreach (bool l4 in prependArgAssignments(RestArgAssignments, In, MergedArgNames, ClauseCode)) - { - yield return true; - yield break; - } - goto cutIf1; - } - foreach (bool l3 in prependArgAssignments(RestArgAssignments, new ListPair(new Functor3("declare", Atom.a("object"), VariableName, new Functor1("var", ArgName)), In), MergedArgNames, ClauseCode)) - { - yield return true; - yield break; - } - cutIf1: - { } - } - } - } - - public static IEnumerable argAssignedAll(object arg1, object arg2, object VariableName) - { - { - object _ArgName = arg1; - foreach (bool l2 in YP.unify(arg2, Atom.NIL)) - { - if (YP.nonvar(VariableName)) - { - yield return true; - yield break; - } - } - } - { - object ArgName = arg1; - Variable ArgAssignments = new Variable(); - Variable _Calls = new Variable(); - Variable RestClauseBag = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(new Functor2("f", ArgAssignments, _Calls), RestClauseBag))) - { - foreach (bool l3 in member(new Functor2("f", VariableName, ArgName), ArgAssignments)) - { - foreach (bool l4 in argAssignedAll(ArgName, RestClauseBag, VariableName)) - { - yield return false; - } - } - } - } - } - - public static IEnumerable maplist_arg(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - Variable First = new Variable(); - Variable Rest = new Variable(); - Variable RestResults = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Rest))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(new Functor1("arg", First), RestResults))) - { - foreach (bool l4 in maplist_arg(Rest, RestResults)) - { - yield return true; - yield break; - } - } - } - } - } - - public static IEnumerable getFunctionArgNames(object arg1, object arg2, object arg3) - { - { - object _StartArgNumber = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object StartArgNumber = arg2; - Variable x1 = new Variable(); - Variable Rest = new Variable(); - Variable ArgName = new Variable(); - Variable RestFunctionArgs = new Variable(); - Variable NumberCodes = new Variable(); - Variable NumberAtom = new Variable(); - Variable NextArgNumber = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(x1, Rest))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(ArgName, RestFunctionArgs))) - { - foreach (bool l4 in YP.number_codes(StartArgNumber, NumberCodes)) - { - foreach (bool l5 in YP.atom_codes(NumberAtom, NumberCodes)) - { - foreach (bool l6 in YP.atom_concat(Atom.a("arg"), NumberAtom, ArgName)) - { - foreach (bool l7 in YP.unify(NextArgNumber, YP.add(StartArgNumber, 1))) - { - foreach (bool l8 in getFunctionArgNames(Rest, NextArgNumber, RestFunctionArgs)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - } - - public static IEnumerable compileBodyWithHeadBindings(object Rule, object VariableNameSuggestions, object State, object ArgAssignments, object Calls) - { - { - Variable Head = new Variable(); - Variable Body = new Variable(); - Variable x8 = new Variable(); - Variable HeadArgs = new Variable(); - Variable CompiledHeadArgs = new Variable(); - Variable BodyCode = new Variable(); - Variable VariableNamesList = new Variable(); - Variable ArgUnifications = new Variable(); - foreach (bool l2 in YP.unify(new Functor2(":-", Head, Body), Rule)) - { - CompilerState.newVariableNames(State, Rule, VariableNameSuggestions); - foreach (bool l3 in YP.univ(Head, new ListPair(x8, HeadArgs))) - { - foreach (bool l4 in maplist_compileTerm(HeadArgs, State, CompiledHeadArgs)) - { - foreach (bool l5 in compileRuleBody(Body, State, BodyCode)) - { - foreach (bool l6 in CompilerState.variableNamesList(State, VariableNamesList)) - { - foreach (bool l7 in compileArgUnifications(HeadArgs, CompiledHeadArgs, 1, HeadArgs, BodyCode, ArgUnifications)) - { - foreach (bool l8 in compileDeclarations(VariableNamesList, HeadArgs, Atom.NIL, ArgAssignments, ArgUnifications, Calls)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - { - foreach (bool l2 in compileBodyWithHeadBindings(new Functor2(":-", Rule, Atom.a("true")), VariableNameSuggestions, State, ArgAssignments, Calls)) - { - yield return true; - yield break; - } - } - } - - public static IEnumerable compileArgUnifications(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) - { - { - object x1 = arg2; - object x2 = arg3; - object x3 = arg4; - Variable BodyCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg5, BodyCode)) - { - foreach (bool l4 in YP.unify(arg6, BodyCode)) - { - yield return true; - yield break; - } - } - } - } - { - object Index = arg3; - object AllHeadArgs = arg4; - object BodyCode = arg5; - object ArgUnifications = arg6; - Variable HeadArg = new Variable(); - Variable RestHeadArgs = new Variable(); - Variable x3 = new Variable(); - Variable RestCompiledHeadArgs = new Variable(); - Variable _ArgIndex1 = new Variable(); - Variable NextIndex = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(HeadArg, RestHeadArgs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(x3, RestCompiledHeadArgs))) - { - foreach (bool l4 in getVariableArgIndex1(HeadArg, AllHeadArgs, _ArgIndex1)) - { - foreach (bool l5 in YP.unify(NextIndex, YP.add(Index, 1))) - { - foreach (bool l6 in compileArgUnifications(RestHeadArgs, RestCompiledHeadArgs, NextIndex, AllHeadArgs, BodyCode, ArgUnifications)) - { - yield return true; - yield break; - } - } - } - } - } - } - { - object Index = arg3; - object AllHeadArgs = arg4; - object BodyCode = arg5; - Variable _HeadArg = new Variable(); - Variable RestHeadArgs = new Variable(); - Variable CompiledHeadArg = new Variable(); - Variable RestCompiledHeadArgs = new Variable(); - Variable ArgName = new Variable(); - Variable RestArgUnifications = new Variable(); - Variable NumberCodes = new Variable(); - Variable NumberAtom = new Variable(); - Variable NextIndex = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(_HeadArg, RestHeadArgs))) - { - foreach (bool l3 in YP.unify(arg2, new ListPair(CompiledHeadArg, RestCompiledHeadArgs))) - { - foreach (bool l4 in YP.unify(arg6, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.unify"), new ListPair(new Functor1("var", ArgName), new ListPair(CompiledHeadArg, Atom.NIL))), RestArgUnifications), Atom.NIL))) - { - foreach (bool l5 in YP.number_codes(Index, NumberCodes)) - { - foreach (bool l6 in YP.atom_codes(NumberAtom, NumberCodes)) - { - foreach (bool l7 in YP.atom_concat(Atom.a("arg"), NumberAtom, ArgName)) - { - foreach (bool l8 in YP.unify(NextIndex, YP.add(Index, 1))) - { - foreach (bool l9 in compileArgUnifications(RestHeadArgs, RestCompiledHeadArgs, NextIndex, AllHeadArgs, BodyCode, RestArgUnifications)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - } - } - - public static IEnumerable compileDeclarations(object arg1, object arg2, object arg3, object arg4, object arg5, object arg6) - { - { - object _HeadArgs = arg2; - Variable ArgAssignmentsIn = new Variable(); - Variable DeclarationsIn = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, ArgAssignmentsIn)) - { - foreach (bool l4 in YP.unify(arg4, ArgAssignmentsIn)) - { - foreach (bool l5 in YP.unify(arg5, DeclarationsIn)) - { - foreach (bool l6 in YP.unify(arg6, DeclarationsIn)) - { - yield return true; - yield break; - } - } - } - } - } - } - { - object HeadArgs = arg2; - object ArgAssignmentsIn = arg3; - object ArgAssignmentsOut = arg4; - object DeclarationsIn = arg5; - object DeclarationsOut = arg6; - Variable VariableName = new Variable(); - Variable Var = new Variable(); - Variable RestVariableNames = new Variable(); - Variable ArgIndex1 = new Variable(); - Variable NumberCodes = new Variable(); - Variable NumberAtom = new Variable(); - Variable ArgName = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("=", VariableName, Var), RestVariableNames))) - { - foreach (bool l3 in getVariableArgIndex1(Var, HeadArgs, ArgIndex1)) - { - foreach (bool l4 in YP.number_codes(ArgIndex1, NumberCodes)) - { - foreach (bool l5 in YP.atom_codes(NumberAtom, NumberCodes)) - { - foreach (bool l6 in YP.atom_concat(Atom.a("arg"), NumberAtom, ArgName)) - { - foreach (bool l7 in compileDeclarations(RestVariableNames, HeadArgs, new ListPair(new Functor2("f", VariableName, ArgName), ArgAssignmentsIn), ArgAssignmentsOut, DeclarationsIn, DeclarationsOut)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - { - object HeadArgs = arg2; - object ArgAssignmentsIn = arg3; - object ArgAssignmentsOut = arg4; - object DeclarationsIn = arg5; - Variable VariableName = new Variable(); - Variable _Var = new Variable(); - Variable RestVariableNames = new Variable(); - Variable DeclarationsOut = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("=", VariableName, _Var), RestVariableNames))) - { - foreach (bool l3 in YP.unify(arg6, new ListPair(new Functor3("declare", Atom.a("Variable"), VariableName, new Functor2("new", Atom.a("Variable"), Atom.NIL)), DeclarationsOut))) - { - foreach (bool l4 in compileDeclarations(RestVariableNames, HeadArgs, ArgAssignmentsIn, ArgAssignmentsOut, DeclarationsIn, DeclarationsOut)) - { - yield return true; - yield break; - } - } - } - } - } - - public static IEnumerable getVariableArgIndex1(object Var, object arg2, object arg3) - { - { - Variable FirstHeadArgs = new Variable(); - Variable RestHeadArgs = new Variable(); - Variable x4 = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(FirstHeadArgs, RestHeadArgs))) - { - foreach (bool l3 in YP.unify(arg3, 1)) - { - if (sameVariable(Var, FirstHeadArgs)) - { - foreach (bool l5 in getVariableArgIndex1(Var, RestHeadArgs, x4)) - { - goto cutIf1; - } - yield return false; - cutIf1: - yield break; - } - } - } - } - { - object Index = arg3; - Variable x2 = new Variable(); - Variable RestHeadArgs = new Variable(); - Variable RestIndex = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(x2, RestHeadArgs))) - { - foreach (bool l3 in getVariableArgIndex1(Var, RestHeadArgs, RestIndex)) - { - foreach (bool l4 in YP.unify(Index, YP.add(1, RestIndex))) - { - yield return true; - yield break; - } - } - } - } - } - - public static IEnumerable compileRuleBody(object arg1, object arg2, object arg3) - { - { - object A = arg1; - object State = arg2; - object PseudoCode = arg3; - if (YP.var(A)) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor1("call", A), Atom.a("true")), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", A, B))) - { - if (YP.var(A)) - { - foreach (bool l4 in compileRuleBody(new Functor2(",", new Functor1("call", A), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ACode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", A, B))) - { - foreach (bool l3 in compileFunctorCall(A, State, ACode)) - { - if (CompilerState.isDetNoneOut(State, A)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - foreach (bool l6 in YP.unify(PseudoCode, new ListPair(ACode, BCode))) - { - yield return true; - yield break; - } - } - } - if (CompilerState.isSemidetNoneOut(State, A)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - foreach (bool l6 in YP.unify(PseudoCode, new ListPair(new Functor2("if", ACode, BCode), Atom.NIL))) - { - yield return true; - yield break; - } - } - } - foreach (bool l4 in compileRuleBody(B, State, BCode)) - { - foreach (bool l5 in YP.unify(PseudoCode, new ListPair(new Functor2("foreach", ACode, BCode), Atom.NIL))) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable T = new Variable(); - Variable B = new Variable(); - Variable C = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2(";", new Functor2("->", A, T), B), C))) - { - foreach (bool l3 in compileRuleBody(new Functor2(";", new Functor2("->", A, new Functor2(",", T, C)), new Functor2(",", B, C)), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - Variable C = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2(";", A, B), C))) - { - foreach (bool l3 in compileRuleBody(new Functor2(";", new Functor2(",", A, C), new Functor2(",", B, C)), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ACode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("\\+", A), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("if", new Functor1("not", ACode), BCode), Atom.NIL))) - { - if (CompilerState.isSemidetNoneOut(State, A)) - { - foreach (bool l5 in compileFunctorCall(A, State, ACode)) - { - foreach (bool l6 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("\\+", A), B))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor2(";", new Functor2("->", A, Atom.a("fail")), Atom.a("true")), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("once", A), B))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor2(";", new Functor2("->", A, Atom.a("true")), Atom.a("fail")), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable T = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2("->", A, T), B))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor2(";", new Functor2("->", A, T), Atom.a("fail")), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - Variable C = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2("\\=", A, B), C))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor1("\\+", new Functor2("=", A, B)), C), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable ACode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", Atom.a("!"), A))) - { - foreach (bool l3 in compileRuleBody(A, State, ACode)) - { - foreach (bool l4 in append(ACode, new ListPair(Atom.a("yieldbreak"), Atom.NIL), PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable Name = new Variable(); - Variable A = new Variable(); - Variable ACode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("$CUTIF", Name), A))) - { - foreach (bool l3 in compileRuleBody(A, State, ACode)) - { - foreach (bool l4 in append(ACode, new ListPair(new Functor1("breakBlock", Name), Atom.NIL), PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - { - object _State = arg2; - Variable x1 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", Atom.a("fail"), x1))) - { - foreach (bool l3 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", Atom.a("true"), A))) - { - foreach (bool l3 in compileRuleBody(A, State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable Term = new Variable(); - Variable B = new Variable(); - Variable ACode = new Variable(); - Variable TermCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2("is", A, Term), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.unify"), new ListPair(ACode, new ListPair(TermCode, Atom.NIL))), BCode), Atom.NIL))) - { - foreach (bool l4 in compileTerm(A, State, ACode)) - { - foreach (bool l5 in compileExpression(Term, State, TermCode)) - { - foreach (bool l6 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - { - object State = arg2; - Variable ACode = new Variable(); - Variable B = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("$DET_NONE_OUT", ACode), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(ACode, BCode))) - { - foreach (bool l4 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable FunctionName = new Variable(); - Variable X1Code = new Variable(); - Variable X2Code = new Variable(); - Variable BCode = new Variable(); - Variable Name = new Variable(); - Variable X1 = new Variable(); - Variable X2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", A, B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("if", new Functor2("call", FunctionName, new ListPair(X1Code, new ListPair(X2Code, Atom.NIL))), BCode), Atom.NIL))) - { - foreach (bool l4 in YP.univ(A, ListPair.make(new object[] { Name, X1, X2 }))) - { - foreach (bool l5 in binaryExpressionConditional(Name, FunctionName)) - { - foreach (bool l6 in compileExpression(X1, State, X1Code)) - { - foreach (bool l7 in compileExpression(X2, State, X2Code)) - { - foreach (bool l8 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable Template = new Variable(); - Variable Goal = new Variable(); - Variable Bag = new Variable(); - Variable B = new Variable(); - Variable TemplateCode = new Variable(); - Variable FindallAnswers = new Variable(); - Variable GoalAndAddCode = new Variable(); - Variable BagCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor3("findall", Template, Goal, Bag), B))) - { - foreach (bool l3 in compileTerm(Template, State, TemplateCode)) - { - foreach (bool l4 in CompilerState.gensym(State, Atom.a("findallAnswers"), FindallAnswers)) - { - foreach (bool l5 in compileRuleBody(new Functor2(",", Goal, new Functor2(",", new Functor1("$DET_NONE_OUT", new Functor3("callMember", new Functor1("var", FindallAnswers), Atom.a("add"), Atom.NIL)), Atom.a("fail"))), State, GoalAndAddCode)) - { - foreach (bool l6 in compileTerm(Bag, State, BagCode)) - { - foreach (bool l7 in compileRuleBody(B, State, BCode)) - { - foreach (bool l8 in append(new ListPair(new Functor3("declare", Atom.a("FindallAnswers"), FindallAnswers, new Functor2("new", Atom.a("FindallAnswers"), new ListPair(TemplateCode, Atom.NIL))), GoalAndAddCode), new ListPair(new Functor2("foreach", new Functor3("callMember", new Functor1("var", FindallAnswers), Atom.a("result"), new ListPair(BagCode, Atom.NIL)), BCode), Atom.NIL), PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable Template = new Variable(); - Variable Goal = new Variable(); - Variable Bag = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor3("bagof", Template, Goal, Bag), B))) - { - foreach (bool l3 in compileBagof(Atom.a("result"), Template, Goal, Bag, B, State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable Template = new Variable(); - Variable Goal = new Variable(); - Variable Bag = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor3("setof", Template, Goal, Bag), B))) - { - foreach (bool l3 in compileBagof(Atom.a("resultSet"), Template, Goal, Bag, B, State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ATermCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("call", A), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.getIterator"), new ListPair(ATermCode, new ListPair(new Functor2("call", Atom.a("getDeclaringClass"), Atom.NIL), Atom.NIL))), BCode), Atom.NIL))) - { - foreach (bool l4 in compileTerm(A, State, ATermCode)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ATermCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("current_predicate", A), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("foreach", new Functor2("call", Atom.a("YP.current_predicate"), new ListPair(ATermCode, new ListPair(new Functor2("call", Atom.a("getDeclaringClass"), Atom.NIL), Atom.NIL))), BCode), Atom.NIL))) - { - foreach (bool l4 in compileTerm(A, State, ATermCode)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ATermCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("asserta", A), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("call", Atom.a("YP.asserta"), new ListPair(ATermCode, new ListPair(new Functor2("call", Atom.a("getDeclaringClass"), Atom.NIL), Atom.NIL))), BCode))) - { - foreach (bool l4 in compileTerm(A, State, ATermCode)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ATermCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("assertz", A), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("call", Atom.a("YP.assertz"), new ListPair(ATermCode, new ListPair(new Functor2("call", Atom.a("getDeclaringClass"), Atom.NIL), Atom.NIL))), BCode))) - { - foreach (bool l4 in compileTerm(A, State, ATermCode)) - { - foreach (bool l5 in compileRuleBody(B, State, BCode)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor1("assert", A), B))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", new Functor1("assertz", A), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - Variable Goal = new Variable(); - Variable Catcher = new Variable(); - Variable Handler = new Variable(); - Variable B = new Variable(); - Variable CatchGoal = new Variable(); - Variable GoalTermCode = new Variable(); - Variable BCode = new Variable(); - Variable CatcherTermCode = new Variable(); - Variable HandlerAndBCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor3("catch", Goal, Catcher, Handler), B))) - { - foreach (bool l3 in YP.unify(arg3, ListPair.make(new object[] { new Functor3("declare", Atom.a("YP.Catch"), CatchGoal, new Functor2("new", Atom.a("YP.Catch"), new ListPair(GoalTermCode, new ListPair(new Functor2("call", Atom.a("getDeclaringClass"), Atom.NIL), Atom.NIL)))), new Functor2("foreach", new Functor1("var", CatchGoal), BCode), new Functor2("foreach", new Functor3("callMember", new Functor1("var", CatchGoal), Atom.a("unifyExceptionOrThrow"), new ListPair(CatcherTermCode, Atom.NIL)), HandlerAndBCode) }))) - { - foreach (bool l4 in CompilerState.gensym(State, Atom.a("catchGoal"), CatchGoal)) - { - foreach (bool l5 in compileTerm(Goal, State, GoalTermCode)) - { - foreach (bool l6 in compileTerm(Catcher, State, CatcherTermCode)) - { - foreach (bool l7 in compileRuleBody(B, State, BCode)) - { - foreach (bool l8 in compileRuleBody(new Functor2(",", Handler, B), State, HandlerAndBCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - Variable C = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(",", new Functor2(",", A, B), C))) - { - foreach (bool l3 in compileRuleBody(new Functor2(",", A, new Functor2(",", B, C)), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(";", A, B))) - { - if (YP.var(A)) - { - foreach (bool l4 in compileRuleBody(new Functor2(";", new Functor1("call", A), B), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - Variable A = new Variable(); - Variable T = new Variable(); - Variable B = new Variable(); - Variable CutIfLabel = new Variable(); - Variable Code = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(";", new Functor2("->", A, T), B))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor2("breakableBlock", CutIfLabel, Code), Atom.NIL))) - { - foreach (bool l4 in CompilerState.gensym(State, Atom.a("cutIf"), CutIfLabel)) - { - foreach (bool l5 in compileRuleBody(new Functor2(";", new Functor2(",", A, new Functor2(",", new Functor1("$CUTIF", CutIfLabel), T)), B), State, Code)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable _B = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(";", Atom.a("!"), _B))) - { - foreach (bool l3 in compileRuleBody(Atom.a("!"), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - object PseudoCode = arg3; - Variable A = new Variable(); - Variable B = new Variable(); - Variable ACode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2(";", A, B))) - { - foreach (bool l3 in compileRuleBody(A, State, ACode)) - { - foreach (bool l4 in compileRuleBody(B, State, BCode)) - { - foreach (bool l5 in append(ACode, BCode, PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("!"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("return"), Atom.NIL))) - { - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("!"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("returntrue"), Atom.NIL))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("!"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("yieldtrue"), new ListPair(Atom.a("yieldbreak"), Atom.NIL)))) - { - CompilerState.setCodeUsesYield(State); - yield return true; - yield break; - } - } - } - { - object _State = arg2; - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("$CUTIF", Name))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(new Functor1("breakBlock", Name), Atom.NIL))) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("true"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("return"), Atom.NIL))) - { - if (CompilerState.determinismEquals(State, Atom.a("detNoneOut"))) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("true"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("returntrue"), Atom.NIL))) - { - if (CompilerState.determinismEquals(State, Atom.a("semidetNoneOut"))) - { - yield return true; - yield break; - } - } - } - } - { - object State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.a("true"))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(Atom.a("yieldfalse"), Atom.NIL))) - { - CompilerState.setCodeUsesYield(State); - yield return true; - yield break; - } - } - } - { - object A = arg1; - object State = arg2; - object PseudoCode = arg3; - foreach (bool l2 in compileRuleBody(new Functor2(",", A, Atom.a("true")), State, PseudoCode)) - { - yield return true; - yield break; - } - } - } - - public static IEnumerable compileBagof(object ResultMethod, object Template, object Goal, object Bag, object B, object State, object PseudoCode) - { - { - Variable TemplateCode = new Variable(); - Variable GoalTermCode = new Variable(); - Variable UnqualifiedGoal = new Variable(); - Variable BagofAnswers = new Variable(); - Variable GoalAndAddCode = new Variable(); - Variable BagCode = new Variable(); - Variable BCode = new Variable(); - foreach (bool l2 in compileTerm(Template, State, TemplateCode)) - { - foreach (bool l3 in compileTerm(Goal, State, GoalTermCode)) - { - foreach (bool l4 in unqualifiedGoal(Goal, UnqualifiedGoal)) - { - foreach (bool l5 in CompilerState.gensym(State, Atom.a("bagofAnswers"), BagofAnswers)) - { - foreach (bool l6 in compileRuleBody(new Functor2(",", UnqualifiedGoal, new Functor2(",", new Functor1("$DET_NONE_OUT", new Functor3("callMember", new Functor1("var", BagofAnswers), Atom.a("add"), Atom.NIL)), Atom.a("fail"))), State, GoalAndAddCode)) - { - foreach (bool l7 in compileTerm(Bag, State, BagCode)) - { - foreach (bool l8 in compileRuleBody(B, State, BCode)) - { - foreach (bool l9 in append(new ListPair(new Functor3("declare", Atom.a("BagofAnswers"), BagofAnswers, new Functor2("new", Atom.a("BagofAnswers"), new ListPair(TemplateCode, new ListPair(GoalTermCode, Atom.NIL)))), GoalAndAddCode), new ListPair(new Functor2("foreach", new Functor3("callMember", new Functor1("var", BagofAnswers), ResultMethod, new ListPair(BagCode, Atom.NIL)), BCode), Atom.NIL), PseudoCode)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - } - } - } - - public static IEnumerable unqualifiedGoal(object arg1, object arg2) - { - { - object Goal = arg1; - foreach (bool l2 in YP.unify(arg2, new Functor1("call", Goal))) - { - if (YP.var(Goal)) - { - yield return true; - yield break; - } - } - } - { - object UnqualifiedGoal = arg2; - Variable x1 = new Variable(); - Variable Goal = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("^", x1, Goal))) - { - foreach (bool l3 in unqualifiedGoal(Goal, UnqualifiedGoal)) - { - yield return true; - yield break; - } - } - } - { - Variable UnqualifiedGoal = new Variable(); - foreach (bool l2 in YP.unify(arg1, UnqualifiedGoal)) - { - foreach (bool l3 in YP.unify(arg2, UnqualifiedGoal)) - { - yield return true; - yield break; - } - } - } - } - - public static IEnumerable binaryExpressionConditional(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("=:="))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.equal"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("=\\="))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.notEqual"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a(">"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.greaterThan"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("<"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.lessThan"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a(">="))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.greaterThanOrEqual"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("=<"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.lessThanOrEqual"))) - { - yield return true; - yield break; - } - } - } - } - - public static IEnumerable compileFunctorCall(object Functor_1, object State, object PseudoCode) - { - { - Variable FunctorName = new Variable(); - Variable FunctorArgs = new Variable(); - Variable x6 = new Variable(); - Variable Arity = new Variable(); - Variable FunctionName = new Variable(); - Variable CompiledArgs = new Variable(); - foreach (bool l2 in YP.univ(Functor_1, new ListPair(FunctorName, FunctorArgs))) - { - foreach (bool l3 in YP.functor(Functor_1, x6, Arity)) - { - foreach (bool l4 in functorCallFunctionName(State, FunctorName, Arity, FunctionName)) - { - foreach (bool l5 in maplist_compileTerm(FunctorArgs, State, CompiledArgs)) - { - if (YP.termEqual(FunctionName, Atom.NIL)) - { - foreach (bool l7 in YP.unify(PseudoCode, new Functor2("call", Atom.a("YP.matchDynamic"), new ListPair(new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", FunctorName), Atom.NIL)), new ListPair(new Functor1("objectArray", CompiledArgs), Atom.NIL))))) - { - yield return true; - yield break; - } - goto cutIf1; - } - foreach (bool l6 in YP.unify(PseudoCode, new Functor3("functorCall", FunctionName, FunctorArgs, CompiledArgs))) - { - yield return true; - yield break; - } - cutIf1: - { } - } - } - } - } - } - } - - public static IEnumerable functorCallFunctionName(object arg1, object arg2, object arg3, object arg4) - { - { - object _State = arg1; - object Name = arg2; - object Arity = arg3; - object x4 = arg4; - if (functorCallIsSpecialForm(Name, Arity)) - { - yield break; - } - } - { - object x1 = arg1; - object Name = arg2; - object Arity = arg3; - object FunctionName = arg4; - foreach (bool l2 in functorCallYPFunctionName(Name, Arity, FunctionName)) - { - yield return true; - yield break; - } - } - { - object State = arg1; - object Arity = arg3; - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg2, Name)) - { - foreach (bool l3 in YP.unify(arg4, Name)) - { - if (CompilerState.nameArityHasModule(State, Name, Arity, Atom.a(""))) - { - yield return true; - yield break; - } - } - } - } - { - object _State = arg1; - object _Arity = arg3; - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg2, Name)) - { - foreach (bool l3 in YP.unify(arg4, Name)) - { - foreach (bool l4 in Atom.module(Name, Atom.a(""))) - { - yield return true; - yield break; - } - } - } - } - { - object _State = arg1; - object Name = arg2; - object _Arity = arg3; - foreach (bool l2 in YP.unify(arg4, Atom.NIL)) - { - foreach (bool l3 in Atom.module(Name, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object _State = arg1; - object Name = arg2; - object Arity = arg3; - object x4 = arg4; - Variable Module = new Variable(); - Variable Message = new Variable(); - foreach (bool l2 in Atom.module(Name, Module)) - { - foreach (bool l3 in YP.atom_concat(Atom.a("Not supporting calls to external module: "), Module, Message)) - { - YP.throwException(new Functor2("error", new Functor2("type_error", Atom.a("callable"), new Functor2("/", Name, Arity)), Message)); - yield return true; - yield break; - } - } - } - { - object _State = arg1; - object Name = arg2; - object _Arity = arg3; - object x4 = arg4; - YP.throwException(new Functor2("error", new Functor2("type_error", Atom.a("callable"), Name), Atom.a("Term is not callable"))); - yield return true; - yield break; - } - } - - public static bool functorCallIsSpecialForm(object Name, object Arity) - { - { - Variable x3 = new Variable(); - if (YP.termEqual(Arity, 0)) - { - if (YP.termEqual(Name, Atom.a("!"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("fail"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("true"))) - { - return true; - } - } - if (YP.termEqual(Arity, 1)) - { - if (YP.termEqual(Name, Atom.a("\\+"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("once"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("$CUTIF"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("$DET_NONE_OUT"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("call"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("current_predicate"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("asserta"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("assertz"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("assert"))) - { - return true; - } - } - if (YP.termEqual(Arity, 2)) - { - if (YP.termEqual(Name, Atom.a(";"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a(","))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("->"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("\\="))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("is"))) - { - return true; - } - foreach (bool l3 in binaryExpressionConditional(Name, x3)) - { - return true; - } - } - if (YP.termEqual(Arity, 3)) - { - if (YP.termEqual(Name, Atom.a("findall"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("bagof"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("setof"))) - { - return true; - } - if (YP.termEqual(Name, Atom.a("catch"))) - { - return true; - } - } - } - return false; - } - - public static IEnumerable functorCallYPFunctionName(object arg1, object arg2, object arg3) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("="))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.unify"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("=.."))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.univ"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("var"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.var"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("nonvar"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.nonvar"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("arg"))) - { - foreach (bool l3 in YP.unify(arg2, 3)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.arg"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("functor"))) - { - foreach (bool l3 in YP.unify(arg2, 3)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.functor"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("repeat"))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.repeat"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("get_code"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.get_code"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("current_op"))) - { - foreach (bool l3 in YP.unify(arg2, 3)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.current_op"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atom_length"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atom_length"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atom_concat"))) - { - foreach (bool l3 in YP.unify(arg2, 3)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atom_concat"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("sub_atom"))) - { - foreach (bool l3 in YP.unify(arg2, 5)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.sub_atom"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atom_chars"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atom_chars"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atom_codes"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atom_codes"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("char_code"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.char_code"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("number_chars"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.number_chars"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("number_codes"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.number_codes"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("copy_term"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.copy_term"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("sort"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.sort"))) - { - yield return true; - yield break; - } - } - } - } - { - // Manually included : script_event for callback to LSL/C# - - //object x1 = arg1; - foreach (bool l2 in YP.unify(arg1, Atom.a(@"script_event"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a(@"YP.script_event"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("nl"))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.nl"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("write"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.write"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("put_code"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.put_code"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("see"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.see"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("seen"))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.seen"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("tell"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.tell"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("told"))) - { - foreach (bool l3 in YP.unify(arg2, 0)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.told"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("clause"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.clause"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("retract"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.retract"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("abolish"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.abolish"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("retractall"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.retractall"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atom"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atom"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("integer"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.integer"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("float"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.isFloat"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("number"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.number"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atomic"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.atomic"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("compound"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.compound"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("=="))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termEqual"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("\\=="))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termNotEqual"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("@<"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termLessThan"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("@=<"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termLessThanOrEqual"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("@>"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termGreaterThan"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("@>="))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.termGreaterThanOrEqual"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("throw"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.throwException"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("current_prolog_flag"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.current_prolog_flag"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("set_prolog_flag"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.set_prolog_flag"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("current_input"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.current_input"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("current_output"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("YP.current_output"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("read_term"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("Parser.read_term2"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("read_term"))) - { - foreach (bool l3 in YP.unify(arg2, 3)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("Parser.read_term3"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("read"))) - { - foreach (bool l3 in YP.unify(arg2, 1)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("Parser.read1"))) - { - yield return true; - yield break; - } - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("read"))) - { - foreach (bool l3 in YP.unify(arg2, 2)) - { - foreach (bool l4 in YP.unify(arg3, Atom.a("Parser.read2"))) - { - yield return true; - yield break; - } - } - } - } - } - - public static IEnumerable compileTerm(object arg1, object arg2, object arg3) - { - { - object Term = arg1; - object State = arg2; - Variable VariableName = new Variable(); - foreach (bool l2 in YP.unify(arg3, new Functor1("var", VariableName))) - { - if (YP.var(Term)) - { - foreach (bool l4 in CompilerState.getVariableName(State, Term, VariableName)) - { - yield return true; - yield break; - } - } - } - } - { - object _State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, new Functor1("var", Atom.a("Atom.NIL")))) - { - yield return true; - yield break; - } - } - } - { - object Term = arg1; - object State = arg2; - object Code = arg3; - Variable ModuleCode = new Variable(); - if (YP.atom(Term)) - { - foreach (bool l3 in compileAtomModule(Term, 0, State, ModuleCode)) - { - foreach (bool l4 in YP.unify(Code, new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", Term), new ListPair(ModuleCode, Atom.NIL))))) - { - yield return true; - yield break; - } - goto cutIf1; - } - foreach (bool l3 in YP.unify(Code, new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", Term), Atom.NIL)))) - { - yield return true; - yield break; - } - cutIf1: - { } - } - } - { - object State = arg2; - Variable First = new Variable(); - Variable Rest = new Variable(); - Variable CompiledList = new Variable(); - Variable x5 = new Variable(); - Variable Rest2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Rest))) - { - foreach (bool l3 in YP.unify(arg3, new Functor2("call", Atom.a("ListPair.make"), new ListPair(new Functor1("objectArray", CompiledList), Atom.NIL)))) - { - if (YP.nonvar(Rest)) - { - foreach (bool l5 in YP.unify(Rest, new ListPair(x5, Rest2))) - { - if (YP.termNotEqual(Rest2, Atom.NIL)) - { - foreach (bool l7 in maplist_compileTerm(new ListPair(First, Rest), State, CompiledList)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - { - object State = arg2; - Variable First = new Variable(); - Variable Rest = new Variable(); - Variable Arg1 = new Variable(); - Variable Arg2 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Rest))) - { - foreach (bool l3 in YP.unify(arg3, new Functor2("new", Atom.a("ListPair"), new ListPair(Arg1, new ListPair(Arg2, Atom.NIL))))) - { - foreach (bool l4 in compileTerm(First, State, Arg1)) - { - foreach (bool l5 in compileTerm(Rest, State, Arg2)) - { - yield return true; - yield break; - } - } - } - } - } - { - object Term = arg1; - object State = arg2; - object Result = arg3; - Variable Name = new Variable(); - Variable TermArgs = new Variable(); - Variable x6 = new Variable(); - Variable Arity = new Variable(); - Variable ModuleCode = new Variable(); - Variable NameCode = new Variable(); - Variable X1 = new Variable(); - Variable Arg1 = new Variable(); - Variable X2 = new Variable(); - Variable Arg2 = new Variable(); - Variable X3 = new Variable(); - Variable Arg3 = new Variable(); - Variable Args = new Variable(); - foreach (bool l2 in YP.univ(Term, new ListPair(Name, TermArgs))) - { - if (YP.termEqual(TermArgs, Atom.NIL)) - { - foreach (bool l4 in YP.unify(Result, new Functor1("object", Name))) - { - yield return true; - yield break; - } - goto cutIf2; - } - foreach (bool l3 in YP.functor(Term, x6, Arity)) - { - foreach (bool l4 in compileAtomModule(Name, Arity, State, ModuleCode)) - { - foreach (bool l5 in YP.unify(NameCode, new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", Name), new ListPair(ModuleCode, Atom.NIL))))) - { - foreach (bool l6 in YP.unify(TermArgs, new ListPair(X1, Atom.NIL))) - { - foreach (bool l7 in compileTerm(X1, State, Arg1)) - { - foreach (bool l8 in YP.unify(Result, new Functor2("new", Atom.a("Functor1"), new ListPair(NameCode, new ListPair(Arg1, Atom.NIL))))) - { - yield return true; - yield break; - } - } - goto cutIf4; - } - foreach (bool l6 in YP.unify(TermArgs, new ListPair(X1, new ListPair(X2, Atom.NIL)))) - { - foreach (bool l7 in compileTerm(X1, State, Arg1)) - { - foreach (bool l8 in compileTerm(X2, State, Arg2)) - { - foreach (bool l9 in YP.unify(Result, new Functor2("new", Atom.a("Functor2"), ListPair.make(new object[] { NameCode, Arg1, Arg2 })))) - { - yield return true; - yield break; - } - } - } - goto cutIf5; - } - foreach (bool l6 in YP.unify(TermArgs, ListPair.make(new object[] { X1, X2, X3 }))) - { - foreach (bool l7 in compileTerm(X1, State, Arg1)) - { - foreach (bool l8 in compileTerm(X2, State, Arg2)) - { - foreach (bool l9 in compileTerm(X3, State, Arg3)) - { - foreach (bool l10 in YP.unify(Result, new Functor2("new", Atom.a("Functor3"), ListPair.make(new object[] { NameCode, Arg1, Arg2, Arg3 })))) - { - yield return true; - yield break; - } - } - } - } - } - foreach (bool l6 in maplist_compileTerm(TermArgs, State, Args)) - { - foreach (bool l7 in YP.unify(Result, new Functor2("new", Atom.a("Functor"), new ListPair(NameCode, new ListPair(new Functor1("objectArray", Args), Atom.NIL))))) - { - yield return true; - yield break; - } - } - cutIf5: - cutIf4: - { } - } - goto cutIf3; - } - foreach (bool l4 in YP.unify(NameCode, new Functor1("object", Name))) - { - foreach (bool l5 in YP.unify(TermArgs, new ListPair(X1, Atom.NIL))) - { - foreach (bool l6 in compileTerm(X1, State, Arg1)) - { - foreach (bool l7 in YP.unify(Result, new Functor2("new", Atom.a("Functor1"), new ListPair(NameCode, new ListPair(Arg1, Atom.NIL))))) - { - yield return true; - yield break; - } - } - goto cutIf6; - } - foreach (bool l5 in YP.unify(TermArgs, new ListPair(X1, new ListPair(X2, Atom.NIL)))) - { - foreach (bool l6 in compileTerm(X1, State, Arg1)) - { - foreach (bool l7 in compileTerm(X2, State, Arg2)) - { - foreach (bool l8 in YP.unify(Result, new Functor2("new", Atom.a("Functor2"), ListPair.make(new object[] { NameCode, Arg1, Arg2 })))) - { - yield return true; - yield break; - } - } - } - goto cutIf7; - } - foreach (bool l5 in YP.unify(TermArgs, ListPair.make(new object[] { X1, X2, X3 }))) - { - foreach (bool l6 in compileTerm(X1, State, Arg1)) - { - foreach (bool l7 in compileTerm(X2, State, Arg2)) - { - foreach (bool l8 in compileTerm(X3, State, Arg3)) - { - foreach (bool l9 in YP.unify(Result, new Functor2("new", Atom.a("Functor3"), ListPair.make(new object[] { NameCode, Arg1, Arg2, Arg3 })))) - { - yield return true; - yield break; - } - } - } - } - } - foreach (bool l5 in maplist_compileTerm(TermArgs, State, Args)) - { - foreach (bool l6 in YP.unify(Result, new Functor2("new", Atom.a("Functor"), new ListPair(NameCode, new ListPair(new Functor1("objectArray", Args), Atom.NIL))))) - { - yield return true; - yield break; - } - } - cutIf7: - cutIf6: - { } - } - cutIf3: - { } - } - cutIf2: - { } - } - } - } - - public static IEnumerable compileAtomModule(object Name, object arg2, object arg3, object ModuleCode) - { - { - object Arity = arg2; - object State = arg3; - if (CompilerState.nameArityHasModule(State, Name, Arity, Atom.a(""))) - { - foreach (bool l3 in YP.unify(ModuleCode, new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", Atom.a("")), Atom.NIL)))) - { - yield return true; - yield break; - } - } - } - { - object _Arity = arg2; - object _State = arg3; - Variable Module = new Variable(); - foreach (bool l2 in Atom.module(Name, Module)) - { - if (YP.termNotEqual(Module, Atom.NIL)) - { - foreach (bool l4 in YP.unify(ModuleCode, new Functor2("call", Atom.a("Atom.a"), new ListPair(new Functor1("object", Module), Atom.NIL)))) - { - yield return true; - yield break; - } - } - } - } - } - - public static IEnumerable maplist_compileTerm(object arg1, object arg2, object arg3) - { - { - object _State = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg3, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - { - object State = arg2; - Variable First = new Variable(); - Variable Rest = new Variable(); - Variable FirstResult = new Variable(); - Variable RestResults = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(First, Rest))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(FirstResult, RestResults))) - { - if (YP.nonvar(Rest)) - { - foreach (bool l5 in compileTerm(First, State, FirstResult)) - { - foreach (bool l6 in maplist_compileTerm(Rest, State, RestResults)) - { - yield return true; - yield break; - } - } - } - } - } - } - } - - public static IEnumerable compileExpression(object Term, object State, object Result) - { - { - Variable Name = new Variable(); - Variable TermArgs = new Variable(); - Variable X1 = new Variable(); - Variable FunctionName = new Variable(); - Variable Arg1 = new Variable(); - Variable x9 = new Variable(); - Variable X2 = new Variable(); - Variable Arg2 = new Variable(); - Variable x12 = new Variable(); - Variable Arity = new Variable(); - if (YP.nonvar(Term)) - { - foreach (bool l3 in YP.univ(Term, new ListPair(Name, TermArgs))) - { - if (YP.atom(Name)) - { - foreach (bool l5 in YP.unify(TermArgs, new ListPair(X1, Atom.NIL))) - { - foreach (bool l6 in unaryFunction(Name, FunctionName)) - { - foreach (bool l7 in compileExpression(X1, State, Arg1)) - { - foreach (bool l8 in YP.unify(Result, new Functor2("call", FunctionName, new ListPair(Arg1, Atom.NIL)))) - { - yield return true; - yield break; - } - } - goto cutIf1; - } - } - foreach (bool l5 in YP.unify(Term, new ListPair(x9, Atom.NIL))) - { - foreach (bool l6 in compileTerm(Term, State, Result)) - { - yield return true; - yield break; - } - goto cutIf2; - } - foreach (bool l5 in YP.unify(TermArgs, new ListPair(X1, new ListPair(X2, Atom.NIL)))) - { - foreach (bool l6 in binaryFunction(Name, FunctionName)) - { - foreach (bool l7 in compileExpression(X1, State, Arg1)) - { - foreach (bool l8 in compileExpression(X2, State, Arg2)) - { - foreach (bool l9 in YP.unify(Result, new Functor2("call", FunctionName, new ListPair(Arg1, new ListPair(Arg2, Atom.NIL))))) - { - yield return true; - yield break; - } - } - } - goto cutIf3; - } - } - foreach (bool l5 in YP.functor(Term, x12, Arity)) - { - YP.throwException(new Functor2("error", new Functor2("type_error", Atom.a("evaluable"), new Functor2("/", Name, Arity)), Atom.a("Not an expression function"))); - yield return false; - } - cutIf3: - cutIf2: - cutIf1: - { } - } - } - } - } - { - foreach (bool l2 in compileTerm(Term, State, Result)) - { - yield return true; - yield break; - } - } - } - - public static IEnumerable unaryFunction(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("-"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.negate"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("abs"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.abs"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("sign"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.sign"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("float"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.toFloat"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("floor"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.floor"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("truncate"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.truncate"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("round"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.round"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("ceiling"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.ceiling"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("sin"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.sin"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("cos"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.cos"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("atan"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.atan"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("exp"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.exp"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("log"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.log"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("sqrt"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.sqrt"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("\\"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.bitwiseComplement"))) - { - yield return true; - yield break; - } - } - } - } - - public static IEnumerable binaryFunction(object arg1, object arg2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("+"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.add"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("-"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.subtract"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("*"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.multiply"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("/"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.divide"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("//"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.intDivide"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("mod"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.mod"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("**"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.pow"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a(">>"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.bitwiseShiftRight"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("<<"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.bitwiseShiftLeft"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("/\\"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.bitwiseAnd"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("\\/"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.bitwiseOr"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("min"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.min"))) - { - yield return true; - yield break; - } - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("max"))) - { - foreach (bool l3 in YP.unify(arg2, Atom.a("YP.max"))) - { - yield return true; - yield break; - } - } - } - } - - public static void convertFunctionCSharp(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("getDeclaringClass"))) - { - YP.write(Atom.a("public class YPInnerClass {}")); - YP.nl(); - YP.write(Atom.a("public static System.Type getDeclaringClass() { return typeof(YPInnerClass).DeclaringType; }")); - YP.nl(); - YP.nl(); - return; - } - } - { - Variable ReturnType = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable Body = new Variable(); - Variable Level = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor("function", new object[] { ReturnType, Name, ArgList, Body }))) - { - YP.write(Atom.a("public static ")); - YP.write(ReturnType); - YP.write(Atom.a(" ")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(") {")); - YP.nl(); - foreach (bool l3 in YP.unify(Level, 1)) - { - convertStatementListCSharp(Body, Level); - YP.write(Atom.a("}")); - YP.nl(); - YP.nl(); - return; - } - } - } - } - - public static IEnumerable convertStatementListCSharp(object arg1, object x1, object x2) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - yield return true; - yield break; - } - } - } - - public static void convertStatementListCSharp(object arg1, object Level) - { - { - Variable Name = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NewStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("breakableBlock", Name, Body), RestStatements))) - { - foreach (bool l3 in append(Body, new ListPair(new Functor1("label", Name), RestStatements), NewStatements)) - { - convertStatementListCSharp(NewStatements, Level); - return; - } - } - } - { - Variable Type = new Variable(); - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("declare", Type, Name, Expression), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Type); - YP.write(Atom.a(" ")); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionCSharp(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("assign", Name, Expression), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionCSharp(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldtrue"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("yield return true;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldfalse"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("yield return false;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldbreak"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("yield break;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("return"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("return;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returntrue"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("return true;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returnfalse"), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("return false;")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable Name = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("label", Name), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Name); - YP.write(Atom.a(":")); - YP.nl(); - if (YP.termEqual(RestStatements, Atom.NIL)) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("{}")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - goto cutIf1; - } - convertStatementListCSharp(RestStatements, Level); - return; - cutIf1: - { } - } - } - { - Variable Name = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("breakBlock", Name), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("goto ")); - YP.write(Name); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("call", Name, ArgList), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(");")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("functorCall", Name, _FunctorArgs, ArgList), RestStatements))) - { - convertStatementListCSharp(new ListPair(new Functor2("call", Name, ArgList), RestStatements), Level); - return; - } - } - { - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("callMember", new Functor1("var", Obj), Name, ArgList), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(");")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - { - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("blockScope", Body), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("{")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListCSharp(Body, NextLevel); - convertIndentationCSharp(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - } - { - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("if", Expression, Body), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("if (")); - convertExpressionCSharp(Expression); - YP.write(Atom.a(") {")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListCSharp(Body, NextLevel); - convertIndentationCSharp(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - } - { - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("foreach", Expression, Body), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("foreach (bool l")); - YP.write(Level); - YP.write(Atom.a(" in ")); - convertExpressionCSharp(Expression); - YP.write(Atom.a(") {")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListCSharp(Body, NextLevel); - convertIndentationCSharp(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - } - { - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("throw", Expression), RestStatements))) - { - convertIndentationCSharp(Level); - YP.write(Atom.a("throw ")); - convertExpressionCSharp(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListCSharp(RestStatements, Level); - return; - } - } - } - - public static void convertIndentationCSharp(object Level) - { - { - Variable N = new Variable(); - foreach (bool l2 in YP.unify(N, YP.multiply(Level, 2))) - { - repeatWrite(Atom.a(" "), N); - return; - } - } - } - - public static void convertArgListCSharp(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Head = new Variable(); - Variable Tail = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Head, Tail))) - { - convertExpressionCSharp(Head); - if (YP.termNotEqual(Tail, Atom.NIL)) - { - YP.write(Atom.a(", ")); - convertArgListCSharp(Tail); - return; - goto cutIf1; - } - convertArgListCSharp(Tail); - return; - cutIf1: - { } - } - } - } - - public static void convertExpressionCSharp(object arg1) - { - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("arg", X))) - { - YP.write(Atom.a("object ")); - YP.write(X); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("call", Name, ArgList))) - { - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("functorCall", Name, _FunctorArgs, ArgList))) - { - convertExpressionCSharp(new Functor2("call", Name, ArgList)); - return; - } - } - { - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("callMember", new Functor1("var", Obj), Name, ArgList))) - { - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("new", Name, ArgList))) - { - YP.write(Atom.a("new ")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListCSharp(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("var", Name))) - { - YP.write(Name); - return; - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("null"))) - { - YP.write(Atom.a("null")); - return; - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("not", X))) - { - YP.write(Atom.a("!(")); - convertExpressionCSharp(X); - YP.write(Atom.a(")")); - return; - } - } - { - Variable X = new Variable(); - Variable Y = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("and", X, Y))) - { - YP.write(Atom.a("(")); - convertExpressionCSharp(X); - YP.write(Atom.a(") && (")); - convertExpressionCSharp(Y); - YP.write(Atom.a(")")); - return; - } - } - { - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("objectArray", ArgList))) - { - YP.write(Atom.a("new object[] {")); - convertArgListCSharp(ArgList); - YP.write(Atom.a("}")); - return; - } - } - { - Variable X = new Variable(); - Variable Codes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - if (YP.atom(X)) - { - YP.write(Atom.a("\"")); - foreach (bool l4 in YP.atom_codes(X, Codes)) - { - convertStringCodesCSharp(Codes); - YP.write(Atom.a("\"")); - return; - } - } - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - YP.write(X); - return; - } - } - } - - public static void convertStringCodesCSharp(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Code = new Variable(); - Variable RestCodes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Code, RestCodes))) - { - foreach (bool l3 in putCStringCode(Code)) - { - convertStringCodesCSharp(RestCodes); - return; - } - } - } - } - - public static void convertFunctionJavascript(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("getDeclaringClass"))) - { - YP.write(Atom.a("function getDeclaringClass() { return null; }")); - YP.nl(); - YP.nl(); - return; - } - } - { - Variable x1 = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable Body = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor("function", new object[] { x1, Name, ArgList, Body }))) - { - YP.write(Atom.a("function ")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(") {")); - YP.nl(); - convertStatementListJavascript(Body, 1); - YP.write(Atom.a("}")); - YP.nl(); - YP.nl(); - return; - } - } - } - - public static void convertStatementListJavascript(object arg1, object arg2) - { - { - object x1 = arg2; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - object Level = arg2; - Variable Name = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("breakableBlock", Name, Body), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Name); - YP.write(Atom.a(":")); - YP.nl(); - convertIndentationJavascript(Level); - YP.write(Atom.a("{")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListJavascript(Body, NextLevel); - convertIndentationJavascript(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - } - { - object Level = arg2; - Variable _Type = new Variable(); - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("declare", _Type, Name, Expression), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("var ")); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionJavascript(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("assign", Name, Expression), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionJavascript(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldtrue"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("yield true;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldfalse"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("yield false;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldbreak"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("return;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("return"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("return;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returntrue"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("return true;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returnfalse"), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("return false;")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable Name = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("breakBlock", Name), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("break ")); - YP.write(Name); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("call", Name, ArgList), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(");")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("functorCall", Name, _FunctorArgs, ArgList), RestStatements))) - { - convertStatementListJavascript(new ListPair(new Functor2("call", Name, ArgList), RestStatements), Level); - return; - } - } - { - object Level = arg2; - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("callMember", new Functor1("var", Obj), Name, ArgList), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(");")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - { - object Level = arg2; - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("blockScope", Body), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("{")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListJavascript(Body, NextLevel); - convertIndentationJavascript(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - } - { - object Level = arg2; - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("if", Expression, Body), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("if (")); - convertExpressionJavascript(Expression); - YP.write(Atom.a(") {")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListJavascript(Body, NextLevel); - convertIndentationJavascript(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - } - { - object Level = arg2; - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("foreach", Expression, Body), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("for each (var l")); - YP.write(Level); - YP.write(Atom.a(" in ")); - convertExpressionJavascript(Expression); - YP.write(Atom.a(") {")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - convertStatementListJavascript(Body, NextLevel); - convertIndentationJavascript(Level); - YP.write(Atom.a("}")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - } - { - object Level = arg2; - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("throw", Expression), RestStatements))) - { - convertIndentationJavascript(Level); - YP.write(Atom.a("throw ")); - convertExpressionJavascript(Expression); - YP.write(Atom.a(";")); - YP.nl(); - convertStatementListJavascript(RestStatements, Level); - return; - } - } - } - - public static void convertIndentationJavascript(object Level) - { - { - Variable N = new Variable(); - foreach (bool l2 in YP.unify(N, YP.multiply(Level, 2))) - { - repeatWrite(Atom.a(" "), N); - return; - } - } - } - - public static void convertArgListJavascript(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Head = new Variable(); - Variable Tail = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Head, Tail))) - { - convertExpressionJavascript(Head); - if (YP.termNotEqual(Tail, Atom.NIL)) - { - YP.write(Atom.a(", ")); - convertArgListJavascript(Tail); - return; - goto cutIf1; - } - convertArgListJavascript(Tail); - return; - cutIf1: - { } - } - } - } - - public static void convertExpressionJavascript(object arg1) - { - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("arg", X))) - { - YP.write(X); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("call", Name, ArgList))) - { - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("functorCall", Name, _FunctorArgs, ArgList))) - { - convertExpressionJavascript(new Functor2("call", Name, ArgList)); - return; - } - } - { - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("callMember", new Functor1("var", Obj), Name, ArgList))) - { - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("new", Name, ArgList))) - { - YP.write(Atom.a("new ")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListJavascript(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("var", Name))) - { - YP.write(Name); - return; - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("null"))) - { - YP.write(Atom.a("null")); - return; - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("not", X))) - { - YP.write(Atom.a("!(")); - convertExpressionJavascript(X); - YP.write(Atom.a(")")); - return; - } - } - { - Variable X = new Variable(); - Variable Y = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("and", X, Y))) - { - YP.write(Atom.a("(")); - convertExpressionJavascript(X); - YP.write(Atom.a(") && (")); - convertExpressionJavascript(Y); - YP.write(Atom.a(")")); - return; - } - } - { - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("objectArray", ArgList))) - { - YP.write(Atom.a("[")); - convertArgListJavascript(ArgList); - YP.write(Atom.a("]")); - return; - } - } - { - Variable X = new Variable(); - Variable Codes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - if (YP.atom(X)) - { - YP.write(Atom.a("\"")); - foreach (bool l4 in YP.atom_codes(X, Codes)) - { - convertStringCodesJavascript(Codes); - YP.write(Atom.a("\"")); - return; - } - } - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - YP.write(X); - return; - } - } - } - - public static void convertStringCodesJavascript(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Code = new Variable(); - Variable RestCodes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Code, RestCodes))) - { - foreach (bool l3 in putCStringCode(Code)) - { - convertStringCodesJavascript(RestCodes); - return; - } - } - } - } - - public static void convertFunctionPython(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.a("getDeclaringClass"))) - { - YP.write(Atom.a("def getDeclaringClass():")); - YP.nl(); - YP.write(Atom.a(" return None")); - YP.nl(); - YP.nl(); - return; - } - } - { - Variable x1 = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable Body = new Variable(); - Variable Level = new Variable(); - Variable HasBreakableBlock = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor("function", new object[] { x1, Name, ArgList, Body }))) - { - YP.write(Atom.a("def ")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a("):")); - YP.nl(); - foreach (bool l3 in YP.unify(Level, 1)) - { - if (hasBreakableBlockPython(Body)) - { - foreach (bool l5 in YP.unify(HasBreakableBlock, 1)) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("doBreak = False")); - YP.nl(); - foreach (bool l7 in convertStatementListPython(Body, Level, HasBreakableBlock)) - { - YP.nl(); - return; - } - goto cutIf2; - } - foreach (bool l6 in convertStatementListPython(Body, Level, HasBreakableBlock)) - { - YP.nl(); - return; - } - cutIf2: - { } - } - goto cutIf1; - } - foreach (bool l4 in YP.unify(HasBreakableBlock, 0)) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("doBreak = False")); - YP.nl(); - foreach (bool l6 in convertStatementListPython(Body, Level, HasBreakableBlock)) - { - YP.nl(); - return; - } - goto cutIf3; - } - foreach (bool l5 in convertStatementListPython(Body, Level, HasBreakableBlock)) - { - YP.nl(); - return; - } - cutIf3: - { } - } - cutIf1: - { } - } - } - } - } - - public static bool hasBreakableBlockPython(object arg1) - { - { - Variable _Name = new Variable(); - Variable _Body = new Variable(); - Variable _RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("breakableBlock", _Name, _Body), _RestStatements))) - { - return true; - } - } - { - Variable Body = new Variable(); - Variable _RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("blockScope", Body), _RestStatements))) - { - if (hasBreakableBlockPython(Body)) - { - return true; - } - } - } - { - Variable _Expression = new Variable(); - Variable Body = new Variable(); - Variable _RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("if", _Expression, Body), _RestStatements))) - { - if (hasBreakableBlockPython(Body)) - { - return true; - } - } - } - { - Variable _Expression = new Variable(); - Variable Body = new Variable(); - Variable _RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("foreach", _Expression, Body), _RestStatements))) - { - if (hasBreakableBlockPython(Body)) - { - return true; - } - } - } - { - Variable x1 = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(x1, RestStatements))) - { - if (hasBreakableBlockPython(RestStatements)) - { - return true; - } - } - } - return false; - } - - public static IEnumerable convertStatementListPython(object arg1, object arg2, object arg3) - { - { - object x1 = arg2; - object x2 = arg3; - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - yield return true; - yield break; - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Name = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("breakableBlock", Name, Body), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Name); - YP.write(Atom.a(" = False")); - YP.nl(); - convertIndentationPython(Level); - YP.write(Atom.a("for _ in [1]:")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - foreach (bool l4 in convertStatementListPython(Body, NextLevel, HasBreakableBlock)) - { - convertIndentationPython(Level); - YP.write(Atom.a("if ")); - YP.write(Name); - YP.write(Atom.a(":")); - YP.nl(); - convertIndentationPython(NextLevel); - YP.write(Atom.a("doBreak = False")); - YP.nl(); - convertIndentationPython(Level); - YP.write(Atom.a("if doBreak:")); - YP.nl(); - convertIndentationPython(NextLevel); - YP.write(Atom.a("break")); - YP.nl(); - foreach (bool l5 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable _Type = new Variable(); - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("declare", _Type, Name, Expression), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionPython(Expression); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Name = new Variable(); - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("assign", Name, Expression), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Name); - YP.write(Atom.a(" = ")); - convertExpressionPython(Expression); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldtrue"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("yield True")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldfalse"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("yield False")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("yieldbreak"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("return")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("return"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("return")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returntrue"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("return True")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Atom.a("returnfalse"), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("return False")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Name = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("breakBlock", Name), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Name); - YP.write(Atom.a(" = True")); - YP.nl(); - convertIndentationPython(Level); - YP.write(Atom.a("doBreak = True")); - YP.nl(); - convertIndentationPython(Level); - YP.write(Atom.a("break")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("call", Name, ArgList), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a(")")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("functorCall", Name, _FunctorArgs, ArgList), RestStatements))) - { - foreach (bool l3 in convertStatementListPython(new ListPair(new Functor2("call", Name, ArgList), RestStatements), Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor3("callMember", new Functor1("var", Obj), Name, ArgList), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a(")")); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("blockScope", Body), RestStatements))) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("for _ in [1]:")); - YP.nl(); - foreach (bool l4 in YP.unify(NextLevel, YP.add(Level, 1))) - { - foreach (bool l5 in convertStatementListPython(Body, NextLevel, HasBreakableBlock)) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - if (YP.greaterThan(Level, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("if doBreak:")); - YP.nl(); - convertIndentationPython(NextLevel); - YP.write(Atom.a("break")); - YP.nl(); - foreach (bool l8 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - goto cutIf3; - } - foreach (bool l7 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - cutIf3: - goto cutIf2; - } - foreach (bool l6 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - cutIf2: - { } - } - } - goto cutIf1; - } - foreach (bool l3 in YP.unify(NextLevel, Level)) - { - foreach (bool l4 in convertStatementListPython(Body, NextLevel, HasBreakableBlock)) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - if (YP.greaterThan(Level, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("if doBreak:")); - YP.nl(); - convertIndentationPython(NextLevel); - YP.write(Atom.a("break")); - YP.nl(); - foreach (bool l7 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - goto cutIf5; - } - foreach (bool l6 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - cutIf5: - goto cutIf4; - } - foreach (bool l5 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - cutIf4: - { } - } - } - cutIf1: - { } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("if", Expression, Body), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("if ")); - convertExpressionPython(Expression); - YP.write(Atom.a(":")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - foreach (bool l4 in convertStatementListPython(Body, NextLevel, HasBreakableBlock)) - { - foreach (bool l5 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Expression = new Variable(); - Variable Body = new Variable(); - Variable RestStatements = new Variable(); - Variable NextLevel = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor2("foreach", Expression, Body), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("for l")); - YP.write(Level); - YP.write(Atom.a(" in ")); - convertExpressionPython(Expression); - YP.write(Atom.a(":")); - YP.nl(); - foreach (bool l3 in YP.unify(NextLevel, YP.add(Level, 1))) - { - foreach (bool l4 in convertStatementListPython(Body, NextLevel, HasBreakableBlock)) - { - if (YP.termEqual(HasBreakableBlock, 1)) - { - convertIndentationPython(Level); - YP.write(Atom.a("if doBreak:")); - YP.nl(); - convertIndentationPython(NextLevel); - YP.write(Atom.a("break")); - YP.nl(); - foreach (bool l6 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - goto cutIf6; - } - foreach (bool l5 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - cutIf6: - { } - } - } - } - } - { - object Level = arg2; - object HasBreakableBlock = arg3; - Variable Expression = new Variable(); - Variable RestStatements = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(new Functor1("throw", Expression), RestStatements))) - { - convertIndentationPython(Level); - YP.write(Atom.a("raise ")); - convertExpressionPython(Expression); - YP.nl(); - foreach (bool l3 in convertStatementListPython(RestStatements, Level, HasBreakableBlock)) - { - yield return true; - yield break; - } - } - } - } - - public static void convertIndentationPython(object Level) - { - { - Variable N = new Variable(); - foreach (bool l2 in YP.unify(N, YP.multiply(Level, 2))) - { - repeatWrite(Atom.a(" "), N); - return; - } - } - } - - public static void convertArgListPython(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Head = new Variable(); - Variable Tail = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Head, Tail))) - { - convertExpressionPython(Head); - if (YP.termNotEqual(Tail, Atom.NIL)) - { - YP.write(Atom.a(", ")); - convertArgListPython(Tail); - return; - goto cutIf1; - } - convertArgListPython(Tail); - return; - cutIf1: - { } - } - } - } - - public static void convertExpressionPython(object arg1) - { - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("arg", X))) - { - YP.write(X); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("call", Name, ArgList))) - { - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable _FunctorArgs = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("functorCall", Name, _FunctorArgs, ArgList))) - { - convertExpressionPython(new Functor2("call", Name, ArgList)); - return; - } - } - { - Variable Obj = new Variable(); - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor3("callMember", new Functor1("var", Obj), Name, ArgList))) - { - YP.write(Obj); - YP.write(Atom.a(".")); - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("new", Name, ArgList))) - { - YP.write(Name); - YP.write(Atom.a("(")); - convertArgListPython(ArgList); - YP.write(Atom.a(")")); - return; - } - } - { - Variable Name = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("var", Name))) - { - YP.write(Name); - return; - } - } - { - foreach (bool l2 in YP.unify(arg1, Atom.a("null"))) - { - YP.write(Atom.a("None")); - return; - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("not", X))) - { - YP.write(Atom.a("not (")); - convertExpressionPython(X); - YP.write(Atom.a(")")); - return; - } - } - { - Variable X = new Variable(); - Variable Y = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor2("and", X, Y))) - { - YP.write(Atom.a("(")); - convertExpressionPython(X); - YP.write(Atom.a(") and (")); - convertExpressionPython(Y); - YP.write(Atom.a(")")); - return; - } - } - { - Variable ArgList = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("objectArray", ArgList))) - { - YP.write(Atom.a("[")); - convertArgListPython(ArgList); - YP.write(Atom.a("]")); - return; - } - } - { - Variable X = new Variable(); - Variable Codes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - if (YP.atom(X)) - { - YP.write(Atom.a("\"")); - foreach (bool l4 in YP.atom_codes(X, Codes)) - { - convertStringCodesPython(Codes); - YP.write(Atom.a("\"")); - return; - } - } - } - } - { - Variable X = new Variable(); - foreach (bool l2 in YP.unify(arg1, new Functor1("object", X))) - { - YP.write(X); - return; - } - } - } - - public static void convertStringCodesPython(object arg1) - { - { - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - return; - } - } - { - Variable Code = new Variable(); - Variable RestCodes = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(Code, RestCodes))) - { - if (YP.termEqual(Code, 34)) - { - YP.put_code(92); - YP.put_code(Code); - convertStringCodesPython(RestCodes); - return; - goto cutIf1; - } - if (YP.termEqual(Code, 92)) - { - YP.put_code(92); - YP.put_code(Code); - convertStringCodesPython(RestCodes); - return; - goto cutIf1; - } - YP.put_code(Code); - convertStringCodesPython(RestCodes); - return; - cutIf1: - { } - } - } - } - - public static IEnumerable putCStringCode(object Code) - { - { - Variable HexDigit = new Variable(); - Variable HexChar = new Variable(); - if (YP.lessThanOrEqual(Code, 31)) - { - if (YP.lessThanOrEqual(Code, 15)) - { - YP.write(Atom.a("\\u000")); - foreach (bool l4 in YP.unify(HexDigit, Code)) - { - if (YP.lessThanOrEqual(HexDigit, 9)) - { - foreach (bool l6 in YP.unify(HexChar, YP.add(HexDigit, 48))) - { - YP.put_code(HexChar); - yield return true; - yield break; - } - goto cutIf2; - } - foreach (bool l5 in YP.unify(HexChar, YP.add(HexDigit, 55))) - { - YP.put_code(HexChar); - yield return true; - yield break; - } - cutIf2: - { } - } - goto cutIf1; - } - YP.write(Atom.a("\\u001")); - foreach (bool l3 in YP.unify(HexDigit, YP.subtract(Code, 16))) - { - if (YP.lessThanOrEqual(HexDigit, 9)) - { - foreach (bool l5 in YP.unify(HexChar, YP.add(HexDigit, 48))) - { - YP.put_code(HexChar); - yield return true; - yield break; - } - goto cutIf3; - } - foreach (bool l4 in YP.unify(HexChar, YP.add(HexDigit, 55))) - { - YP.put_code(HexChar); - yield return true; - yield break; - } - cutIf3: - { } - } - cutIf1: - { } - } - } - { - if (YP.termEqual(Code, 34)) - { - YP.put_code(92); - YP.put_code(34); - yield return true; - yield break; - } - } - { - if (YP.termEqual(Code, 92)) - { - YP.put_code(92); - YP.put_code(92); - yield return true; - yield break; - } - } - { - YP.put_code(Code); - yield return true; - yield break; - } - } - - public static IEnumerable member(object X, object arg2) - { - { - Variable x2 = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(X, x2))) - { - yield return false; - } - } - { - Variable x2 = new Variable(); - Variable Rest = new Variable(); - foreach (bool l2 in YP.unify(arg2, new ListPair(x2, Rest))) - { - foreach (bool l3 in member(X, Rest)) - { - yield return false; - } - } - } - } - - public static IEnumerable append(object arg1, object arg2, object arg3) - { - { - Variable List = new Variable(); - foreach (bool l2 in YP.unify(arg1, Atom.NIL)) - { - foreach (bool l3 in YP.unify(arg2, List)) - { - foreach (bool l4 in YP.unify(arg3, List)) - { - yield return false; - } - } - } - } - { - object List2 = arg2; - Variable X = new Variable(); - Variable List1 = new Variable(); - Variable List12 = new Variable(); - foreach (bool l2 in YP.unify(arg1, new ListPair(X, List1))) - { - foreach (bool l3 in YP.unify(arg3, new ListPair(X, List12))) - { - foreach (bool l4 in append(List1, List2, List12)) - { - yield return false; - } - } - } - } - } - #pragma warning restore 0168, 0219, 0164,0162 - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 97dd0f6..4e0c273 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs @@ -31,7 +31,6 @@ using System.Collections.Generic; using System.Reflection; using log4net; using Tools; - using OpenSim.Region.Framework.Interfaces; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools @@ -49,6 +48,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private List m_warnings = new List(); private IScriptModuleComms m_comms = null; + private bool m_insertCoopTerminationChecks; + private static string m_coopTerminationCheck = "opensim_reserved_CheckForCoopTermination();"; + + /// + /// Keep a record of the previous node when we do the parsing. + /// + /// + /// We do this here because the parser generated by CSTools does not retain a reference to its parent node. + /// The previous node is required so we can correctly insert co-op termination checks when required. + /// +// private SYMBOL m_previousNode; + /// /// Creates an 'empty' CSCodeGenerator instance. /// @@ -58,9 +69,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools ResetCounters(); } - public CSCodeGenerator(IScriptModuleComms comms) + public CSCodeGenerator(IScriptModuleComms comms, bool insertCoopTerminationChecks) { m_comms = comms; + m_insertCoopTerminationChecks = insertCoopTerminationChecks; ResetCounters(); } @@ -150,12 +162,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools m_braceCount++; // line number - m_CSharpLine += 3; + m_CSharpLine += 9; // here's the payload retstr += GenerateLine(); foreach (SYMBOL s in m_astRoot.kids) - retstr += GenerateNode(s); + retstr += GenerateNode(m_astRoot, s); // close braces! m_braceCount--; @@ -165,7 +177,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // Removes all carriage return characters which may be generated in Windows platform. Is there // cleaner way of doing this? - retstr=retstr.Replace("\r", ""); + retstr = retstr.Replace("\r", ""); return retstr; } @@ -191,9 +203,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// Recursively called to generate each type of node. Will generate this /// node, then all it's children. /// + /// The parent node. /// The current node to generate code for. /// String containing C# code for SYMBOL s. - private string GenerateNode(SYMBOL s) + private string GenerateNode(SYMBOL previousSymbol, SYMBOL s) { string retstr = String.Empty; @@ -207,11 +220,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools else if (s is State) retstr += GenerateState((State) s); else if (s is CompoundStatement) - retstr += GenerateCompoundStatement((CompoundStatement) s); + retstr += GenerateCompoundStatement(previousSymbol, (CompoundStatement) s); else if (s is Declaration) retstr += GenerateDeclaration((Declaration) s); else if (s is Statement) - retstr += GenerateStatement((Statement) s); + retstr += GenerateStatement(previousSymbol, (Statement) s); else if (s is ReturnStatement) retstr += GenerateReturnStatement((ReturnStatement) s); else if (s is JumpLabel) @@ -261,7 +274,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools else { foreach (SYMBOL kid in s.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(s, kid); } return retstr; @@ -295,7 +308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += GenerateLine(")"); foreach (SYMBOL kid in remainingKids) - retstr += GenerateNode(kid); + retstr += GenerateNode(gf, kid); return retstr; } @@ -312,7 +325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools foreach (SYMBOL s in gv.kids) { retstr += Indent(); - retstr += GenerateNode(s); + retstr += GenerateNode(gv, s); retstr += GenerateLine(";"); } @@ -365,7 +378,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += GenerateLine(")"); foreach (SYMBOL kid in remainingKids) - retstr += GenerateNode(kid); + retstr += GenerateNode(se, kid); return retstr; } @@ -404,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools foreach (SYMBOL s in al.kids) { - retstr += GenerateNode(s); + retstr += GenerateNode(al, s); if (0 < comma--) retstr += Generate(", "); } @@ -417,7 +430,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The CompoundStatement node. /// String containing C# code for CompoundStatement cs. - private string GenerateCompoundStatement(CompoundStatement cs) + private string GenerateCompoundStatement(SYMBOL previousSymbol, CompoundStatement cs) { string retstr = String.Empty; @@ -425,8 +438,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += GenerateIndentedLine("{"); m_braceCount++; + if (m_insertCoopTerminationChecks) + { + // We have to check in event functions as well because the user can manually call these. + if (previousSymbol is GlobalFunctionDefinition + || previousSymbol is WhileStatement + || previousSymbol is DoWhileStatement + || previousSymbol is ForLoop + || previousSymbol is StateEvent) + retstr += GenerateIndentedLine(m_coopTerminationCheck); + } + foreach (SYMBOL kid in cs.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(cs, kid); // closing brace m_braceCount--; @@ -450,10 +474,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The Statement node. /// String containing C# code for Statement s. - private string GenerateStatement(Statement s) + private string GenerateStatement(SYMBOL previousSymbol, Statement s) { string retstr = String.Empty; bool printSemicolon = true; + bool transformToBlock = false; + + if (m_insertCoopTerminationChecks) + { + // A non-braced single line do while structure cannot contain multiple statements. + // So to insert the termination check we change this to a braced control structure instead. + if (previousSymbol is WhileStatement + || previousSymbol is DoWhileStatement + || previousSymbol is ForLoop) + { + transformToBlock = true; + + // FIXME: This will be wrongly indented because the previous for/while/dowhile will have already indented. + retstr += GenerateIndentedLine("{"); + + retstr += GenerateIndentedLine(m_coopTerminationCheck); + } + } retstr += Indent(); @@ -466,12 +508,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // (MONO) error. if (!(s.kids.Top is IdentExpression && 1 == s.kids.Count)) foreach (SYMBOL kid in s.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(s, kid); } if (printSemicolon) retstr += GenerateLine(";"); + if (transformToBlock) + { + // FIXME: This will be wrongly indented because the for/while/dowhile is currently handling the unindent + retstr += GenerateIndentedLine("}"); + } + return retstr; } @@ -487,10 +535,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools List identifiers = new List(); checkForMultipleAssignments(identifiers, a); - retstr += GenerateNode((SYMBOL) a.kids.Pop()); + retstr += GenerateNode(a, (SYMBOL) a.kids.Pop()); retstr += Generate(String.Format(" {0} ", a.AssignmentType), a); foreach (SYMBOL kid in a.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(a, kid); return retstr; } @@ -563,7 +611,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += Generate("return ", rs); foreach (SYMBOL kid in rs.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(rs, kid); return retstr; } @@ -575,7 +623,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// String containing C# code for JumpLabel jl. private string GenerateJumpLabel(JumpLabel jl) { - return Generate(String.Format("{0}:", CheckName(jl.LabelName)), jl) + " NoOp();\n"; + string labelStatement; + + if (m_insertCoopTerminationChecks) + labelStatement = m_coopTerminationCheck; + else + labelStatement = "NoOp();"; + + return GenerateLine(String.Format("{0}: {1}", CheckName(jl.LabelName), labelStatement), jl); } /// @@ -598,14 +653,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string retstr = String.Empty; retstr += GenerateIndented("if (", ifs); - retstr += GenerateNode((SYMBOL) ifs.kids.Pop()); + retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); retstr += GenerateLine(")"); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = ifs.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode((SYMBOL) ifs.kids.Pop()); + retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); if (indentHere) m_braceCount--; if (0 < ifs.kids.Count) // do it again for an else @@ -614,7 +669,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools indentHere = ifs.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode((SYMBOL) ifs.kids.Pop()); + retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); if (indentHere) m_braceCount--; } @@ -641,14 +696,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string retstr = String.Empty; retstr += GenerateIndented("while (", ws); - retstr += GenerateNode((SYMBOL) ws.kids.Pop()); + retstr += GenerateNode(ws, (SYMBOL) ws.kids.Pop()); retstr += GenerateLine(")"); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = ws.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode((SYMBOL) ws.kids.Pop()); + retstr += GenerateNode(ws, (SYMBOL) ws.kids.Pop()); if (indentHere) m_braceCount--; return retstr; @@ -669,11 +724,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // otherwise. bool indentHere = dws.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode((SYMBOL) dws.kids.Pop()); + retstr += GenerateNode(dws, (SYMBOL) dws.kids.Pop()); if (indentHere) m_braceCount--; retstr += GenerateIndented("while (", dws); - retstr += GenerateNode((SYMBOL) dws.kids.Pop()); + retstr += GenerateNode(dws, (SYMBOL) dws.kids.Pop()); retstr += GenerateLine(");"); return retstr; @@ -702,7 +757,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += Generate("; "); // for (x = 0; x < 10; x++) // ^^^^^^ - retstr += GenerateNode((SYMBOL) fl.kids.Pop()); + retstr += GenerateNode(fl, (SYMBOL) fl.kids.Pop()); retstr += Generate("; "); // for (x = 0; x < 10; x++) // ^^^ @@ -713,7 +768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // otherwise. bool indentHere = fl.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode((SYMBOL) fl.kids.Pop()); + retstr += GenerateNode(fl, (SYMBOL) fl.kids.Pop()); if (indentHere) m_braceCount--; return retstr; @@ -758,7 +813,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools while (s is ParenthesisExpression) s = (SYMBOL)s.kids.Pop(); - retstr += GenerateNode(s); + retstr += GenerateNode(fls, s); if (0 < comma--) retstr += Generate(", "); } @@ -779,20 +834,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { // special case handling for logical and/or, see Mantis 3174 retstr += "((bool)("; - retstr += GenerateNode((SYMBOL)be.kids.Pop()); + retstr += GenerateNode(be, (SYMBOL)be.kids.Pop()); retstr += "))"; retstr += Generate(String.Format(" {0} ", be.ExpressionSymbol.Substring(0,1)), be); retstr += "((bool)("; foreach (SYMBOL kid in be.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(be, kid); retstr += "))"; } else { - retstr += GenerateNode((SYMBOL)be.kids.Pop()); + retstr += GenerateNode(be, (SYMBOL)be.kids.Pop()); retstr += Generate(String.Format(" {0} ", be.ExpressionSymbol), be); foreach (SYMBOL kid in be.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(be, kid); } return retstr; @@ -808,7 +863,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string retstr = String.Empty; retstr += Generate(ue.UnarySymbol, ue); - retstr += GenerateNode((SYMBOL) ue.kids.Pop()); + retstr += GenerateNode(ue, (SYMBOL) ue.kids.Pop()); return retstr; } @@ -824,7 +879,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += Generate("("); foreach (SYMBOL kid in pe.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(pe, kid); retstr += Generate(")"); return retstr; @@ -861,7 +916,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // we wrap all typecasted statements in parentheses retstr += Generate(String.Format("({0}) (", te.TypecastType), te); - retstr += GenerateNode((SYMBOL) te.kids.Pop()); + retstr += GenerateNode(te, (SYMBOL) te.kids.Pop()); retstr += Generate(")"); return retstr; @@ -882,7 +937,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { string retval = null; if (value is int) - retval = ((int)value).ToString(); + retval = String.Format("new LSL_Types.LSLInteger({0})",((int)value).ToString()); else if (value is float) retval = String.Format("new LSL_Types.LSLFloat({0})",((float)value).ToString()); else if (value is string) @@ -931,7 +986,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } foreach (SYMBOL kid in fc.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(fc, kid); retstr += Generate(")"); @@ -980,11 +1035,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string retstr = String.Empty; retstr += Generate(String.Format("new {0}(", vc.Type), vc); - retstr += GenerateNode((SYMBOL) vc.kids.Pop()); + retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); retstr += Generate(", "); - retstr += GenerateNode((SYMBOL) vc.kids.Pop()); + retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); retstr += Generate(", "); - retstr += GenerateNode((SYMBOL) vc.kids.Pop()); + retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); retstr += Generate(")"); return retstr; @@ -1000,13 +1055,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools string retstr = String.Empty; retstr += Generate(String.Format("new {0}(", rc.Type), rc); - retstr += GenerateNode((SYMBOL) rc.kids.Pop()); + retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); retstr += Generate(", "); - retstr += GenerateNode((SYMBOL) rc.kids.Pop()); + retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); retstr += Generate(", "); - retstr += GenerateNode((SYMBOL) rc.kids.Pop()); + retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); retstr += Generate(", "); - retstr += GenerateNode((SYMBOL) rc.kids.Pop()); + retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); retstr += Generate(")"); return retstr; @@ -1024,7 +1079,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools retstr += Generate(String.Format("new {0}(", lc.Type), lc); foreach (SYMBOL kid in lc.kids) - retstr += GenerateNode(kid); + retstr += GenerateNode(lc, kid); retstr += Generate(")"); diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 03be2ab..af324bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -58,9 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { lsl = 0, cs = 1, - vb = 2, - js = 3, - yp = 4 + vb = 2 } /// @@ -72,6 +70,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private bool CompileWithDebugInformation; private Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); private Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private bool m_insertCoopTerminationCalls; private string FilePrefix; private string ScriptEnginesPath = null; @@ -84,9 +83,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); -// private static JScriptCodeProvider JScodeProvider = new JScriptCodeProvider(); - private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp - private static YP2CSConverter YP_Converter = new YP2CSConverter(); // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files private static UInt64 scriptCompileCounter = 0; // And a counter @@ -95,20 +91,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private Dictionary, KeyValuePair>> m_lineMaps = new Dictionary, KeyValuePair>>(); + public bool in_startup = true; + public Compiler(IScriptEngine scriptEngine) { - m_scriptEngine = scriptEngine;; + m_scriptEngine = scriptEngine; ScriptEnginesPath = scriptEngine.ScriptEnginePath; ReadConfig(); } - public bool in_startup = true; public void ReadConfig() { // Get some config WriteScriptSourceToDebugFile = m_scriptEngine.Config.GetBoolean("WriteScriptSourceToDebugFile", false); CompileWithDebugInformation = m_scriptEngine.Config.GetBoolean("CompileWithDebugInformation", true); bool DeleteScriptsOnStartup = m_scriptEngine.Config.GetBoolean("DeleteScriptsOnStartup", true); + m_insertCoopTerminationCalls = m_scriptEngine.Config.GetString("ScriptStopStrategy", "abort") == "co-op"; // Get file prefix from scriptengine name and make it file system safe: FilePrefix = "CommonCompiler"; @@ -120,7 +118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools if (in_startup) { in_startup = false; - CreateScriptsDirectory(); + CheckOrCreateScriptsDirectory(); // First time we start? Delete old files if (DeleteScriptsOnStartup) @@ -131,8 +129,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools LanguageMapping.Add(enumCompileType.cs.ToString(), enumCompileType.cs); LanguageMapping.Add(enumCompileType.vb.ToString(), enumCompileType.vb); LanguageMapping.Add(enumCompileType.lsl.ToString(), enumCompileType.lsl); - LanguageMapping.Add(enumCompileType.js.ToString(), enumCompileType.js); - LanguageMapping.Add(enumCompileType.yp.ToString(), enumCompileType.yp); // Allowed compilers string allowComp = m_scriptEngine.Config.GetString("AllowedCompilers", "lsl"); @@ -189,13 +185,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } // We now have an allow-list, a mapping list, and a default language - } /// - /// Create the directory where compiled scripts are stored. + /// Create the directory where compiled scripts are stored if it does not already exist. /// - private void CreateScriptsDirectory() + private void CheckOrCreateScriptsDirectory() { if (!Directory.Exists(ScriptEnginesPath)) { @@ -285,15 +280,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools return GetCompilerOutput(assetID.ToString()); } - /// - /// Converts script from LSL to CS and calls CompileFromCSText - /// - /// LSL script - /// Filename to .dll assembly - public void PerformScriptCompile(string Script, string asset, UUID ownerUUID, + public void PerformScriptCompile( + string source, string asset, UUID ownerUUID, out string assembly, out Dictionary, KeyValuePair> linemap) { -// m_log.DebugFormat("[Compiler]: Compiling script\n{0}", Script); + PerformScriptCompile(source, asset, ownerUUID, false, out assembly, out linemap); + } + + public void PerformScriptCompile( + string source, string asset, UUID ownerUUID, bool alwaysRecompile, + out string assembly, out Dictionary, KeyValuePair> linemap) + { +// m_log.DebugFormat("[Compiler]: Checking script for asset {0} in {1}\n{2}", asset, m_scriptEngine.World.Name, source); IScriptModuleComms comms = m_scriptEngine.World.RequestModuleInterface(); @@ -302,33 +300,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools assembly = GetCompilerOutput(asset); - if (!Directory.Exists(ScriptEnginesPath)) - { - try - { - Directory.CreateDirectory(ScriptEnginesPath); - } - catch (Exception) - { - } - } +// m_log.DebugFormat("[Compiler]: Retrieved assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); - if (!Directory.Exists(Path.Combine(ScriptEnginesPath, - m_scriptEngine.World.RegionInfo.RegionID.ToString()))) - { - try - { - Directory.CreateDirectory(ScriptEnginesPath); - } - catch (Exception) - { - } - } + CheckOrCreateScriptsDirectory(); - // Don't recompile if we already have it + // Don't recompile if we're not forced to and we already have it // Performing 3 file exists tests for every script can still be slow - if (File.Exists(assembly) && File.Exists(assembly + ".text") && File.Exists(assembly + ".map")) + if (!alwaysRecompile && File.Exists(assembly) && File.Exists(assembly + ".text") && File.Exists(assembly + ".map")) { +// m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); + // If we have already read this linemap file, then it will be in our dictionary. // Don't build another copy of the dictionary (saves memory) and certainly // don't keep reading the same file from disk multiple times. @@ -338,31 +319,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools return; } - if (Script == String.Empty) - { +// m_log.DebugFormat("[Compiler]: Compiling assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); + + if (source == String.Empty) throw new Exception("Cannot find script assembly and no script text present"); - } enumCompileType language = DefaultCompileLanguage; - if (Script.StartsWith("//c#", true, CultureInfo.InvariantCulture)) + if (source.StartsWith("//c#", true, CultureInfo.InvariantCulture)) language = enumCompileType.cs; - if (Script.StartsWith("//vb", true, CultureInfo.InvariantCulture)) + if (source.StartsWith("//vb", true, CultureInfo.InvariantCulture)) { language = enumCompileType.vb; // We need to remove //vb, it won't compile with that - Script = Script.Substring(4, Script.Length - 4); + source = source.Substring(4, source.Length - 4); } - if (Script.StartsWith("//lsl", true, CultureInfo.InvariantCulture)) + if (source.StartsWith("//lsl", true, CultureInfo.InvariantCulture)) language = enumCompileType.lsl; - if (Script.StartsWith("//js", true, CultureInfo.InvariantCulture)) - language = enumCompileType.js; - - if (Script.StartsWith("//yp", true, CultureInfo.InvariantCulture)) - language = enumCompileType.yp; - // m_log.DebugFormat("[Compiler]: Compile language is {0}", language); if (!AllowedCompilers.ContainsKey(language.ToString())) @@ -381,13 +356,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools throw new Exception(errtext); } - string compileScript = Script; + string compileScript = source; if (language == enumCompileType.lsl) { // Its LSL, convert it to C# - LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms); - compileScript = LSL_Converter.Convert(Script); + LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls); + compileScript = LSL_Converter.Convert(source); // copy converter warnings into our warnings. foreach (string warning in LSL_Converter.GetWarnings()) @@ -401,26 +376,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools WriteMapFile(assembly + ".map", linemap); } - if (language == enumCompileType.yp) - { - // Its YP, convert it to C# - compileScript = YP_Converter.Convert(Script); - } - switch (language) { case enumCompileType.cs: case enumCompileType.lsl: - compileScript = CreateCSCompilerScript(compileScript); + compileScript = CreateCSCompilerScript( + compileScript, + m_scriptEngine.ScriptClassName, + m_scriptEngine.ScriptBaseClassName, + m_scriptEngine.ScriptBaseClassParameters); break; case enumCompileType.vb: - compileScript = CreateVBCompilerScript(compileScript); - break; -// case enumCompileType.js: -// compileScript = CreateJSCompilerScript(compileScript); -// break; - case enumCompileType.yp: - compileScript = CreateYPCompilerScript(compileScript); + compileScript = CreateVBCompilerScript( + compileScript, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName); break; } @@ -451,43 +419,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // return compileScript; // } - private static string CreateCSCompilerScript(string compileScript) + public static string CreateCSCompilerScript( + string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters) { - compileScript = String.Empty + - "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" + - String.Empty + "namespace SecondLife { " + - String.Empty + "public class Script : OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + - @"public Script() { } " + - compileScript + - "} }\r\n"; - return compileScript; - } + compileScript = string.Format( +@"using OpenSim.Region.ScriptEngine.Shared; +using System.Collections.Generic; + +namespace SecondLife +{{ + public class {0} : {1} + {{ + public {0}({2}) : base({3}) {{}} +{4} + }} +}}", + className, + baseClassName, + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.ToString())) + : "", + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.Name)) + : "", + compileScript); - private static string CreateYPCompilerScript(string compileScript) - { - compileScript = String.Empty + - "using OpenSim.Region.ScriptEngine.Shared.YieldProlog; " + - "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" + - String.Empty + "namespace SecondLife { " + - String.Empty + "public class Script : OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + - //@"public Script() { } " + - @"static OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP YP=null; " + - @"public Script() { YP= new OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP(); } " + - - compileScript + - "} }\r\n"; return compileScript; } - private static string CreateVBCompilerScript(string compileScript) + public static string CreateVBCompilerScript(string compileScript, string className, string baseClassName) { compileScript = String.Empty + "Imports OpenSim.Region.ScriptEngine.Shared: Imports System.Collections.Generic: " + String.Empty + "NameSpace SecondLife:" + - String.Empty + "Public Class Script: Inherits OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass: " + + String.Empty + "Public Class " + className + ": Inherits " + baseClassName + "\r\nPublic Sub New()\r\nEnd Sub: " + compileScript + ":End Class :End Namespace\r\n"; + return compileScript; } @@ -506,7 +475,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools scriptCompileCounter++; try { - File.Delete(assembly); + if (File.Exists(assembly)) + { + File.SetAttributes(assembly, FileAttributes.Normal); + File.Delete(assembly); + } } catch (Exception e) // NOTLEGIT - Should be just FileIOException { @@ -549,11 +522,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); - if (lang == enumCompileType.yp) - { - parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, - "OpenSim.Region.ScriptEngine.Shared.YieldProlog.dll")); - } + if (m_scriptEngine.ScriptReferencedAssemblies != null) + Array.ForEach( + m_scriptEngine.ScriptReferencedAssemblies, + a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a))); parameters.GenerateExecutable = false; parameters.OutputAssembly = assembly; @@ -579,6 +551,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools results = CScodeProvider.CompileAssemblyFromSource( parameters, Script); } + // Deal with an occasional segv in the compiler. // Rarely, if ever, occurs twice in succession. // Line # == 0 and no file name are indications that @@ -586,7 +559,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // error log. if (results.Errors.Count > 0) { - if (!retried && (results.Errors[0].FileName == null || results.Errors[0].FileName == String.Empty) && + if (!retried && string.IsNullOrEmpty(results.Errors[0].FileName) && results.Errors[0].Line == 0) { // System.Console.WriteLine("retrying failed compilation"); @@ -603,41 +576,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } } while (!complete); break; -// case enumCompileType.js: -// results = JScodeProvider.CompileAssemblyFromSource( -// parameters, Script); -// break; - case enumCompileType.yp: - results = YPcodeProvider.CompileAssemblyFromSource( - parameters, Script); - break; default: throw new Exception("Compiler is not able to recongnize " + "language type \"" + lang.ToString() + "\""); } - // Check result - // Go through errors +// foreach (Type type in results.CompiledAssembly.GetTypes()) +// { +// foreach (MethodInfo method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) +// { +// m_log.DebugFormat("[COMPILER]: {0}.{1}", type.FullName, method.Name); +// } +// } // // WARNINGS AND ERRORS // bool hadErrors = false; string errtext = String.Empty; - if (results.Errors.Count > 0) { foreach (CompilerError CompErr in results.Errors) { string severity = CompErr.IsWarning ? "Warning" : "Error"; - KeyValuePair lslPos; + KeyValuePair errorPos; // Show 5 errors max, but check entire list for errors if (severity == "Error") { - lslPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); + // C# scripts will not have a linemap since theres no line translation involved. + if (!m_lineMaps.ContainsKey(assembly)) + errorPos = new KeyValuePair(CompErr.Line, CompErr.Column); + else + errorPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); + string text = CompErr.ErrorText; // Use LSL type names @@ -647,7 +621,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // The Second Life viewer's script editor begins // countingn lines and columns at 0, so we subtract 1. errtext += String.Format("({0},{1}): {4} {2}: {3}\n", - lslPos.Key - 1, lslPos.Value - 1, + errorPos.Key - 1, errorPos.Value - 1, CompErr.ErrorNumber, text, severity); hadErrors = true; } @@ -699,9 +673,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools try { - FileStream fs = File.Open(assembly, FileMode.Open, FileAccess.Read); - fs.Read(data, 0, data.Length); - fs.Close(); + using (FileStream fs = File.Open(assembly, FileMode.Open, FileAccess.Read)) + fs.Read(data, 0, data.Length); } catch (Exception) { @@ -716,19 +689,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools Byte[] buf = Encoding.ASCII.GetBytes(filetext); - FileStream sfs = File.Create(assembly + ".text"); - sfs.Write(buf, 0, buf.Length); - sfs.Close(); + using (FileStream sfs = File.Create(assembly + ".text")) + sfs.Write(buf, 0, buf.Length); return assembly; } - private class kvpSorter : IComparer> + private class kvpSorter : IComparer, KeyValuePair>> { - public int Compare(KeyValuePair a, - KeyValuePair b) + public int Compare(KeyValuePair, KeyValuePair> a, + KeyValuePair, KeyValuePair> b) { - return a.Key.CompareTo(b.Key); + int kc = a.Key.Key.CompareTo(b.Key.Key); + return (kc != 0) ? kc : a.Key.Value.CompareTo(b.Key.Value); } } @@ -745,30 +718,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools out ret)) return ret; - List> sorted = - new List>(positionMap.Keys); + var sorted = new List, KeyValuePair>>(positionMap); sorted.Sort(new kvpSorter()); int l = 1; int c = 1; + int pl = 1; - foreach (KeyValuePair cspos in sorted) + foreach (KeyValuePair, KeyValuePair> posmap in sorted) { - if (cspos.Key >= line) + //m_log.DebugFormat("[Compiler]: Scanning line map {0},{1} --> {2},{3}", posmap.Key.Key, posmap.Key.Value, posmap.Value.Key, posmap.Value.Value); + int nl = posmap.Value.Key + line - posmap.Key.Key; // New, translated LSL line and column. + int nc = posmap.Value.Value + col - posmap.Key.Value; + // Keep going until we find the first point passed line,col. + if (posmap.Key.Key > line) { - if (cspos.Key > line) - return new KeyValuePair(l, c); - if (cspos.Value > col) - return new KeyValuePair(l, c); - c = cspos.Value; - if (c == 0) - c++; + //m_log.DebugFormat("[Compiler]: Line is larger than requested {0},{1}, returning {2},{3}", line, col, l, c); + if (pl < line) + { + //m_log.DebugFormat("[Compiler]: Previous line ({0}) is less than requested line ({1}), setting column to 1.", pl, line); + c = 1; + } + break; } - else + if (posmap.Key.Key == line && posmap.Key.Value > col) { - l = cspos.Key; + // Never move l,c backwards. + if (nl > l || (nl == l && nc > c)) + { + //m_log.DebugFormat("[Compiler]: Using offset relative to this: {0} + {1} - {2}, {3} + {4} - {5} = {6}, {7}", + // posmap.Value.Key, line, posmap.Key.Key, posmap.Value.Value, col, posmap.Key.Value, nl, nc); + l = nl; + c = nc; + } + //m_log.DebugFormat("[Compiler]: Column is larger than requested {0},{1}, returning {2},{3}", line, col, l, c); + break; } + pl = posmap.Key.Key; + l = posmap.Value.Key; + c = posmap.Value.Value; } return new KeyValuePair(l, c); } @@ -794,7 +783,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools return message; } - private static void WriteMapFile(string filename, Dictionary, KeyValuePair> linemap) { string mapstring = String.Empty; @@ -806,40 +794,42 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } Byte[] mapbytes = Encoding.ASCII.GetBytes(mapstring); - FileStream mfs = File.Create(filename); - mfs.Write(mapbytes, 0, mapbytes.Length); - mfs.Close(); - } + using (FileStream mfs = File.Create(filename)) + mfs.Write(mapbytes, 0, mapbytes.Length); + } private static Dictionary, KeyValuePair> ReadMapFile(string filename) { Dictionary, KeyValuePair> linemap; try { - StreamReader r = File.OpenText(filename); - linemap = new Dictionary, KeyValuePair>(); - - string line; - while ((line = r.ReadLine()) != null) + using (StreamReader r = File.OpenText(filename)) { - String[] parts = line.Split(new Char[] { ',' }); - int kk = System.Convert.ToInt32(parts[0]); - int kv = System.Convert.ToInt32(parts[1]); - int vk = System.Convert.ToInt32(parts[2]); - int vv = System.Convert.ToInt32(parts[3]); + linemap = new Dictionary, KeyValuePair>(); - KeyValuePair k = new KeyValuePair(kk, kv); - KeyValuePair v = new KeyValuePair(vk, vv); + string line; + while ((line = r.ReadLine()) != null) + { + String[] parts = line.Split(new Char[] { ',' }); + int kk = System.Convert.ToInt32(parts[0]); + int kv = System.Convert.ToInt32(parts[1]); + int vk = System.Convert.ToInt32(parts[2]); + int vv = System.Convert.ToInt32(parts[3]); + + KeyValuePair k = new KeyValuePair(kk, kv); + KeyValuePair v = new KeyValuePair(vk, vv); - linemap[k] = v; + linemap[k] = v; + } } } catch { linemap = new Dictionary, KeyValuePair>(); } + return linemap; } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs index e77b3d2..0fb3574 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs @@ -27,12 +27,16 @@ using System; using System.Collections.Generic; +using System.Reflection; +using log4net; using Tools; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { public class LSL2CSCodeTransformer { +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private SYMBOL m_astRoot = null; private static Dictionary m_datatypeLSL2OpenSim = null; @@ -78,6 +82,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// The current node to transform. private void TransformNode(SYMBOL s) { +// m_log.DebugFormat("[LSL2CSCODETRANSFORMER]: Tranforming node {0}", s); + // make sure to put type lower in the inheritance hierarchy first // ie: since IdentConstant and StringConstant inherit from Constant, // put IdentConstant and StringConstant before Constant @@ -103,10 +109,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // We need to check for that here. if (null != s.kids[i]) { +// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving down level"); + if (!(s is Assignment || s is ArgumentDeclarationList) && s.kids[i] is Declaration) AddImplicitInitialization(s, i); TransformNode((SYMBOL) s.kids[i]); + +// m_log.Debug("[LSL2CSCODETRANSFORMER]: Moving up level"); } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs index c65caa8..0aece99 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.8.3.*")] + diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs index 77e087c..b92f3a3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs @@ -762,6 +762,7 @@ default public void TestIfStatement() { TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); string input = @"// let's test if statements diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index 05a8756..b476e32 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -25,12 +25,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.IO; using System.CodeDom.Compiler; using System.Collections.Generic; using Microsoft.CSharp; using NUnit.Framework; using OpenSim.Region.ScriptEngine.Shared.CodeTools; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Tests.Common; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests @@ -46,7 +48,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests private string m_testDir; private CSharpCodeProvider m_CSCodeProvider; private CompilerParameters m_compilerParameters; - private CompilerResults m_compilerResults; + // private CompilerResults m_compilerResults; + private ResolveEventHandler m_resolveEventHandler; /// /// Creates a temporary directory where build artifacts are stored. @@ -61,14 +64,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests // Create the temporary directory for housing build artifacts. Directory.CreateDirectory(m_testDir); } + } + + [SetUp] + public override void SetUp() + { + base.SetUp(); // Create a CSCodeProvider and CompilerParameters. m_CSCodeProvider = new CSharpCodeProvider(); m_compilerParameters = new CompilerParameters(); - string rootPath = Path.Combine(Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory), "bin"); + string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; + + m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); + + System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); m_compilerParameters.GenerateExecutable = false; } @@ -76,9 +91,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests /// Removes the temporary build directory and any build artifacts /// inside it. /// - [TestFixtureTearDown] + [TearDown] public void CleanUp() { + System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler; + if (Directory.Exists(m_testDir)) { // Blow away the temporary directory with artifacts. @@ -86,52 +103,100 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests } } + private CompilerResults CompileScript( + string input, out Dictionary, KeyValuePair> positionMap) + { + m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll"); + + CSCodeGenerator cg = new CSCodeGenerator(); + string output = cg.Convert(input); + + output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); + // System.Console.WriteLine(output); + + positionMap = cg.PositionMap; + + CompilerResults compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output); + + // foreach (KeyValuePair key in positionMap.Keys) + // { + // KeyValuePair val = positionMap[key]; + // + // System.Console.WriteLine("{0},{1} => {2},{3}", key.Key, key.Value, val.Key, val.Value); + // } + // + // foreach (CompilerError compErr in m_compilerResults.Errors) + // { + // System.Console.WriteLine("Error: {0},{1} => {2}", compErr.Line, compErr.Column, compErr); + // } + + return compilerResults; + } + + /// + /// Test that line number errors are resolved as expected when preceding code contains a jump. + /// + [Test] + public void TestJumpAndSyntaxError() + { + TestHelpers.InMethod(); + + Dictionary, KeyValuePair> positionMap; + + CompilerResults compilerResults = CompileScript( +@"default +{ + state_entry() + { + jump l; + @l; + i = 1; + } +}", out positionMap); + + Assert.AreEqual( + new KeyValuePair(7, 9), + positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); + } + /// /// Test the C# compiler error message can be mapped to the correct /// line/column in the LSL source when an undeclared variable is used. /// - //[Test] + [Test] public void TestUseUndeclaredVariable() { TestHelpers.InMethod(); - m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll"); + Dictionary, KeyValuePair> positionMap; - string input = @"default + CompilerResults compilerResults = CompileScript( +@"default { state_entry() { integer y = x + 3; } -}"; +}", out positionMap); - CSCodeGenerator cg = new CSCodeGenerator(); - string output = "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\n" + - "namespace SecondLife { " + - "public class Script : OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass {\n" + - "public Script() { } " + - cg.Convert(input) + - "} }\n"; - Dictionary, KeyValuePair> positionMap = cg.PositionMap; - - m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output); - - Assert.AreEqual(new KeyValuePair(5, 21), - positionMap[new KeyValuePair(m_compilerResults.Errors[0].Line, m_compilerResults.Errors[0].Column)]); + Assert.AreEqual( + new KeyValuePair(5, 21), + positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); } /// /// Test that a string can be cast to string and another string /// concatenated. /// - //[Test] + [Test] public void TestCastAndConcatString() { TestHelpers.InMethod(); - m_compilerParameters.OutputAssembly = Path.Combine(m_testDir, Path.GetRandomFileName() + ".dll"); + Dictionary, KeyValuePair> positionMap; - string input = @"string s = "" a string""; + CompilerResults compilerResults = CompileScript( +@"string s = "" a string""; default { @@ -141,18 +206,9 @@ default string tmp = (string) gAvatarKey + s; llSay(0, tmp); } -}"; +}", out positionMap); - CSCodeGenerator cg = new CSCodeGenerator(); - string output = "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\n" + - "namespace SecondLife { " + - "public class Script : OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass {\n" + - "public Script() { } " + - cg.Convert(input) + - "} }\n"; - m_compilerResults = m_CSCodeProvider.CompileAssemblyFromSource(m_compilerParameters, output); - - Assert.AreEqual(0, m_compilerResults.Errors.Count); + Assert.AreEqual(0, compilerResults.Errors.Count); } } } \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs new file mode 100644 index 0000000..67ce10a --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs @@ -0,0 +1,359 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using NUnit.Framework; +using OpenSim.Region.ScriptEngine.Shared.CodeTools; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + public class LSL_EventTests : OpenSimTestCase + { + CSCodeGenerator m_cg = new CSCodeGenerator(); + + [Test] + public void TestBadEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestCompile("default { bad() {} }", true); + } + + [Test] + public void TestAttachEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestKeyArgEvent("attach"); + } + + [Test] + public void TestObjectRezEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestKeyArgEvent("object_rez"); + } + + [Test] + public void TestMovingEndEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("moving_end"); + } + + [Test] + public void TestMovingStartEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("moving_start"); + } + + [Test] + public void TestNoSensorEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("no_sensor"); + } + + [Test] + public void TestNotAtRotTargetEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("not_at_rot_target"); + } + + [Test] + public void TestNotAtTargetEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("not_at_target"); + } + + [Test] + public void TestStateEntryEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("state_entry"); + } + + [Test] + public void TestStateExitEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("state_exit"); + } + + [Test] + public void TestTimerEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVoidArgEvent("timer"); + } + + private void TestVoidArgEvent(string eventName) + { + TestCompile("default { " + eventName + "() {} }", false); + TestCompile("default { " + eventName + "(integer n) {} }", true); + } + + [Test] + public void TestChangedEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("changed"); + } + + [Test] + public void TestCollisionEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("collision"); + } + + [Test] + public void TestCollisionStartEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("collision_start"); + } + + [Test] + public void TestCollisionEndEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("collision_end"); + } + + [Test] + public void TestOnRezEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("on_rez"); + } + + [Test] + public void TestRunTimePermissionsEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("run_time_permissions"); + } + + [Test] + public void TestSensorEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("sensor"); + } + + [Test] + public void TestTouchEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("touch"); + } + + [Test] + public void TestTouchStartEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("touch_start"); + } + + [Test] + public void TestTouchEndEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntArgEvent("touch_end"); + } + + [Test] + public void TestLandCollisionEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVectorArgEvent("land_collision"); + } + + [Test] + public void TestLandCollisionStartEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVectorArgEvent("land_collision_start"); + } + + [Test] + public void TestLandCollisionEndEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestVectorArgEvent("land_collision_end"); + } + + [Test] + public void TestAtRotTargetEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntRotRotArgEvent("at_rot_target"); + } + + [Test] + public void TestAtTargetEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestIntVecVecArgEvent("at_target"); + } + + [Test] + public void TestControlEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestKeyIntIntArgEvent("control"); + } + + private void TestIntArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(integer n) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(integer n, integer o) {{}} }", true); + } + + private void TestKeyArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(key k) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(key k, key l) {{}} }", true); + } + + private void TestVectorArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(vector v) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(vector v, vector w) {{}} }", true); + } + + private void TestIntRotRotArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(integer n, rotation r, rotation s) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true); + } + + private void TestIntVecVecArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(integer n, vector v, vector w) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true); + } + + private void TestKeyIntIntArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(key k, integer n, integer o) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(key k, integer n, integer o, integer p) {{}} }", true); + } + + private void TestCompile(string script, bool expectException) + { + bool gotException = false; + Exception ge = null; + + try + { + m_cg.Convert(script); + } + catch (Exception e) + { + gotException = true; + ge = e; + } + + Assert.That( + gotException, + Is.EqualTo(expectException), + "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a"); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs deleted file mode 100644 index 7ea3cfc..0000000 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs +++ /dev/null @@ -1,117 +0,0 @@ -/* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSimulator Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ - -using System; -using System.IO; -using System.Collections.Generic; -using System.Text; -using System.Text.RegularExpressions; -using OpenSim.Region.ScriptEngine.Shared.YieldProlog; - -namespace OpenSim.Region.ScriptEngine.Shared.CodeTools -{ - public class YP2CSConverter - { - public YP2CSConverter() - { - } - - public string Convert(string Script) - { - string CS_code = GenCode(Script); - return CS_code; - } - - static string GenCode(string myCode) - { - Variable TermList = new Variable(); - Variable FunctionCode = new Variable(); - - string CS_code = ""; - - int cs_pointer = myCode.IndexOf("\n//cs"); - if (cs_pointer > 0) - { - CS_code = myCode.Substring(cs_pointer); // CS code comes after - myCode = myCode.Substring(0, cs_pointer); - } - myCode.Replace("//yp", "%YPCode"); - - StringWriter myCS_SW = new StringWriter(); - StringReader myCode_SR = new StringReader(" yp_nop_header_nop. \n "+myCode + "\n"); - - YP.see(myCode_SR); - YP.tell(myCS_SW); - - //m_log.Debug("Mycode\n ===================================\n" + myCode+"\n"); - -// disable warning: don't see how we can code this differently short -// of rewriting the whole thing -#pragma warning disable 0168, 0219 - foreach (bool l1 in Parser.parseInput(TermList)) - { - foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) - { - // ListPair VFC = new ListPair(FunctionCode, new Variable()); - //m_log.Debug("-------------------------") - //m_log.Debug(FunctionCode.ToString()) - //m_log.Debug("-------------------------") - YPCompiler.convertFunctionCSharp(FunctionCode); - //YPCompiler.convertStringCodesCSharp(VFC); - } - } -#pragma warning restore 0168, 0219 - YP.seen(); - myCS_SW.Close(); - YP.told(); - StringBuilder bu = myCS_SW.GetStringBuilder(); - string finalcode = "//YPEncoded\n" + bu.ToString(); - // FIX script events (we're in the same script) - // 'YP.script_event(Atom.a(@"sayit"),' ==> 'sayit(' - finalcode = Regex.Replace(finalcode, - @"YP.script_event\(Atom.a\(\@\""(.*?)""\)\,", - @"this.$1(", - RegexOptions.Compiled | RegexOptions.Singleline); - finalcode = Regex.Replace(finalcode, - @"YP.script_event\(Atom.a\(\""(.*?)""\)\,", - @"this.$1(", - RegexOptions.Compiled | RegexOptions.Singleline); - finalcode = Regex.Replace(finalcode, - @" static ", - @" ", - RegexOptions.Compiled | RegexOptions.Singleline); - - finalcode = CS_code+"\n\r"+ finalcode; - finalcode = Regex.Replace(finalcode, - @"PrologCallback", - @"public IEnumerable ", - RegexOptions.Compiled | RegexOptions.Singleline); - return finalcode; - } - } -} diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs index cad27b7..f87f446 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs @@ -357,21 +357,25 @@ public override int yynum { get { return 90; }} public class HTTP_REQUEST_EVENT : TOKEN{ public override string yyname { get { return "HTTP_REQUEST_EVENT";}} public override int yynum { get { return 91; }} public HTTP_REQUEST_EVENT(Lexer yyl):base(yyl) {}} -//%IDENT+92 -public class IDENT : TOKEN{ public override string yyname { get { return "IDENT";}} +//%TRANSACTION_RESULT_EVENT+92 +public class TRANSACTION_RESULT_EVENT : TOKEN{ public override string yyname { get { return "TRANSACTION_RESULT_EVENT";}} public override int yynum { get { return 92; }} + public TRANSACTION_RESULT_EVENT(Lexer yyl):base(yyl) {}} +//%IDENT+93 +public class IDENT : TOKEN{ public override string yyname { get { return "IDENT";}} +public override int yynum { get { return 93; }} public IDENT(Lexer yyl):base(yyl) {}} -//%INTEGER_CONSTANT+93 +//%INTEGER_CONSTANT+94 public class INTEGER_CONSTANT : TOKEN{ public override string yyname { get { return "INTEGER_CONSTANT";}} -public override int yynum { get { return 93; }} +public override int yynum { get { return 94; }} public INTEGER_CONSTANT(Lexer yyl):base(yyl) {}} -//%HEX_INTEGER_CONSTANT+94 +//%HEX_INTEGER_CONSTANT+95 public class HEX_INTEGER_CONSTANT : TOKEN{ public override string yyname { get { return "HEX_INTEGER_CONSTANT";}} -public override int yynum { get { return 94; }} +public override int yynum { get { return 95; }} public HEX_INTEGER_CONSTANT(Lexer yyl):base(yyl) {}} -//%FLOAT_CONSTANT+95 +//%FLOAT_CONSTANT+96 public class FLOAT_CONSTANT : TOKEN{ public override string yyname { get { return "FLOAT_CONSTANT";}} -public override int yynum { get { return 95; }} +public override int yynum { get { return 96; }} public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}} //%|LSLTokens public class yyLSLTokens : YyLexer { @@ -476,9 +480,9 @@ public class yyLSLTokens : YyLexer { 2,1,3,56,0, 2,1,3,57,0, 2,1,7,9,122, -9,1,9,3,96, -33,123,5,1,3, -96,33,2,1,7, +9,1,9,3,238, +22,123,5,1,3, +238,22,2,1,7, 10,124,9,1,10, 3,178,0,125,5, 1,3,178,0,2, @@ -502,8 +506,8 @@ public class yyLSLTokens : YyLexer { 9,0,2,1,3, 10,0,2,1,7, 15,134,9,1,15, -3,15,7,135,5, -1,3,15,7,2, +3,0,6,135,5, +1,3,0,6,2, 1,7,17,136,9, 1,17,3,0,224, 137,5,1,3,0, @@ -573,18 +577,18 @@ public class yyLSLTokens : YyLexer { 79,0,77,0,77, 0,69,0,78,0, 84,0,160,12,1, -1073,161,5,119,3, +1095,161,5,119,3, 1,0,162,12,1, -1074,163,5,0,164, -11,1,1041,0,165, +1096,163,5,0,164, +11,1,1063,0,165, 4,0,1,-1,3, 9,0,162,3,10, -0,166,12,1,1275, +0,166,12,1,1297, 167,5,0,168,11, -1,1045,0,165,1, +1,1067,0,165,1, -1,3,13,0,162, 3,0,3,162,3, -96,33,162,3,32, +0,6,162,3,32, 0,162,3,33,0, 162,3,34,0,162, 3,35,0,162,3, @@ -593,12 +597,12 @@ public class yyLSLTokens : YyLexer { 162,3,40,0,162, 3,41,0,162,3, 42,0,169,12,1, -1414,170,5,1,3, +1436,170,5,1,3, 47,0,171,12,1, -1518,172,5,0,173, -11,1,1027,0,165, +1540,172,5,0,173, +11,1,1049,0,165, 1,-1,174,11,1, -1041,0,165,1,-1, +1063,0,165,1,-1, 3,43,0,162,3, 44,0,162,3,45, 0,162,3,46,0, @@ -641,15 +645,15 @@ public class yyLSLTokens : YyLexer { 162,3,93,0,162, 3,94,0,162,3, 95,0,162,3,96, -0,162,3,97,0, +0,162,3,238,22, 162,3,98,0,162, 3,99,0,162,3, 100,0,162,3,101, -0,162,3,102,0, +0,162,3,97,0, 162,3,103,0,162, 3,104,0,162,3, 105,0,162,3,106, -0,162,3,107,0, +0,162,3,102,0, 162,3,108,0,162, 3,109,0,162,3, 110,0,162,3,111, @@ -665,11 +669,11 @@ public class yyLSLTokens : YyLexer { 162,3,123,0,162, 3,124,0,162,3, 125,0,162,3,96, -6,162,3,126,0, -162,3,58,15,162, -3,59,15,162,3, -136,4,162,3,160, -0,162,3,15,7, +6,162,3,107,0, +162,3,126,0,162, +3,58,15,162,3, +59,15,162,3,136, +4,162,3,160,0, 162,3,170,0,162, 3,171,0,162,3, 172,0,162,3,173, @@ -687,17 +691,17 @@ public class yyLSLTokens : YyLexer { 78,0,73,0,84, 0,73,0,65,0, 76,0,176,12,1, -1674,177,5,91,3, +1696,177,5,91,3, 9,0,178,12,1, -40509,179,5,0,180, -11,1,1050,0,165, +42571,179,5,0,180, +11,1,1072,0,165, 1,-1,3,10,0, 178,3,13,0,178, 3,32,0,178,3, 33,0,181,12,1, -43542,182,5,1,3, +45604,182,5,1,3, 61,0,183,12,1, -43657,184,5,0,185, +45719,184,5,0,185, 11,1,142,0,186, 4,36,69,0,88, 0,67,0,76,0, @@ -714,13 +718,13 @@ public class yyLSLTokens : YyLexer { 65,0,84,0,73, 0,79,0,78,0, 1,-1,3,34,0, -189,12,1,43783,190, +189,12,1,45845,190, 5,0,191,11,1, -941,0,165,1,-1, +963,0,165,1,-1, 3,37,0,192,12, -1,41733,193,5,1, +1,43795,193,5,1, 3,61,0,194,12, -1,41848,195,5,0, +1,43910,195,5,0, 196,11,1,40,0, 197,4,28,80,0, 69,0,82,0,67, @@ -734,9 +738,9 @@ public class yyLSLTokens : YyLexer { 82,0,67,0,69, 0,78,0,84,0, 1,-1,3,38,0, -200,12,1,41974,201, +200,12,1,44036,201, 5,1,3,38,0, -202,12,1,42074,203, +202,12,1,44136,203, 5,0,204,11,1, 185,0,205,4,14, 65,0,77,0,80, @@ -746,7 +750,7 @@ public class yyLSLTokens : YyLexer { 0,207,4,6,65, 0,77,0,80,0, 1,-1,3,40,0, -208,12,1,41246,209, +208,12,1,43308,209, 5,0,210,11,1, 71,0,211,4,20, 76,0,69,0,70, @@ -754,7 +758,7 @@ public class yyLSLTokens : YyLexer { 80,0,65,0,82, 0,69,0,78,0, 1,-1,3,41,0, -212,12,1,41610,213, +212,12,1,43672,213, 5,0,214,11,1, 76,0,215,4,22, 82,0,73,0,71, @@ -763,9 +767,9 @@ public class yyLSLTokens : YyLexer { 0,82,0,69,0, 78,0,1,-1,3, 42,0,216,12,1, -42215,217,5,1,3, +44277,217,5,1,3, 61,0,218,12,1, -42330,219,5,0,220, +44392,219,5,0,220, 11,1,28,0,221, 4,22,83,0,84, 0,65,0,82,0, @@ -777,9 +781,9 @@ public class yyLSLTokens : YyLexer { 0,84,0,65,0, 82,0,1,-1,3, 43,0,224,12,1, -45231,225,5,2,3, +47293,225,5,2,3, 61,0,226,12,1, -45346,227,5,0,228, +47408,227,5,0,228, 11,1,16,0,229, 4,22,80,0,76, 0,85,0,83,0, @@ -787,7 +791,7 @@ public class yyLSLTokens : YyLexer { 0,85,0,65,0, 76,0,83,0,1, -1,3,43,0,230, -12,1,45468,231,5, +12,1,47530,231,5, 0,232,11,1,2, 0,233,4,18,73, 0,78,0,67,0, @@ -798,15 +802,15 @@ public class yyLSLTokens : YyLexer { 4,8,80,0,76, 0,85,0,83,0, 1,-1,3,44,0, -236,12,1,42456,237, +236,12,1,44518,237, 5,0,238,11,1, 61,0,239,4,10, 67,0,79,0,77, 0,77,0,65,0, 1,-1,3,45,0, -240,12,1,40641,241, +240,12,1,42703,241, 5,2,3,45,0, -242,12,1,40728,243, +242,12,1,42790,243, 5,0,244,11,1, 10,0,245,4,18, 68,0,69,0,67, @@ -814,7 +818,7 @@ public class yyLSLTokens : YyLexer { 77,0,69,0,78, 0,84,0,1,-1, 3,61,0,246,12, -1,40876,247,5,0, +1,42938,247,5,0, 248,11,1,22,0, 249,4,24,77,0, 73,0,78,0,85, @@ -827,9 +831,9 @@ public class yyLSLTokens : YyLexer { 0,78,0,85,0, 83,0,1,-1,3, 46,0,252,12,1, -42577,253,5,14,3, +44639,253,5,14,3, 48,0,254,12,1, -40243,255,5,14,3, +42305,255,5,14,3, 48,0,254,3,49, 0,254,3,50,0, 254,3,51,0,254, @@ -839,11 +843,11 @@ public class yyLSLTokens : YyLexer { 254,3,56,0,254, 3,57,0,254,3, 101,0,256,12,1, -39706,257,5,12,3, +41768,257,5,12,3, 43,0,258,12,1, -40033,259,5,10,3, +42095,259,5,10,3, 48,0,260,12,1, -39768,261,5,12,3, +41830,261,5,12,3, 48,0,260,3,49, 0,260,3,50,0, 260,3,51,0,260, @@ -853,8 +857,8 @@ public class yyLSLTokens : YyLexer { 260,3,56,0,260, 3,57,0,260,3, 102,0,262,12,1, -39774,263,5,0,264, -11,1,882,0,265, +41836,263,5,0,264, +11,1,904,0,265, 4,28,70,0,76, 0,79,0,65,0, 84,0,95,0,67, @@ -862,7 +866,7 @@ public class yyLSLTokens : YyLexer { 83,0,84,0,65, 0,78,0,84,0, 1,-1,3,70,0, -262,266,11,1,882, +262,266,11,1,904, 0,265,1,-1,3, 49,0,260,3,50, 0,260,3,51,0, @@ -884,7 +888,7 @@ public class yyLSLTokens : YyLexer { 1,-1,3,102,0, 262,3,69,0,256, 3,70,0,262,267, -11,1,882,0,265, +11,1,904,0,265, 1,-1,3,49,0, 254,3,50,0,254, 3,51,0,254,3, @@ -901,15 +905,15 @@ public class yyLSLTokens : YyLexer { 0,82,0,73,0, 79,0,68,0,1, -1,3,47,0,270, -12,1,42698,271,5, +12,1,44760,271,5, 3,3,47,0,272, -12,1,42922,273,5, +12,1,44984,273,5, 118,3,1,0,274, -12,1,42923,275,5, +12,1,44985,275,5, 118,3,1,0,274, 3,9,0,274,3, -96,33,274,3,13, -0,274,3,0,3, +13,0,274,3,0, +3,274,3,0,6, 274,3,32,0,274, 3,33,0,274,3, 34,0,274,3,35, @@ -960,16 +964,16 @@ public class yyLSLTokens : YyLexer { 0,274,3,93,0, 274,3,94,0,274, 3,95,0,274,3, -96,0,274,3,97, -0,274,3,98,0, +96,0,274,3,238, +22,274,3,98,0, 274,3,99,0,274, 3,100,0,274,3, -101,0,274,3,102, +101,0,274,3,97, 0,274,3,103,0, 274,3,104,0,274, 3,105,0,274,3, -106,0,274,3,107, -0,274,3,15,7, +106,0,274,3,102, +0,274,3,108,0, 274,3,109,0,274, 3,110,0,274,3, 111,0,274,3,112, @@ -981,10 +985,10 @@ public class yyLSLTokens : YyLexer { 274,3,119,0,274, 3,120,0,274,3, 121,0,274,3,122, -0,274,3,108,0, +0,274,3,123,0, 274,3,124,0,274, 3,125,0,274,3, -96,6,274,3,123, +96,6,274,3,107, 0,274,3,126,0, 274,3,58,15,274, 3,59,15,274,3, @@ -1001,11 +1005,11 @@ public class yyLSLTokens : YyLexer { 274,3,0,224,274, 3,40,32,274,3, 63,32,274,276,11, -1,1054,0,165,1, +1,1076,0,165,1, -1,3,9,0,274, -3,96,33,274,3, -13,0,274,3,0, -3,274,3,32,0, +3,13,0,274,3, +0,3,274,3,0, +6,274,3,32,0, 274,3,33,0,274, 3,34,0,274,3, 35,0,274,3,36, @@ -1056,16 +1060,16 @@ public class yyLSLTokens : YyLexer { 0,274,3,94,0, 274,3,95,0,274, 3,96,0,274,3, -97,0,274,3,98, +238,22,274,3,98, 0,274,3,99,0, 274,3,100,0,274, 3,101,0,274,3, -102,0,274,3,103, +97,0,274,3,103, 0,274,3,104,0, 274,3,105,0,274, 3,106,0,274,3, -107,0,274,3,15, -7,274,3,109,0, +102,0,274,3,108, +0,274,3,109,0, 274,3,110,0,274, 3,111,0,274,3, 112,0,274,3,113, @@ -1076,11 +1080,11 @@ public class yyLSLTokens : YyLexer { 0,274,3,119,0, 274,3,120,0,274, 3,121,0,274,3, -122,0,274,3,108, +122,0,274,3,123, 0,274,3,124,0, 274,3,125,0,274, 3,96,6,274,3, -123,0,274,3,126, +107,0,274,3,126, 0,274,3,58,15, 274,3,59,15,274, 3,136,4,274,3, @@ -1096,9 +1100,9 @@ public class yyLSLTokens : YyLexer { 1,274,3,0,224, 274,3,40,32,274, 3,63,32,274,277, -11,1,1054,0,165, +11,1,1076,0,165, 1,-1,3,61,0, -278,12,1,43173,279, +278,12,1,45235,279, 5,0,280,11,1, 34,0,281,4,24, 83,0,76,0,65, @@ -1107,19 +1111,19 @@ public class yyLSLTokens : YyLexer { 0,85,0,65,0, 76,0,83,0,1, -1,3,42,0,282, -12,1,42799,283,5, -0,284,11,1,1015, +12,1,44861,283,5, +0,284,11,1,1037, 0,165,1,-1,285, 11,1,96,0,286, 4,10,83,0,76, 0,65,0,83,0, 72,0,1,-1,3, 48,0,287,12,1, -39296,288,5,13,3, +41358,288,5,13,3, 120,0,289,12,1, -39320,290,5,22,3, +41382,290,5,22,3, 102,0,291,12,1, -39321,292,5,22,3, +41383,292,5,22,3, 102,0,291,3,48, 0,291,3,49,0, 291,3,50,0,291, @@ -1138,7 +1142,7 @@ public class yyLSLTokens : YyLexer { 3,68,0,291,3, 69,0,291,3,70, 0,291,293,11,1, -863,0,294,4,40, +885,0,294,4,40, 72,0,69,0,88, 0,95,0,73,0, 78,0,84,0,69, @@ -1166,9 +1170,9 @@ public class yyLSLTokens : YyLexer { 0,291,3,70,0, 291,0,165,1,-1, 3,48,0,295,12, -1,39598,296,5,11, +1,41660,296,5,11, 3,46,0,297,12, -1,39701,298,5,14, +1,41763,298,5,14, 3,48,0,254,3, 49,0,254,3,50, 0,254,3,51,0, @@ -1180,7 +1184,7 @@ public class yyLSLTokens : YyLexer { 3,101,0,256,3, 102,0,262,3,69, 0,256,3,70,0, -262,299,11,1,882, +262,299,11,1,904, 0,265,1,-1,3, 48,0,295,3,49, 0,295,3,50,0, @@ -1190,7 +1194,7 @@ public class yyLSLTokens : YyLexer { 0,295,3,55,0, 295,3,56,0,295, 3,57,0,295,300, -11,1,857,0,301, +11,1,879,0,301, 4,32,73,0,78, 0,84,0,69,0, 71,0,69,0,82, @@ -1207,7 +1211,7 @@ public class yyLSLTokens : YyLexer { 56,0,295,3,54, 0,295,3,46,0, 297,3,57,0,295, -302,11,1,857,0, +302,11,1,879,0, 301,1,-1,3,49, 0,295,3,50,0, 295,3,51,0,295, @@ -1217,16 +1221,16 @@ public class yyLSLTokens : YyLexer { 295,3,56,0,295, 3,57,0,295,3, 59,0,303,12,1, -43300,304,5,0,305, +45362,304,5,0,305, 11,1,46,0,306, 4,18,83,0,69, 0,77,0,73,0, 67,0,79,0,76, 0,79,0,78,0, 1,-1,3,60,0, -307,12,1,44268,308, +307,12,1,46330,308, 5,2,3,60,0, -309,12,1,44382,310, +309,12,1,46444,310, 5,0,311,11,1, 197,0,312,4,20, 76,0,69,0,70, @@ -1234,7 +1238,7 @@ public class yyLSLTokens : YyLexer { 83,0,72,0,73, 0,70,0,84,0, 1,-1,3,61,0, -313,12,1,44503,314, +313,12,1,46565,314, 5,0,315,11,1, 148,0,316,4,22, 76,0,69,0,83, @@ -1249,9 +1253,9 @@ public class yyLSLTokens : YyLexer { 0,71,0,76,0, 69,0,1,-1,3, 61,0,319,12,1, -44629,320,5,1,3, +46691,320,5,1,3, 61,0,321,12,1, -44744,322,5,0,323, +46806,322,5,0,323, 11,1,136,0,324, 4,26,69,0,81, 0,85,0,65,0, @@ -1264,9 +1268,9 @@ public class yyLSLTokens : YyLexer { 81,0,85,0,65, 0,76,0,83,0, 1,-1,3,62,0, -327,12,1,44870,328, +327,12,1,46932,328, 5,2,3,61,0, -329,12,1,44985,330, +329,12,1,47047,330, 5,0,331,11,1, 154,0,332,4,28, 71,0,82,0,69, @@ -1276,7 +1280,7 @@ public class yyLSLTokens : YyLexer { 85,0,65,0,76, 0,83,0,1,-1, 3,62,0,333,12, -1,45106,334,5,0, +1,47168,334,5,0, 335,11,1,203,0, 336,4,22,82,0, 73,0,71,0,72, @@ -1291,13 +1295,13 @@ public class yyLSLTokens : YyLexer { 0,71,0,76,0, 69,0,1,-1,3, 64,0,339,12,1, -43421,340,5,0,341, +45483,340,5,0,341, 11,1,106,0,342, 4,4,65,0,84, 0,1,-1,3,65, -0,343,12,1,1675, +0,343,12,1,1697, 344,5,63,3,109, -0,345,12,1,1676, +0,345,12,1,1698, 346,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -1349,7 +1353,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -347,11,1,845,0, +347,11,1,867,0, 348,4,10,73,0, 68,0,69,0,78, 0,84,0,1,-1, @@ -1403,7 +1407,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,349,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,66,0,343, 3,67,0,343,3, 68,0,343,3,69, @@ -1425,7 +1429,7 @@ public class yyLSLTokens : YyLexer { 88,0,343,3,89, 0,343,3,90,0, 343,3,91,0,350, -12,1,41124,351,5, +12,1,43186,351,5, 0,352,11,1,126, 0,353,4,24,76, 0,69,0,70,0, @@ -1434,7 +1438,7 @@ public class yyLSLTokens : YyLexer { 67,0,75,0,69, 0,84,0,1,-1, 3,93,0,354,12, -1,41489,355,5,0, +1,43551,355,5,0, 356,11,1,131,0, 357,4,26,82,0, 73,0,71,0,72, @@ -1443,21 +1447,21 @@ public class yyLSLTokens : YyLexer { 0,67,0,75,0, 69,0,84,0,1, -1,3,94,0,358, -12,1,45593,359,5, +12,1,47655,359,5, 0,360,11,1,170, 0,361,4,10,67, 0,65,0,82,0, 69,0,84,0,1, -1,3,95,0,343, 3,97,0,362,12, -1,20677,363,5,63, +1,22739,363,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,364,12,1,20712, +0,364,12,1,22774, 365,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -1465,7 +1469,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,366, -12,1,20747,367,5, +12,1,22809,367,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -1508,7 +1512,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,368,12, -1,20790,369,5,63, +1,22852,369,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -1552,7 +1556,7 @@ public class yyLSLTokens : YyLexer { 3,95,0,345,3, 97,0,345,3,98, 0,345,3,99,0, -370,12,1,20835,371, +370,12,1,22897,371, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -1601,7 +1605,7 @@ public class yyLSLTokens : YyLexer { 345,3,102,0,345, 3,103,0,345,3, 104,0,372,12,1, -20885,373,5,63,3, +22947,373,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -1662,7 +1666,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,376,11,1,845, +345,376,11,1,867, 0,348,1,-1,3, 100,0,345,3,101, 0,345,3,102,0, @@ -1671,7 +1675,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -377,11,1,845,0, +377,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -1682,7 +1686,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,378,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -1717,17 +1721,17 @@ public class yyLSLTokens : YyLexer { 345,3,88,0,345, 3,89,0,345,3, 90,0,345,3,95, -0,379,12,1,21278, +0,379,12,1,23340, 380,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, -0,381,12,1,21311, +0,381,12,1,23373, 382,5,63,3,109, 0,345,3,110,0, 345,3,111,0,383, -12,1,21341,384,5, +12,1,23403,384,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -1735,7 +1739,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,385,12,1, -21376,386,5,63,3, +23438,386,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -1777,14 +1781,14 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,387,12,1, -21462,388,5,63,3, +23524,388,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -389,12,1,21497,390, +389,12,1,23559,390, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -1827,13 +1831,13 @@ public class yyLSLTokens : YyLexer { 89,0,345,3,90, 0,345,3,95,0, 345,3,97,0,391, -12,1,21540,392,5, +12,1,23602,392,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,393, -12,1,21573,394,5, +12,1,23635,394,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -1881,7 +1885,7 @@ public class yyLSLTokens : YyLexer { 345,3,101,0,345, 3,102,0,345,3, 103,0,395,12,1, -21622,396,5,63,3, +23684,396,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -1927,14 +1931,14 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,397,12,1, -21669,398,5,63,3, +23731,398,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -399,12,1,21704,400, +399,12,1,23766,400, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -2040,19 +2044,19 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,403,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,404,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,405,11,1,845, +345,405,11,1,867, 0,348,1,-1,3, 115,0,345,3,116, 0,345,3,117,0, @@ -2100,7 +2104,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,406,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, @@ -2110,7 +2114,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,407, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,117,0, 345,3,118,0,345, 3,119,0,345,3, @@ -2156,7 +2160,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,408,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,97,0,345,3, 98,0,345,3,99, 0,345,3,100,0, @@ -2167,7 +2171,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,409,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -2212,7 +2216,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,410,11,1,845, +345,410,11,1,867, 0,348,1,-1,3, 112,0,345,3,113, 0,345,3,114,0, @@ -2262,10 +2266,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,411, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,115,0, 345,3,116,0,412, -12,1,22513,413,5, +12,1,24575,413,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -2308,13 +2312,13 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,414,12, -1,22556,415,5,63, +1,24618,415,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,416,12, -1,22589,417,5,63, +1,24651,417,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -2361,7 +2365,7 @@ public class yyLSLTokens : YyLexer { 345,3,100,0,345, 3,101,0,345,3, 102,0,345,3,103, -0,418,12,1,22638, +0,418,12,1,24700, 419,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -2407,7 +2411,7 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,420,12,1,22685, +0,420,12,1,24747, 421,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -2415,7 +2419,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,422, -12,1,22720,423,5, +12,1,24782,423,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -2519,20 +2523,20 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,426,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,427, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,104,0, 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, 0,345,428,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -2579,7 +2583,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,429,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, @@ -2589,7 +2593,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -430,11,1,845,0, +430,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -2635,7 +2639,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,431,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -2646,7 +2650,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,432, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,117,0, 345,3,118,0,345, 3,119,0,345,3, @@ -2692,16 +2696,16 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,433,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,98,0,343,3, 99,0,434,12,1, -23439,435,5,63,3, +25501,435,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -436,12,1,23469,437, +436,12,1,25531,437, 5,63,3,109,0, 345,3,110,0,438, -12,1,23498,439,5, +12,1,25560,439,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -2709,16 +2713,16 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,440,12,1, -23533,441,5,63,3, +25595,441,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,442,12,1, -23566,443,5,63,3, +25628,443,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -444,12,1,23596,445, +444,12,1,25658,445, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -2770,7 +2774,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,446,12, -1,23650,447,5,63, +1,25712,447,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -2829,7 +2833,7 @@ public class yyLSLTokens : YyLexer { 0,69,0,86,0, 69,0,78,0,84, 0,1,-1,450,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -2878,7 +2882,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,451,11,1,845, +345,451,11,1,867, 0,348,1,-1,3, 115,0,345,3,116, 0,345,3,117,0, @@ -2926,7 +2930,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,452,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -2971,7 +2975,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -453,11,1,845,0, +453,11,1,867,0, 348,1,-1,3,111, 0,345,3,112,0, 345,3,113,0,345, @@ -3021,7 +3025,7 @@ public class yyLSLTokens : YyLexer { 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, -0,454,12,1,24123, +0,454,12,1,26185, 455,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -3073,7 +3077,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,456, -12,1,24177,457,5, +12,1,26239,457,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -3122,14 +3126,14 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -458,12,1,24228,459, +458,12,1,26290,459, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,460, -12,1,24262,461,5, +12,1,26324,461,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -3178,14 +3182,14 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -462,12,1,24313,463, +462,12,1,26375,463, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,464,12, -1,24343,465,5,63, +1,26405,465,5,63, 3,109,0,345,3, 110,0,466,12,1, -24372,467,5,63,3, +26434,467,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -3227,13 +3231,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,468,12,1, -24458,469,5,63,3, +26520,469,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, -0,470,12,1,24492, +0,470,12,1,26554, 471,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -3241,7 +3245,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,472, -12,1,24527,473,5, +12,1,26589,473,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -3284,20 +3288,20 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,474,12, -1,24570,475,5,63, +1,26632,475,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,476,12, -1,24603,477,5,63, +1,26665,477,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,478,12,1,24638, +0,478,12,1,26700, 479,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -3404,7 +3408,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,482,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -3451,7 +3455,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,483,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, @@ -3461,7 +3465,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -484,11,1,845,0, +484,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -3507,7 +3511,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,485,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,116,0,345, 3,117,0,345,3, 118,0,345,3,119, @@ -3547,10 +3551,10 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,486,12,1,25105, +0,486,12,1,27167, 487,5,63,3,109, 0,345,3,110,0, -488,12,1,25134,489, +488,12,1,27196,489, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -3595,7 +3599,7 @@ public class yyLSLTokens : YyLexer { 345,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, -0,490,12,1,25180, +0,490,12,1,27242, 491,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -3663,7 +3667,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -494,11,1,845,0, +494,11,1,867,0, 348,1,-1,3,111, 0,345,3,112,0, 345,3,113,0,345, @@ -3714,14 +3718,14 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,495,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,496,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -3789,7 +3793,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,499,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -3838,11 +3842,11 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,500,11,1,845, +345,500,11,1,867, 0,348,1,-1,3, 106,0,345,3,107, 0,345,3,108,0, -345,501,11,1,845, +345,501,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -3889,14 +3893,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,502,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,106,0,345, 3,107,0,345,3, 108,0,345,503,11, -1,845,0,348,1, --1,504,11,1,845, +1,867,0,348,1, +-1,504,11,1,867, 0,348,1,-1,505, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,112,0, 345,3,113,0,345, 3,114,0,345,3, @@ -3942,7 +3946,7 @@ public class yyLSLTokens : YyLexer { 3,101,0,345,3, 102,0,345,3,103, 0,345,3,104,0, -506,12,1,26129,507, +506,12,1,28191,507, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -3985,10 +3989,10 @@ public class yyLSLTokens : YyLexer { 89,0,345,3,90, 0,345,3,95,0, 345,3,97,0,508, -12,1,26172,509,5, +12,1,28234,509,5, 63,3,109,0,345, 3,110,0,510,12, -1,26201,511,5,63, +1,28263,511,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -4035,7 +4039,7 @@ public class yyLSLTokens : YyLexer { 345,3,100,0,345, 3,101,0,345,3, 102,0,345,3,103, -0,512,12,1,26250, +0,512,12,1,28312, 513,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -4081,7 +4085,7 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,514,12,1,26297, +0,514,12,1,28359, 515,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -4127,7 +4131,7 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,516,12,1, -26343,517,5,63,3, +28405,517,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -4192,20 +4196,20 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,520, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -521,11,1,845,0, +521,11,1,867,0, 348,1,-1,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,522,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, @@ -4255,7 +4259,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -523,11,1,845,0, +523,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -4266,17 +4270,17 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,524,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,525,11,1,845, +345,525,11,1,867, 0,348,1,-1,3, 100,0,526,12,1, -26920,527,5,63,3, +28982,527,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -528,12,1,26950,529, +528,12,1,29012,529, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -4370,14 +4374,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,532,12, -1,27083,533,5,63, +1,29145,533,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,534,12,1,27118, +0,534,12,1,29180, 535,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -4420,14 +4424,14 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -536,12,1,27161,537, +536,12,1,29223,537, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,538, -12,1,27195,539,5, +12,1,29257,539,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -4473,13 +4477,13 @@ public class yyLSLTokens : YyLexer { 98,0,345,3,99, 0,345,3,100,0, 345,3,101,0,540, -12,1,27242,541,5, +12,1,29304,541,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,542, -12,1,27275,543,5, +12,1,29337,543,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -4488,7 +4492,7 @@ public class yyLSLTokens : YyLexer { 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, -544,12,1,27312,545, +544,12,1,29374,545, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -4534,13 +4538,13 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -546,12,1,27359,547, +546,12,1,29421,547, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, -548,12,1,27392,549, +548,12,1,29454,549, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -4646,14 +4650,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,552, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -553,11,1,845,0, +553,11,1,867,0, 348,1,-1,3,119, 0,345,3,120,0, 345,3,121,0,345, @@ -4697,7 +4701,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -554,11,1,845,0, +554,11,1,867,0, 348,1,-1,3,115, 0,345,3,116,0, 345,3,117,0,345, @@ -4744,7 +4748,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,555,11,1,845, +345,555,11,1,867, 0,348,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, @@ -4752,7 +4756,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,556,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,116,0,345,3, 117,0,345,3,118, 0,345,3,119,0, @@ -4798,7 +4802,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,557, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, @@ -4808,7 +4812,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,558,11,1,845, +345,558,11,1,867, 0,348,1,-1,3, 117,0,345,3,118, 0,345,3,119,0, @@ -4854,12 +4858,12 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,559, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, 101,0,560,12,1, -28167,561,5,63,3, +30229,561,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -4905,7 +4909,7 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,345,3,102, -0,562,12,1,28215, +0,562,12,1,30277, 563,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -4948,7 +4952,7 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -564,12,1,28258,565, +564,12,1,30320,565, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -4957,7 +4961,7 @@ public class yyLSLTokens : YyLexer { 345,3,115,0,345, 3,116,0,345,3, 117,0,566,12,1, -28294,567,5,63,3, +30356,567,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -5008,7 +5012,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -568,12,1,28348,569, +568,12,1,30410,569, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -5016,7 +5020,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,570,12, -1,28383,571,5,63, +1,30445,571,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -5119,8 +5123,8 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,574,11, -1,845,0,348,1, --1,575,11,1,845, +1,867,0,348,1, +-1,575,11,1,867, 0,348,1,-1,3, 118,0,345,3,119, 0,345,3,120,0, @@ -5165,7 +5169,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -576,11,1,845,0, +576,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -5176,24 +5180,24 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,577,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,578, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -579,11,1,845,0, +579,11,1,867,0, 348,1,-1,3,101, -0,580,12,1,28961, +0,580,12,1,31023, 581,5,63,3,109, -0,582,12,1,28989, +0,582,12,1,31051, 583,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -5236,7 +5240,7 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -584,12,1,29032,585, +584,12,1,31094,585, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -5285,7 +5289,7 @@ public class yyLSLTokens : YyLexer { 345,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, -0,586,12,1,29083, +0,586,12,1,31145, 587,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -5337,7 +5341,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,588, -12,1,29137,589,5, +12,1,31199,589,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -5395,11 +5399,11 @@ public class yyLSLTokens : YyLexer { 0,95,0,69,0, 86,0,69,0,78, 0,84,0,1,-1, -592,11,1,845,0, +592,11,1,867,0, 348,1,-1,3,106, 0,345,3,107,0, 345,3,108,0,345, -593,11,1,845,0, +593,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -5410,7 +5414,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,594,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, @@ -5461,13 +5465,13 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,595,12,1, -29495,596,5,63,3, +31557,596,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, -0,597,12,1,29529, +0,597,12,1,31591, 598,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -5513,7 +5517,7 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,599,12,1,29576, +0,599,12,1,31638, 600,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -5574,7 +5578,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,603,11,1,845, +345,603,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -5621,20 +5625,20 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,604,11, -1,845,0,348,1, --1,605,11,1,845, +1,867,0,348,1, +-1,605,11,1,867, 0,348,1,-1,3, 102,0,606,12,1, -29922,607,5,63,3, +31984,607,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -608,12,1,29952,609, +608,12,1,32014,609, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, -610,12,1,29985,611, +610,12,1,32047,611, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -5735,7 +5739,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,614,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -5784,11 +5788,11 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -615,12,1,30216,616, +615,12,1,32278,616, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,617,12, -1,30246,618,5,63, +1,32308,618,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -5831,14 +5835,14 @@ public class yyLSLTokens : YyLexer { 345,3,90,0,345, 3,95,0,345,3, 97,0,619,12,1, -30289,620,5,63,3, +32351,620,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -621,12,1,30324,622, +621,12,1,32386,622, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -5940,7 +5944,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,625, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, @@ -5950,7 +5954,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,626,11,1,845, +345,626,11,1,867, 0,348,1,-1,3, 112,0,345,3,113, 0,345,3,114,0, @@ -6000,19 +6004,19 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,627, -11,1,845,0,348, +11,1,867,0,348, 1,-1,628,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,103,0,343,3, 104,0,629,12,1, -30764,630,5,63,3, +32826,630,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -631,12,1,30799,632, +631,12,1,32861,632, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6020,11 +6024,11 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,633,12, -1,30834,634,5,63, +1,32896,634,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, -635,12,1,30865,636, +635,12,1,32927,636, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6066,13 +6070,13 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -637,12,1,30951,638, +637,12,1,33013,638, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, -639,12,1,30984,640, +639,12,1,33046,640, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6118,12 +6122,12 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -641,12,1,31031,642, +641,12,1,33093,642, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, -0,643,12,1,31063, +0,643,12,1,33125, 644,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -6132,7 +6136,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,115,0, 345,3,116,0,345, 3,117,0,645,12, -1,31099,646,5,63, +1,33161,646,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -6178,21 +6182,21 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,647,12, -1,31146,648,5,63, +1,33208,648,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,649,12,1, -31180,650,5,63,3, +33242,650,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -651,12,1,31215,652, +651,12,1,33277,652, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6297,7 +6301,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -655,11,1,845,0, +655,11,1,867,0, 348,1,-1,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -6344,14 +6348,14 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,656,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,657,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,118,0,345, 3,119,0,345,3, 120,0,345,3,121, @@ -6396,27 +6400,27 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,658,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,114,0,345,3, 115,0,659,12,1, -31665,660,5,63,3, +33727,660,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,661, -12,1,31696,662,5, +12,1,33758,662,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,663,12,1, -31726,664,5,63,3, +33788,664,5,63,3, 109,0,345,3,110, -0,665,12,1,31755, +0,665,12,1,33817, 666,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, -667,12,1,31789,668, +667,12,1,33851,668, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6462,7 +6466,7 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -669,12,1,31836,670, +669,12,1,33898,670, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -6529,7 +6533,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -673,11,1,845,0, +673,11,1,867,0, 348,1,-1,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -6576,7 +6580,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,674,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, @@ -6626,7 +6630,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,675, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,112,0, 345,3,113,0,345, 3,114,0,345,3, @@ -6676,7 +6680,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,676,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, @@ -6724,7 +6728,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,677,11,1,845, +345,677,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -6771,14 +6775,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,678,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,679, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,115,0, 345,3,116,0,345, 3,117,0,345,3, @@ -6825,7 +6829,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -680,11,1,845,0, +680,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -6836,7 +6840,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,681,11,1,845, +345,681,11,1,867, 0,348,1,-1,3, 113,0,345,3,114, 0,345,3,115,0, @@ -6885,7 +6889,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -682,11,1,845,0, +682,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -6931,7 +6935,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,683,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -6976,12 +6980,12 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,684,11,1,845, +345,684,11,1,867, 0,348,1,-1,3, 105,0,685,12,1, -32925,686,5,63,3, +34987,686,5,63,3, 109,0,345,3,110, -0,687,12,1,32954, +0,687,12,1,35016, 688,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -6989,7 +6993,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,689, -12,1,32989,690,5, +12,1,35051,690,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -7035,7 +7039,7 @@ public class yyLSLTokens : YyLexer { 98,0,345,3,99, 0,345,3,100,0, 345,3,101,0,691, -12,1,33036,692,5, +12,1,35098,692,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -7083,7 +7087,7 @@ public class yyLSLTokens : YyLexer { 345,3,101,0,345, 3,102,0,345,3, 103,0,693,12,1, -33085,694,5,63,3, +35147,694,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -7129,13 +7133,13 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,695,12,1, -33132,696,5,63,3, +35194,696,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,697,12,1, -33165,698,5,63,3, +35227,698,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -7239,27 +7243,27 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,701,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,702, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,104,0, 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, 0,345,703,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,704,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -7304,7 +7308,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,705,11,1,845, +345,705,11,1,867, 0,348,1,-1,3, 111,0,345,3,112, 0,345,3,113,0, @@ -7350,7 +7354,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,100,0, 345,3,101,0,345, 3,102,0,706,12, -1,33693,707,5,63, +1,35755,707,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -7409,9 +7413,9 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -710,11,1,845,0, +710,11,1,867,0, 348,1,-1,3,106, -0,711,12,1,33886, +0,711,12,1,35948, 712,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -7420,13 +7424,13 @@ public class yyLSLTokens : YyLexer { 0,345,3,115,0, 345,3,116,0,345, 3,117,0,713,12, -1,33922,714,5,63, +1,35984,714,5,63, 3,109,0,715,12, -1,33950,716,5,63, +1,36012,716,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, -717,12,1,33981,718, +717,12,1,36043,718, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -7529,7 +7533,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,721,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, @@ -7580,7 +7584,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,722, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,118,0, 345,3,119,0,345, 3,120,0,345,3, @@ -7625,9 +7629,9 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,723,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,107,0,724, -12,1,34367,725,5, +12,1,36429,725,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -7673,7 +7677,7 @@ public class yyLSLTokens : YyLexer { 98,0,345,3,99, 0,345,3,100,0, 345,3,101,0,726, -12,1,34414,727,5, +12,1,36476,727,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -7685,7 +7689,7 @@ public class yyLSLTokens : YyLexer { 345,3,119,0,345, 3,120,0,345,3, 121,0,728,12,1, -34454,729,5,63,3, +36516,729,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -7782,16 +7786,16 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,732,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,733,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,108,0,734, -12,1,34728,735,5, +12,1,36790,735,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -7834,10 +7838,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,736,12, -1,34771,737,5,63, +1,36833,737,5,63, 3,109,0,345,3, 110,0,738,12,1, -34800,739,5,63,3, +36862,739,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -7882,7 +7886,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,98,0, 345,3,99,0,345, 3,100,0,740,12, -1,34846,741,5,63, +1,36908,741,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -7924,7 +7928,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,89,0, 345,3,90,0,345, 3,95,0,742,12, -1,34932,743,5,63, +1,36994,743,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -7968,11 +7972,11 @@ public class yyLSLTokens : YyLexer { 3,95,0,345,3, 97,0,345,3,98, 0,345,3,99,0, -744,12,1,34977,745, +744,12,1,37039,745, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,746,12, -1,35007,747,5,63, +1,37069,747,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -8023,7 +8027,7 @@ public class yyLSLTokens : YyLexer { 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, -0,748,12,1,35061, +0,748,12,1,37123, 749,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -8075,7 +8079,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,750, -12,1,35115,751,5, +12,1,37177,751,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -8124,14 +8128,14 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -752,12,1,35166,753, +752,12,1,37228,753, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,754, -12,1,35200,755,5, +12,1,37262,755,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -8180,14 +8184,14 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -756,12,1,35251,757, +756,12,1,37313,757, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,758,12, -1,35281,759,5,63, +1,37343,759,5,63, 3,109,0,345,3, 110,0,760,12,1, -35310,761,5,63,3, +37372,761,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -8229,13 +8233,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,762,12,1, -35396,763,5,63,3, +37458,763,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, -0,764,12,1,35430, +0,764,12,1,37492, 765,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -8243,7 +8247,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,766, -12,1,35465,767,5, +12,1,37527,767,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -8286,20 +8290,20 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,768,12, -1,35508,769,5,63, +1,37570,769,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,770,12, -1,35541,771,5,63, +1,37603,771,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,772,12,1,35576, +0,772,12,1,37638, 773,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -8408,7 +8412,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,776,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -8455,7 +8459,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,777,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, @@ -8465,7 +8469,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -778,11,1,845,0, +778,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -8511,7 +8515,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,779,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,116,0,345, 3,117,0,345,3, 118,0,345,3,119, @@ -8551,10 +8555,10 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,780,12,1,36043, +0,780,12,1,38105, 781,5,63,3,109, 0,345,3,110,0, -782,12,1,36072,783, +782,12,1,38134,783, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -8599,7 +8603,7 @@ public class yyLSLTokens : YyLexer { 345,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, -0,784,12,1,36118, +0,784,12,1,38180, 785,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -8669,7 +8673,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -788,11,1,845,0, +788,11,1,867,0, 348,1,-1,3,111, 0,345,3,112,0, 345,3,113,0,345, @@ -8720,14 +8724,14 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,789,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,790,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -8797,7 +8801,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,793,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -8846,11 +8850,11 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,794,11,1,845, +345,794,11,1,867, 0,348,1,-1,3, 106,0,345,3,107, 0,345,3,108,0, -345,795,11,1,845, +345,795,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -8897,14 +8901,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,796,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,106,0,345, 3,107,0,345,3, 108,0,345,797,11, -1,845,0,348,1, --1,798,11,1,845, +1,867,0,348,1, +-1,798,11,1,867, 0,348,1,-1,799, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,112,0, 345,3,113,0,345, 3,114,0,345,3, @@ -8954,7 +8958,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,800,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,100,0,345,3, 101,0,345,3,102, 0,345,3,103,0, @@ -8962,7 +8966,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,801,11,1,845, +345,801,11,1,867, 0,348,1,-1,3, 97,0,345,3,98, 0,345,3,99,0, @@ -8974,7 +8978,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,802,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,101,0,345,3, 102,0,345,3,103, 0,345,3,104,0, @@ -8982,7 +8986,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,803,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, @@ -9032,7 +9036,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,804, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, @@ -9040,10 +9044,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,103,0, 345,3,104,0,345, 3,105,0,805,12, -1,37419,806,5,63, +1,39481,806,5,63, 3,109,0,345,3, 110,0,807,12,1, -37448,808,5,63,3, +39510,808,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -9093,7 +9097,7 @@ public class yyLSLTokens : YyLexer { 345,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, -0,809,12,1,37501, +0,809,12,1,39563, 810,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -9135,9 +9139,9 @@ public class yyLSLTokens : YyLexer { 345,3,88,0,345, 3,89,0,345,3, 90,0,345,3,95, -0,811,12,1,37587, +0,811,12,1,39649, 812,5,63,3,109, -0,813,12,1,37615, +0,813,12,1,39677, 814,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -9183,21 +9187,21 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,815,12,1,37662, +0,815,12,1,39724, 816,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, -817,12,1,37696,818, +817,12,1,39758,818, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,819, -12,1,37730,820,5, +12,1,39792,820,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -9240,7 +9244,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,90,0, 345,3,95,0,345, 3,97,0,821,12, -1,37773,822,5,63, +1,39835,822,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -9287,7 +9291,7 @@ public class yyLSLTokens : YyLexer { 345,3,100,0,345, 3,101,0,345,3, 102,0,345,3,103, -0,823,12,1,37822, +0,823,12,1,39884, 824,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -9333,7 +9337,7 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,825,12,1,37869, +0,825,12,1,39931, 826,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -9400,13 +9404,13 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,829, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,104,0, 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, 0,345,830,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, @@ -9416,7 +9420,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,831, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,116,0, 345,3,117,0,345, 3,118,0,345,3, @@ -9462,7 +9466,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,832,11,1,845, +345,832,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -9509,14 +9513,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,833,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,834, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,110,0, 345,3,111,0,345, 3,112,0,345,3, @@ -9567,7 +9571,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -835,11,1,845,0, +835,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -9578,15 +9582,15 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,836,11,1,845, +345,836,11,1,867, 0,348,1,-1,3, 108,0,345,837,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, -838,12,1,38653,839, +838,12,1,40715,839, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -9594,7 +9598,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,840,12, -1,38688,841,5,63, +1,40750,841,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -9640,10 +9644,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,842,12, -1,38735,843,5,63, +1,40797,843,5,63, 3,109,0,345,3, 110,0,844,12,1, -38764,845,5,63,3, +40826,845,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -9750,7 +9754,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,848, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, @@ -9807,7 +9811,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,851,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,116,0,345, 3,117,0,345,3, 118,0,345,3,119, @@ -9853,20 +9857,20 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -852,11,1,845,0, +852,11,1,867,0, 348,1,-1,3,106, 0,345,3,107,0, 345,3,108,0,345, -853,11,1,845,0, +853,11,1,867,0, 348,1,-1,3,109, -0,854,12,1,1942, +0,854,12,1,1964, 855,5,63,3,109, 0,345,3,110,0, 345,3,111,0,856, -12,1,1972,857,5, +12,1,1994,857,5, 63,3,109,0,345, 3,110,0,858,12, -1,2001,859,5,63, +1,2023,859,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -9912,7 +9916,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,860,12, -1,2048,861,5,63, +1,2070,861,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -9923,7 +9927,7 @@ public class yyLSLTokens : YyLexer { 345,3,118,0,345, 3,119,0,345,3, 120,0,345,3,121, -0,862,12,1,2088, +0,862,12,1,2110, 863,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -10022,14 +10026,14 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,866,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,867,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, @@ -10037,7 +10041,7 @@ public class yyLSLTokens : YyLexer { 345,3,116,0,345, 3,117,0,345,3, 118,0,868,12,1, -2369,869,5,63,3, +2391,869,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -10086,10 +10090,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,103,0, 345,3,104,0,345, 3,105,0,870,12, -1,2420,871,5,63, +1,2442,871,5,63, 3,109,0,345,3, 110,0,872,12,1, -2449,873,5,63,3, +2471,873,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -10136,7 +10140,7 @@ public class yyLSLTokens : YyLexer { 3,100,0,345,3, 101,0,345,3,102, 0,345,3,103,0, -874,12,1,2498,875, +874,12,1,2520,875, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -10178,14 +10182,14 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -876,12,1,2584,877, +876,12,1,2606,877, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,878, -12,1,2618,879,5, +12,1,2640,879,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -10193,7 +10197,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,880,12,1, -2653,881,5,63,3, +2675,881,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -10235,13 +10239,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,345,3,97, -0,882,12,1,2696, +0,882,12,1,2718, 883,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, -0,884,12,1,2729, +0,884,12,1,2751, 885,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -10249,7 +10253,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,886, -12,1,2764,887,5, +12,1,2786,887,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -10354,7 +10358,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,890, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,115,0, 345,3,116,0,345, 3,117,0,345,3, @@ -10401,7 +10405,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -891,11,1,845,0, +891,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -10412,7 +10416,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,892,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -10457,7 +10461,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -893,11,1,845,0, +893,11,1,867,0, 348,1,-1,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -10498,10 +10502,10 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,894,12, -1,3231,895,5,63, +1,3253,895,5,63, 3,109,0,345,3, 110,0,896,12,1, -3260,897,5,63,3, +3282,897,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -10546,7 +10550,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,98,0, 345,3,99,0,345, 3,100,0,898,12, -1,3306,899,5,63, +1,3328,899,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -10612,7 +10616,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,902,11,1,845, +345,902,11,1,867, 0,348,1,-1,3, 111,0,345,3,112, 0,345,3,113,0, @@ -10663,14 +10667,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,903,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,904, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,97,0, 345,3,98,0,345, 3,99,0,345,3, @@ -10681,13 +10685,13 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -905,11,1,845,0, +905,11,1,867,0, 348,1,-1,3,104, 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, 108,0,345,906,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, @@ -10737,11 +10741,11 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -907,11,1,845,0, +907,11,1,867,0, 348,1,-1,3,106, 0,345,3,107,0, 345,3,108,0,345, -908,11,1,845,0, +908,11,1,867,0, 348,1,-1,3,119, 0,345,3,120,0, 345,3,121,0,345, @@ -10785,7 +10789,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -909,11,1,845,0, +909,11,1,867,0, 348,1,-1,3,112, 0,345,3,113,0, 345,3,114,0,345, @@ -10835,20 +10839,20 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,910,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,110,0,911, -12,1,4103,912,5, +12,1,4125,912,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,913,12,1, -4133,914,5,63,3, +4155,914,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -915,12,1,4168,916, +915,12,1,4190,916, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -10890,7 +10894,7 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -917,12,1,4254,918, +917,12,1,4276,918, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -10933,7 +10937,7 @@ public class yyLSLTokens : YyLexer { 89,0,345,3,90, 0,345,3,95,0, 345,3,97,0,919, -12,1,4297,920,5, +12,1,4319,920,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -10941,7 +10945,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,921,12,1, -4332,922,5,63,3, +4354,922,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -10983,16 +10987,16 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,923,12,1, -4418,924,5,63,3, +4440,924,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,925,12,1, -4451,926,5,63,3, +4473,926,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -927,12,1,4481,928, +927,12,1,4503,928, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -11000,7 +11004,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,929,12, -1,4516,930,5,63, +1,4538,930,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -11042,14 +11046,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,89,0, 345,3,90,0,345, 3,95,0,931,12, -1,4602,932,5,63, +1,4624,932,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,933,12,1,4637, +0,933,12,1,4659, 934,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -11092,13 +11096,13 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -935,12,1,4680,936, +935,12,1,4702,936, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, -937,12,1,4713,938, +937,12,1,4735,938, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -11146,7 +11150,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,101,0, 345,3,102,0,345, 3,103,0,939,12, -1,4762,940,5,63, +1,4784,940,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -11192,14 +11196,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,941,12, -1,4809,942,5,63, +1,4831,942,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,943,12,1,4844, +0,943,12,1,4866, 944,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -11306,7 +11310,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,947,11,1,845, +345,947,11,1,867, 0,348,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, @@ -11314,12 +11318,12 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,948,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -949,11,1,845,0, +949,11,1,867,0, 348,1,-1,3,115, 0,345,3,116,0, 345,3,117,0,345, @@ -11366,7 +11370,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,950,11,1,845, +345,950,11,1,867, 0,348,1,-1,3, 98,0,345,3,99, 0,345,3,100,0, @@ -11377,7 +11381,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,951,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -11422,7 +11426,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,952,11,1,845, +345,952,11,1,867, 0,348,1,-1,3, 97,0,345,3,98, 0,345,3,99,0, @@ -11434,7 +11438,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,953,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -11479,7 +11483,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -954,11,1,845,0, +954,11,1,867,0, 348,1,-1,3,112, 0,345,3,113,0, 345,3,114,0,345, @@ -11529,10 +11533,10 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,955,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,115,0,345, 3,116,0,956,12, -1,5653,957,5,63, +1,5675,957,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -11575,13 +11579,13 @@ public class yyLSLTokens : YyLexer { 345,3,90,0,345, 3,95,0,345,3, 97,0,958,12,1, -5696,959,5,63,3, +5718,959,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,960,12,1, -5729,961,5,63,3, +5751,961,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -11628,7 +11632,7 @@ public class yyLSLTokens : YyLexer { 3,100,0,345,3, 101,0,345,3,102, 0,345,3,103,0, -962,12,1,5778,963, +962,12,1,5800,963, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -11674,7 +11678,7 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -964,12,1,5825,965, +964,12,1,5847,965, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -11682,7 +11686,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,966,12, -1,5860,967,5,63, +1,5882,967,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -11787,20 +11791,20 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -970,11,1,845,0, +970,11,1,867,0, 348,1,-1,3,102, 0,345,3,103,0, 345,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,971,11,1,845, +345,971,11,1,867, 0,348,1,-1,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,972, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,115,0, 345,3,116,0,345, 3,117,0,345,3, @@ -11847,7 +11851,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -973,11,1,845,0, +973,11,1,867,0, 348,1,-1,3,98, 0,345,3,99,0, 345,3,100,0,345, @@ -11858,7 +11862,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,974,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -11903,7 +11907,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -975,11,1,845,0, +975,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -11914,7 +11918,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,976,11,1,845, +345,976,11,1,867, 0,348,1,-1,3, 117,0,345,3,118, 0,345,3,119,0, @@ -11960,7 +11964,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,977, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, @@ -11970,7 +11974,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,978,11,1,845, +345,978,11,1,867, 0,348,1,-1,3, 97,0,345,3,98, 0,345,3,99,0, @@ -11982,7 +11986,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,979,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -12017,14 +12021,14 @@ public class yyLSLTokens : YyLexer { 345,3,88,0,345, 3,89,0,345,3, 90,0,345,3,95, -0,980,12,1,6739, +0,980,12,1,6761, 981,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, -982,12,1,6773,983, +982,12,1,6795,983, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -12070,26 +12074,26 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -984,12,1,6820,985, +984,12,1,6842,985, 5,63,3,109,0, 345,3,110,0,986, -12,1,6849,987,5, +12,1,6871,987,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,345, 3,115,0,988,12, -1,6883,989,5,63, +1,6905,989,5,63, 3,109,0,345,3, 110,0,345,3,111, -0,990,12,1,6913, +0,990,12,1,6935, 991,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, -0,992,12,1,6946, +0,992,12,1,6968, 993,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -12195,7 +12199,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,996,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -12244,7 +12248,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,997,11,1,845, +345,997,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -12291,7 +12295,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,998,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, @@ -12341,14 +12345,14 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -999,11,1,845,0, +999,11,1,867,0, 348,1,-1,3,102, 0,345,3,103,0, 345,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1000,11,1,845, +345,1000,11,1,867, 0,348,1,-1,3, 116,0,345,3,117, 0,345,3,118,0, @@ -12395,7 +12399,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1001,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -12406,7 +12410,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1002, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,112,0, 345,3,113,0,345, 3,114,0,345,3, @@ -12456,12 +12460,12 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1003,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,1004,12, -1,7704,1005,5,63, +1,7726,1005,5,63, 3,109,0,345,3, 110,0,1006,12,1, -7733,1007,5,63,3, +7755,1007,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12503,13 +12507,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,1008,12,1, -7819,1009,5,63,3, +7841,1009,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,1010,12,1, -7852,1011,5,63,3, +7874,1011,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12555,7 +12559,7 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,1012,12,1, -7899,1013,5,63,3, +7921,1013,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12567,7 +12571,7 @@ public class yyLSLTokens : YyLexer { 119,0,345,3,120, 0,345,3,121,0, 345,3,122,0,1014, -12,1,7940,1015,5, +12,1,7962,1015,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -12665,14 +12669,14 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1018,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1019, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,115,0, 345,3,116,0,345, 3,117,0,345,3, @@ -12719,7 +12723,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1020,11,1,845,0, +1020,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -12730,7 +12734,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1021,11,1,845, +345,1021,11,1,867, 0,348,1,-1,3, 111,0,345,3,112, 0,345,3,113,0, @@ -12773,7 +12777,7 @@ public class yyLSLTokens : YyLexer { 345,3,95,0,345, 3,97,0,345,3, 98,0,1022,12,1, -8348,1023,5,63,3, +8370,1023,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12823,7 +12827,7 @@ public class yyLSLTokens : YyLexer { 345,3,104,0,345, 3,105,0,345,3, 106,0,1024,12,1, -8400,1025,5,63,3, +8422,1025,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12869,7 +12873,7 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,1026,12,1, -8447,1027,5,63,3, +8469,1027,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12913,7 +12917,7 @@ public class yyLSLTokens : YyLexer { 95,0,345,3,97, 0,345,3,98,0, 345,3,99,0,1028, -12,1,8492,1029,5, +12,1,8514,1029,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -12921,7 +12925,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,1030,12,1, -8527,1031,5,63,3, +8549,1031,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -12963,13 +12967,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,1032,12,1, -8613,1033,5,63,3, +8635,1033,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,1034,12,1, -8646,1035,5,63,3, +8668,1035,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -13015,7 +13019,7 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,1036,12,1, -8693,1037,5,63,3, +8715,1037,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -13027,7 +13031,7 @@ public class yyLSLTokens : YyLexer { 119,0,345,3,120, 0,345,3,121,0, 345,3,122,0,1038, -12,1,8734,1039,5, +12,1,8756,1039,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -13126,7 +13130,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1042,11,1,845, +345,1042,11,1,867, 0,348,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, @@ -13134,7 +13138,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1043,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -13181,7 +13185,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1044,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -13192,7 +13196,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1045, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,117,0, 345,3,118,0,345, 3,119,0,345,3, @@ -13238,7 +13242,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1046,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,100,0,345,3, 101,0,345,3,102, 0,345,3,103,0, @@ -13246,7 +13250,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1047,11,1,845, +345,1047,11,1,867, 0,348,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, @@ -13254,10 +13258,10 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1048,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,107,0,345,3, 108,0,345,1049,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,99,0,345, 3,100,0,345,3, 101,0,345,3,102, @@ -13266,22 +13270,22 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1050,11,1,845, +345,1050,11,1,867, 0,348,1,-1,3, 112,0,343,3,113, 0,343,3,114,0, -1051,12,1,9507,1052, +1051,12,1,9529,1052, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,1053,12, -1,9537,1054,5,63, +1,9559,1054,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,1055,12,1,9572, +0,1055,12,1,9594, 1056,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -13324,7 +13328,7 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -1057,12,1,9615,1058, +1057,12,1,9637,1058, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -13332,7 +13336,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,1059,12, -1,9650,1060,5,63, +1,9672,1060,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -13381,13 +13385,13 @@ public class yyLSLTokens : YyLexer { 102,0,345,3,103, 0,345,3,104,0, 345,3,105,0,1061, -12,1,9701,1062,5, +12,1,9723,1062,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,1063,12,1, -9731,1064,5,63,3, +9753,1064,5,63,3, 109,0,345,3,110, -0,1065,12,1,9760, +0,1065,12,1,9782, 1066,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -13495,7 +13499,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1069,11,1,845,0, +1069,11,1,867,0, 348,1,-1,3,112, 0,345,3,113,0, 345,3,114,0,345, @@ -13545,11 +13549,11 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1070,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,106,0,345, 3,107,0,345,3, 108,0,345,1071,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -13594,7 +13598,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1072,11,1,845, +345,1072,11,1,867, 0,348,1,-1,3, 98,0,345,3,99, 0,345,3,100,0, @@ -13605,7 +13609,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1073,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -13650,16 +13654,16 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1074,11,1,845, +345,1074,11,1,867, 0,348,1,-1,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,345, 3,116,0,345,3, 117,0,1075,12,1, -10383,1076,5,63,3, +10405,1076,5,63,3, 109,0,345,3,110, -0,1077,12,1,10412, +0,1077,12,1,10434, 1078,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -13701,7 +13705,7 @@ public class yyLSLTokens : YyLexer { 345,3,88,0,345, 3,89,0,345,3, 90,0,345,3,95, -0,1079,12,1,10498, +0,1079,12,1,10520, 1080,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -13709,7 +13713,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,1081, -12,1,10533,1082,5, +12,1,10555,1082,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -13758,9 +13762,9 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -1083,12,1,10584,1084, +1083,12,1,10606,1084, 5,63,3,109,0, -1085,12,1,10612,1086, +1085,12,1,10634,1086, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -13806,7 +13810,7 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -1087,12,1,10659,1088, +1087,12,1,10681,1088, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -13848,12 +13852,12 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -1089,12,1,10745,1090, +1089,12,1,10767,1090, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,1091,12,1, -10776,1092,5,63,3, +10798,1092,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -13899,15 +13903,15 @@ public class yyLSLTokens : YyLexer { 345,3,99,0,345, 3,100,0,345,3, 101,0,1093,12,1, -10823,1094,5,63,3, +10845,1094,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,1095,12,1, -10856,1096,5,63,3, +10878,1096,5,63,3, 109,0,1097,12,1, -10884,1098,5,63,3, +10906,1098,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -13956,20 +13960,20 @@ public class yyLSLTokens : YyLexer { 0,345,3,103,0, 345,3,104,0,345, 3,105,0,1099,12, -1,10935,1100,5,63, +1,10957,1100,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,1101,12,1, -10969,1102,5,63,3, +10991,1102,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, -0,1103,12,1,11003, +0,1103,12,1,11025, 1104,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -14019,20 +14023,20 @@ public class yyLSLTokens : YyLexer { 345,3,103,0,345, 3,104,0,345,3, 105,0,1105,12,1, -11054,1106,5,63,3, +11076,1106,5,63,3, 109,0,345,3,110, 0,345,3,111,0, -1107,12,1,11084,1108, +1107,12,1,11106,1108, 5,63,3,109,0, 345,3,110,0,1109, -12,1,11113,1110,5, +12,1,11135,1110,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,345, 3,115,0,1111,12, -1,11147,1112,5,63, +1,11169,1112,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -14141,7 +14145,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1115,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, @@ -14191,7 +14195,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1116,11,1,845,0, +1116,11,1,867,0, 348,1,-1,3,112, 0,345,3,113,0, 345,3,114,0,345, @@ -14241,11 +14245,11 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1117,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,106,0,345, 3,107,0,345,3, 108,0,345,1118,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,116,0,345, 3,117,0,345,3, 118,0,345,3,119, @@ -14291,7 +14295,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1119,11,1,845,0, +1119,11,1,867,0, 348,1,-1,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -14338,11 +14342,11 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1120,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,106,0,345,3, 107,0,345,3,108, 0,345,1121,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, @@ -14393,7 +14397,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1122,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,115,0,345, 3,116,0,345,3, 117,0,345,3,118, @@ -14440,14 +14444,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1123, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1124,11,1,845,0, +1124,11,1,867,0, 348,1,-1,3,113, 0,345,3,114,0, 345,3,115,0,345, @@ -14496,7 +14500,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1125, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,97,0, 345,3,98,0,345, 3,99,0,345,3, @@ -14507,14 +14511,14 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1126,11,1,845,0, +1126,11,1,867,0, 348,1,-1,3,102, 0,345,3,103,0, 345,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1127,11,1,845, +345,1127,11,1,867, 0,348,1,-1,3, 110,0,345,3,111, 0,345,3,112,0, @@ -14566,11 +14570,11 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1128,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,106,0,345,3, 107,0,345,3,108, 0,345,1129,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -14615,7 +14619,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1130,11,1,845,0, +1130,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -14626,7 +14630,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1131,11,1,845, +345,1131,11,1,867, 0,348,1,-1,3, 111,0,345,3,112, 0,345,3,113,0, @@ -14677,7 +14681,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1132,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,118,0,345, 3,119,0,345,3, 120,0,345,3,121, @@ -14716,12 +14720,12 @@ public class yyLSLTokens : YyLexer { 0,345,3,99,0, 345,3,100,0,345, 3,101,0,1133,12, -1,12674,1134,5,63, +1,12696,1134,5,63, 3,109,0,1135,12, -1,12702,1136,5,63, +1,12724,1136,5,63, 3,109,0,345,3, 110,0,345,3,111, -0,1137,12,1,12732, +0,1137,12,1,12754, 1138,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -14729,7 +14733,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,1139, -12,1,12767,1140,5, +12,1,12789,1140,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -14775,7 +14779,7 @@ public class yyLSLTokens : YyLexer { 98,0,345,3,99, 0,345,3,100,0, 345,3,101,0,1141, -12,1,12814,1142,5, +12,1,12836,1142,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -14817,7 +14821,7 @@ public class yyLSLTokens : YyLexer { 88,0,345,3,89, 0,345,3,90,0, 345,3,95,0,1143, -12,1,12900,1144,5, +12,1,12922,1144,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -14862,7 +14866,7 @@ public class yyLSLTokens : YyLexer { 3,97,0,345,3, 98,0,345,3,99, 0,345,3,100,0, -1145,12,1,12946,1146, +1145,12,1,12968,1146, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -14905,7 +14909,7 @@ public class yyLSLTokens : YyLexer { 89,0,345,3,90, 0,345,3,95,0, 345,3,97,0,1147, -12,1,12989,1148,5, +12,1,13011,1148,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -14913,7 +14917,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,1149,12,1, -13024,1150,5,63,3, +13046,1150,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -14955,7 +14959,7 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,345,3,97, -0,1151,12,1,13067, +0,1151,12,1,13089, 1152,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -15025,7 +15029,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1155,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,117,0,345, 3,118,0,345,3, 119,0,345,3,120, @@ -15070,7 +15074,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1156,11,1,845, +345,1156,11,1,867, 0,348,1,-1,3, 98,0,345,3,99, 0,345,3,100,0, @@ -15081,7 +15085,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1157,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,101,0,345, 3,102,0,345,3, 103,0,345,3,104, @@ -15089,7 +15093,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1158,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, @@ -15100,14 +15104,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1159, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1160,11,1,845,0, +1160,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -15153,7 +15157,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1161,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, @@ -15202,14 +15206,14 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1162,11,1,845, +345,1162,11,1,867, 0,348,1,-1,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,345,3, 115,0,345,3,116, -0,1163,12,1,13789, +0,1163,12,1,13811, 1164,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -15218,16 +15222,16 @@ public class yyLSLTokens : YyLexer { 0,345,3,115,0, 345,3,116,0,345, 3,117,0,1165,12, -1,13825,1166,5,63, +1,13847,1166,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, 345,3,113,0,345, 3,114,0,1167,12, -1,13858,1168,5,63, +1,13880,1168,5,63, 3,109,0,345,3, 110,0,1169,12,1, -13887,1170,5,63,3, +13909,1170,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -15332,7 +15336,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1173,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -15379,7 +15383,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1174,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,118,0,345, 3,119,0,345,3, 120,0,345,3,121, @@ -15424,7 +15428,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1175,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,117,0,345,3, 118,0,345,3,119, 0,345,3,120,0, @@ -15469,30 +15473,30 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1176,11,1,845,0, +1176,11,1,867,0, 348,1,-1,3,102, 0,345,3,103,0, 345,3,104,0,345, 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1177,11,1,845, +345,1177,11,1,867, 0,348,1,-1,3, 115,0,1178,12,1, -14428,1179,5,63,3, +14450,1179,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -1180,12,1,14463,1181, +1180,12,1,14485,1181, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, -1182,12,1,14496,1183, +1182,12,1,14518,1183, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -15541,10 +15545,10 @@ public class yyLSLTokens : YyLexer { 345,3,102,0,345, 3,103,0,345,3, 104,0,345,3,105, -0,1184,12,1,14547, +0,1184,12,1,14569, 1185,5,63,3,109, 0,345,3,110,0, -1186,12,1,14576,1187, +1186,12,1,14598,1187, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -15592,7 +15596,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,101,0, 345,3,102,0,345, 3,103,0,1188,12, -1,14625,1189,5,63, +1,14647,1189,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -15654,7 +15658,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1192, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,111,0, 345,3,112,0,345, 3,113,0,345,3, @@ -15704,11 +15708,11 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1193,11,1,845, +345,1193,11,1,867, 0,348,1,-1,3, 106,0,345,3,107, 0,345,3,108,0, -345,1194,11,1,845, +345,1194,11,1,867, 0,348,1,-1,3, 115,0,345,3,116, 0,345,3,117,0, @@ -15747,14 +15751,14 @@ public class yyLSLTokens : YyLexer { 345,3,90,0,345, 3,95,0,345,3, 97,0,1195,12,1, -14986,1196,5,63,3, +15008,1196,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,345,3,115, 0,345,3,116,0, -1197,12,1,15021,1198, +1197,12,1,15043,1198, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -15800,7 +15804,7 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -1199,12,1,15068,1200, +1199,12,1,15090,1200, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -15842,7 +15846,7 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -1201,12,1,15154,1202, +1201,12,1,15176,1202, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -15888,10 +15892,10 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -1203,12,1,15201,1204, +1203,12,1,15223,1204, 5,63,3,109,0, 345,3,110,0,1205, -12,1,15230,1206,5, +12,1,15252,1206,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -15899,13 +15903,13 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,1207,12,1, -15265,1208,5,63,3, +15287,1208,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, 3,113,0,345,3, 114,0,1209,12,1, -15298,1210,5,63,3, +15320,1210,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -15916,7 +15920,7 @@ public class yyLSLTokens : YyLexer { 3,118,0,345,3, 119,0,345,3,120, 0,345,3,121,0, -1211,12,1,15338,1212, +1211,12,1,15360,1212, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -16017,7 +16021,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1215,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,115,0,345, 3,116,0,345,3, 117,0,345,3,118, @@ -16064,7 +16068,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1216, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,117,0, 345,3,118,0,345, 3,119,0,345,3, @@ -16110,7 +16114,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1217,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, @@ -16119,7 +16123,7 @@ public class yyLSLTokens : YyLexer { 117,0,345,3,118, 0,345,3,119,0, 345,3,120,0,1218, -12,1,15720,1219,5, +12,1,15742,1219,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -16168,7 +16172,7 @@ public class yyLSLTokens : YyLexer { 3,102,0,345,3, 103,0,345,3,104, 0,345,3,105,0, -1220,12,1,15771,1221, +1220,12,1,15793,1221, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -16176,7 +16180,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,114,0, 345,3,115,0,345, 3,116,0,1222,12, -1,15806,1223,5,63, +1,15828,1223,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -16280,11 +16284,11 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1226, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,106,0, 345,3,107,0,345, 3,108,0,345,1227, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,121,0, 345,3,122,0,345, 3,48,0,345,3, @@ -16326,7 +16330,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1228,11,1,845, +345,1228,11,1,867, 0,348,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, @@ -16334,7 +16338,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1229,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,97,0,345,3, 98,0,345,3,99, 0,345,3,100,0, @@ -16354,7 +16358,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1232,11,1,845, +345,1232,11,1,867, 0,348,1,-1,3, 117,0,345,3,118, 0,345,3,119,0, @@ -16400,7 +16404,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1233, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,98,0, 345,3,99,0,345, 3,100,0,345,3, @@ -16410,7 +16414,7 @@ public class yyLSLTokens : YyLexer { 3,105,0,345,3, 106,0,345,3,107, 0,345,3,108,0, -345,1234,11,1,845, +345,1234,11,1,867, 0,348,1,-1,3, 117,0,345,3,118, 0,345,3,119,0, @@ -16450,26 +16454,26 @@ public class yyLSLTokens : YyLexer { 3,98,0,345,3, 99,0,345,3,100, 0,345,3,101,0, -1235,12,1,16515,1236, +1235,12,1,16537,1236, 5,63,3,109,0, 345,3,110,0,1237, -12,1,16544,1238,5, +12,1,16566,1238,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,345, 3,115,0,1239,12, -1,16578,1240,5,63, +1,16600,1240,5,63, 3,109,0,345,3, 110,0,345,3,111, -0,1241,12,1,16608, +0,1241,12,1,16630, 1242,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, -0,1243,12,1,16641, +0,1243,12,1,16663, 1244,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -16574,7 +16578,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1247,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, @@ -16623,7 +16627,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1248,11,1,845,0, +1248,11,1,867,0, 348,1,-1,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -16670,7 +16674,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1249,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, @@ -16720,20 +16724,20 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1250, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1251,11,1,845,0, +1251,11,1,867,0, 348,1,-1,3,116, -0,1252,12,1,17189, +0,1252,12,1,17211, 1253,5,63,3,109, 0,345,3,110,0, 345,3,111,0,1254, -12,1,17219,1255,5, +12,1,17241,1255,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -16741,7 +16745,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,345,3,117, -0,1256,12,1,17255, +0,1256,12,1,17277, 1257,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -16786,7 +16790,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,97,0, 345,3,98,0,345, 3,99,0,1258,12, -1,17300,1259,5,63, +1,17322,1259,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -16834,7 +16838,7 @@ public class yyLSLTokens : YyLexer { 3,101,0,345,3, 102,0,345,3,103, 0,345,3,104,0, -1260,12,1,17350,1261, +1260,12,1,17372,1261, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -16876,14 +16880,14 @@ public class yyLSLTokens : YyLexer { 3,88,0,345,3, 89,0,345,3,90, 0,345,3,95,0, -1262,12,1,17436,1263, +1262,12,1,17458,1263, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, 345,3,115,0,1264, -12,1,17470,1265,5, +12,1,17492,1265,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -16891,7 +16895,7 @@ public class yyLSLTokens : YyLexer { 345,3,114,0,345, 3,115,0,345,3, 116,0,1266,12,1, -17505,1267,5,63,3, +17527,1267,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -16933,13 +16937,13 @@ public class yyLSLTokens : YyLexer { 345,3,89,0,345, 3,90,0,345,3, 95,0,345,3,97, -0,1268,12,1,17548, +0,1268,12,1,17570, 1269,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, -0,1270,12,1,17581, +0,1270,12,1,17603, 1271,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -16947,7 +16951,7 @@ public class yyLSLTokens : YyLexer { 113,0,345,3,114, 0,345,3,115,0, 345,3,116,0,1272, -12,1,17616,1273,5, +12,1,17638,1273,5, 63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, @@ -17052,7 +17056,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1276,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,115,0,345,3, 116,0,345,3,117, 0,345,3,118,0, @@ -17099,7 +17103,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1277,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, @@ -17109,7 +17113,7 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1278,11,1,845,0, +1278,11,1,867,0, 348,1,-1,3,117, 0,345,3,118,0, 345,3,119,0,345, @@ -17155,7 +17159,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1279,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,116,0,345, 3,117,0,345,3, 118,0,345,3,119, @@ -17195,10 +17199,10 @@ public class yyLSLTokens : YyLexer { 345,3,98,0,345, 3,99,0,345,3, 100,0,345,3,101, -0,1280,12,1,18083, +0,1280,12,1,18105, 1281,5,63,3,109, 0,345,3,110,0, -1282,12,1,18112,1283, +1282,12,1,18134,1283, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -17243,7 +17247,7 @@ public class yyLSLTokens : YyLexer { 345,3,97,0,345, 3,98,0,345,3, 99,0,345,3,100, -0,1284,12,1,18158, +0,1284,12,1,18180, 1285,5,63,3,109, 0,345,3,110,0, 345,3,111,0,345, @@ -17310,7 +17314,7 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1288,11,1, -845,0,348,1,-1, +867,0,348,1,-1, 3,111,0,345,3, 112,0,345,3,113, 0,345,3,114,0, @@ -17360,14 +17364,14 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1289, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,102,0, 345,3,103,0,345, 3,104,0,345,3, 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1290,11,1,845,0, +1290,11,1,867,0, 348,1,-1,3,97, 0,345,3,98,0, 345,3,99,0,345, @@ -17388,7 +17392,7 @@ public class yyLSLTokens : YyLexer { 0,345,3,106,0, 345,3,107,0,345, 3,108,0,345,1293, -11,1,845,0,348, +11,1,867,0,348, 1,-1,3,100,0, 345,3,101,0,345, 3,102,0,345,3, @@ -17397,7 +17401,7 @@ public class yyLSLTokens : YyLexer { 345,3,106,0,345, 3,107,0,345,3, 108,0,345,1294,11, -1,845,0,348,1, +1,867,0,348,1, -1,3,118,0,345, 3,119,0,345,3, 120,0,345,3,121, @@ -17442,7 +17446,13 @@ public class yyLSLTokens : YyLexer { 3,106,0,345,3, 107,0,345,3,108, 0,345,1295,11,1, -845,0,348,1,-1, +867,0,348,1,-1, +3,112,0,345,3, +113,0,345,3,114, +0,1296,12,1,18804, +1297,5,63,3,109, +0,345,3,110,0, +345,3,111,0,345, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, @@ -17482,16 +17492,60 @@ public class yyLSLTokens : YyLexer { 3,89,0,345,3, 90,0,345,3,95, 0,345,3,97,0, -345,3,98,0,345, -3,99,0,345,3, -100,0,345,3,101, -0,345,3,102,0, -345,3,103,0,345, -3,104,0,345,3, -105,0,1296,12,1, -18800,1297,5,63,3, -109,0,1298,12,1, -18828,1299,5,63,3, +1298,12,1,18847,1299, +5,63,3,109,0, +345,3,110,0,1300, +12,1,18876,1301,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,1302,12, +1,18910,1303,5,63, +3,109,0,345,3, +110,0,345,3,111, +0,345,3,112,0, +345,3,113,0,345, +3,114,0,345,3, +115,0,345,3,116, +0,345,3,117,0, +345,3,118,0,345, +3,119,0,345,3, +120,0,345,3,121, +0,345,3,122,0, +345,3,48,0,345, +3,49,0,345,3, +50,0,345,3,51, +0,345,3,52,0, +345,3,53,0,345, +3,54,0,345,3, +55,0,345,3,56, +0,345,3,57,0, +345,3,65,0,345, +3,66,0,345,3, +67,0,345,3,68, +0,345,3,69,0, +345,3,70,0,345, +3,71,0,345,3, +72,0,345,3,73, +0,345,3,74,0, +345,3,75,0,345, +3,76,0,345,3, +77,0,345,3,78, +0,345,3,79,0, +345,3,80,0,345, +3,81,0,345,3, +82,0,345,3,83, +0,345,3,84,0, +345,3,85,0,345, +3,86,0,345,3, +87,0,345,3,88, +0,345,3,89,0, +345,3,90,0,345, +3,95,0,345,3, +97,0,1304,12,1, +18953,1305,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -17534,16 +17588,16 @@ public class yyLSLTokens : YyLexer { 3,90,0,345,3, 95,0,345,3,97, 0,345,3,98,0, -345,3,99,0,345, -3,100,0,345,3, -101,0,1300,12,1, -18875,1301,5,63,3, -109,0,345,3,110, -0,345,3,111,0, -345,3,112,0,345, -3,113,0,345,3, -114,0,1302,12,1, -18908,1303,5,63,3, +345,3,99,0,1306, +12,1,18998,1307,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,345,3, +116,0,1308,12,1, +19033,1309,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -17591,90 +17645,844 @@ public class yyLSLTokens : YyLexer { 101,0,345,3,102, 0,345,3,103,0, 345,3,104,0,345, -3,105,0,345,3, -106,0,345,3,107, -0,345,3,108,0, -345,1304,11,1,783, -0,1305,4,22,84, -0,73,0,77,0, -69,0,82,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,-1,3,115, -0,345,3,116,0, -345,3,117,0,345, -3,118,0,345,3, -119,0,345,3,120, -0,345,3,121,0, -345,3,122,0,345, -3,48,0,345,3, -49,0,345,3,50, -0,345,3,51,0, -345,3,52,0,345, -3,53,0,345,3, -54,0,345,3,55, -0,345,3,56,0, -345,3,57,0,345, -3,65,0,345,3, -66,0,345,3,67, -0,345,3,68,0, -345,3,69,0,345, -3,70,0,345,3, -71,0,345,3,72, -0,345,3,73,0, -345,3,74,0,345, -3,75,0,345,3, -76,0,345,3,77, -0,345,3,78,0, -345,3,79,0,345, -3,80,0,345,3, -81,0,345,3,82, -0,345,3,83,0, -345,3,84,0,345, -3,85,0,345,3, -86,0,345,3,87, -0,345,3,88,0, -345,3,89,0,345, -3,90,0,345,3, -95,0,345,3,97, -0,345,3,98,0, -345,3,99,0,345, -3,100,0,345,3, -101,0,345,3,102, -0,345,3,103,0, -345,3,104,0,345, -3,105,0,345,3, -106,0,345,3,107, -0,345,3,108,0, -345,1306,11,1,845, -0,348,1,-1,3, -102,0,345,3,103, -0,345,3,104,0, -345,3,105,0,345, -3,106,0,345,3, -107,0,345,3,108, -0,345,1307,11,1, -845,0,348,1,-1, +3,105,0,1310,12, +1,19084,1311,5,63, +3,109,0,345,3, +110,0,345,3,111, +0,1312,12,1,19114, +1313,5,63,3,109, +0,345,3,110,0, +1314,12,1,19143,1315, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +1316,12,1,19229,1317, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +1318,12,1,19262,1319, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +1320,12,1,19309,1321, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,1322, +12,1,19343,1323,5, +63,3,109,0,345, 3,110,0,345,3, 111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,345, 3,115,0,345,3, 116,0,345,3,117, -0,345,3,118,0, -345,3,119,0,345, -3,120,0,345,3, -121,0,345,3,122, -0,345,3,48,0, -345,3,49,0,345, -3,50,0,345,3, -51,0,345,3,52, -0,345,3,53,0, -345,3,54,0,345, -3,55,0,345,3, -56,0,345,3,57, -0,345,3,65,0, -345,3,66,0,345, +0,1324,12,1,19379, +1325,5,63,3,109, +0,345,3,110,0, +345,3,111,0,345, +3,112,0,345,3, +113,0,345,3,114, +0,345,3,115,0, +345,3,116,0,345, +3,117,0,345,3, +118,0,345,3,119, +0,345,3,120,0, +345,3,121,0,345, +3,122,0,345,3, +48,0,345,3,49, +0,345,3,50,0, +345,3,51,0,345, +3,52,0,345,3, +53,0,345,3,54, +0,345,3,55,0, +345,3,56,0,345, +3,57,0,345,3, +65,0,345,3,66, +0,345,3,67,0, +345,3,68,0,345, +3,69,0,345,3, +70,0,345,3,71, +0,345,3,72,0, +345,3,73,0,345, +3,74,0,345,3, +75,0,345,3,76, +0,345,3,77,0, +345,3,78,0,345, +3,79,0,345,3, +80,0,345,3,81, +0,345,3,82,0, +345,3,83,0,345, +3,84,0,345,3, +85,0,345,3,86, +0,345,3,87,0, +345,3,88,0,345, +3,89,0,345,3, +90,0,345,3,95, +0,345,3,97,0, +345,3,98,0,345, +3,99,0,345,3, +100,0,345,3,101, +0,345,3,102,0, +345,3,103,0,345, +3,104,0,345,3, +105,0,345,3,106, +0,345,3,107,0, +345,3,108,0,1326, +12,1,19433,1327,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,345,3, +116,0,1328,12,1, +19468,1329,5,63,3, +109,0,345,3,110, +0,345,3,111,0, +345,3,112,0,345, +3,113,0,345,3, +114,0,345,3,115, +0,345,3,116,0, +345,3,117,0,345, +3,118,0,345,3, +119,0,345,3,120, +0,345,3,121,0, +345,3,122,0,345, +3,48,0,345,3, +49,0,345,3,50, +0,345,3,51,0, +345,3,52,0,345, +3,53,0,345,3, +54,0,345,3,55, +0,345,3,56,0, +345,3,57,0,345, +3,65,0,345,3, +66,0,345,3,67, +0,345,3,68,0, +345,3,69,0,345, +3,70,0,345,3, +71,0,345,3,72, +0,345,3,73,0, +345,3,74,0,345, +3,75,0,345,3, +76,0,345,3,77, +0,345,3,78,0, +345,3,79,0,345, +3,80,0,345,3, +81,0,345,3,82, +0,345,3,83,0, +345,3,84,0,345, +3,85,0,345,3, +86,0,345,3,87, +0,345,3,88,0, +345,3,89,0,345, +3,90,0,345,3, +95,0,345,3,97, +0,345,3,98,0, +345,3,99,0,345, +3,100,0,345,3, +101,0,345,3,102, +0,345,3,103,0, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +345,1330,11,1,845, +0,1331,4,48,84, +0,82,0,65,0, +78,0,83,0,65, +0,67,0,84,0, +73,0,79,0,78, +0,95,0,82,0, +69,0,83,0,85, +0,76,0,84,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,-1,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +345,3,102,0,345, +3,103,0,345,3, +104,0,345,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1332, +11,1,867,0,348, +1,-1,1333,11,1, +867,0,348,1,-1, +3,118,0,345,3, +119,0,345,3,120, +0,345,3,121,0, +345,3,122,0,345, +3,48,0,345,3, +49,0,345,3,50, +0,345,3,51,0, +345,3,52,0,345, +3,53,0,345,3, +54,0,345,3,55, +0,345,3,56,0, +345,3,57,0,345, +3,65,0,345,3, +66,0,345,3,67, +0,345,3,68,0, +345,3,69,0,345, +3,70,0,345,3, +71,0,345,3,72, +0,345,3,73,0, +345,3,74,0,345, +3,75,0,345,3, +76,0,345,3,77, +0,345,3,78,0, +345,3,79,0,345, +3,80,0,345,3, +81,0,345,3,82, +0,345,3,83,0, +345,3,84,0,345, +3,85,0,345,3, +86,0,345,3,87, +0,345,3,88,0, +345,3,89,0,345, +3,90,0,345,3, +95,0,345,3,97, +0,345,3,98,0, +345,3,99,0,345, +3,100,0,345,3, +101,0,345,3,102, +0,345,3,103,0, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +345,1334,11,1,867, +0,348,1,-1,3, +116,0,345,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, +3,67,0,345,3, +68,0,345,3,69, +0,345,3,70,0, +345,3,71,0,345, +3,72,0,345,3, +73,0,345,3,74, +0,345,3,75,0, +345,3,76,0,345, +3,77,0,345,3, +78,0,345,3,79, +0,345,3,80,0, +345,3,81,0,345, +3,82,0,345,3, +83,0,345,3,84, +0,345,3,85,0, +345,3,86,0,345, +3,87,0,345,3, +88,0,345,3,89, +0,345,3,90,0, +345,3,95,0,345, +3,97,0,345,3, +98,0,345,3,99, +0,345,3,100,0, +345,3,101,0,345, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, +3,107,0,345,3, +108,0,345,1335,11, +1,867,0,348,1, +-1,3,102,0,345, +3,103,0,345,3, +104,0,345,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1336, +11,1,867,0,348, +1,-1,3,115,0, +345,3,116,0,345, +3,117,0,345,3, +118,0,345,3,119, +0,345,3,120,0, +345,3,121,0,345, +3,122,0,345,3, +48,0,345,3,49, +0,345,3,50,0, +345,3,51,0,345, +3,52,0,345,3, +53,0,345,3,54, +0,345,3,55,0, +345,3,56,0,345, +3,57,0,345,3, +65,0,345,3,66, +0,345,3,67,0, +345,3,68,0,345, +3,69,0,345,3, +70,0,345,3,71, +0,345,3,72,0, +345,3,73,0,345, +3,74,0,345,3, +75,0,345,3,76, +0,345,3,77,0, +345,3,78,0,345, +3,79,0,345,3, +80,0,345,3,81, +0,345,3,82,0, +345,3,83,0,345, +3,84,0,345,3, +85,0,345,3,86, +0,345,3,87,0, +345,3,88,0,345, +3,89,0,345,3, +90,0,345,3,95, +0,345,3,97,0, +345,3,98,0,345, +3,99,0,345,3, +100,0,345,3,101, +0,345,3,102,0, +345,3,103,0,345, +3,104,0,345,3, +105,0,345,3,106, +0,345,3,107,0, +345,3,108,0,345, +1337,11,1,867,0, +348,1,-1,3,97, +0,345,3,98,0, +345,3,99,0,345, +3,100,0,345,3, +101,0,345,3,102, +0,345,3,103,0, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +345,1338,11,1,867, +0,348,1,-1,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,345,3, +116,0,345,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, +3,67,0,345,3, +68,0,345,3,69, +0,345,3,70,0, +345,3,71,0,345, +3,72,0,345,3, +73,0,345,3,74, +0,345,3,75,0, +345,3,76,0,345, +3,77,0,345,3, +78,0,345,3,79, +0,345,3,80,0, +345,3,81,0,345, +3,82,0,345,3, +83,0,345,3,84, +0,345,3,85,0, +345,3,86,0,345, +3,87,0,345,3, +88,0,345,3,89, +0,345,3,90,0, +345,3,95,0,345, +3,97,0,345,3, +98,0,345,3,99, +0,345,3,100,0, +345,3,101,0,345, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, +3,107,0,345,3, +108,0,345,1339,11, +1,867,0,348,1, +-1,3,112,0,345, +3,113,0,345,3, +114,0,345,3,115, +0,345,3,116,0, +345,3,117,0,345, +3,118,0,345,3, +119,0,345,3,120, +0,345,3,121,0, +345,3,122,0,345, +3,48,0,345,3, +49,0,345,3,50, +0,345,3,51,0, +345,3,52,0,345, +3,53,0,345,3, +54,0,345,3,55, +0,345,3,56,0, +345,3,57,0,345, +3,65,0,345,3, +66,0,345,3,67, +0,345,3,68,0, +345,3,69,0,345, +3,70,0,345,3, +71,0,345,3,72, +0,345,3,73,0, +345,3,74,0,345, +3,75,0,345,3, +76,0,345,3,77, +0,345,3,78,0, +345,3,79,0,345, +3,80,0,345,3, +81,0,345,3,82, +0,345,3,83,0, +345,3,84,0,345, +3,85,0,345,3, +86,0,345,3,87, +0,345,3,88,0, +345,3,89,0,345, +3,90,0,345,3, +95,0,345,3,97, +0,345,3,98,0, +345,3,99,0,345, +3,100,0,345,3, +101,0,345,3,102, +0,345,3,103,0, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +345,1340,11,1,867, +0,348,1,-1,3, +106,0,345,3,107, +0,345,3,108,0, +345,1341,11,1,867, +0,348,1,-1,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +345,3,102,0,345, +3,103,0,345,3, +104,0,345,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1342, +11,1,867,0,348, +1,-1,3,100,0, +345,3,101,0,345, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, +3,107,0,345,3, +108,0,345,1343,11, +1,867,0,348,1, +-1,3,98,0,345, +3,99,0,345,3, +100,0,345,3,101, +0,345,3,102,0, +345,3,103,0,345, +3,104,0,345,3, +105,0,345,3,106, +0,345,3,107,0, +345,3,108,0,345, +1344,11,1,867,0, +348,1,-1,3,116, +0,345,3,117,0, +345,3,118,0,345, +3,119,0,345,3, +120,0,345,3,121, +0,345,3,122,0, +345,3,48,0,345, +3,49,0,345,3, +50,0,345,3,51, +0,345,3,52,0, +345,3,53,0,345, +3,54,0,345,3, +55,0,345,3,56, +0,345,3,57,0, +345,3,65,0,345, +3,66,0,345,3, +67,0,345,3,68, +0,345,3,69,0, +345,3,70,0,345, +3,71,0,345,3, +72,0,345,3,73, +0,345,3,74,0, +345,3,75,0,345, +3,76,0,345,3, +77,0,345,3,78, +0,345,3,79,0, +345,3,80,0,345, +3,81,0,345,3, +82,0,345,3,83, +0,345,3,84,0, +345,3,85,0,345, +3,86,0,345,3, +87,0,345,3,88, +0,345,3,89,0, +345,3,90,0,345, +3,95,0,345,3, +97,0,345,3,98, +0,345,3,99,0, +345,3,100,0,345, +3,101,0,345,3, +102,0,345,3,103, +0,345,3,104,0, +345,3,105,0,345, +3,106,0,345,3, +107,0,345,3,108, +0,345,1345,11,1, +867,0,348,1,-1, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +345,3,102,0,345, +3,103,0,345,3, +104,0,345,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1346, +11,1,867,0,348, +1,-1,3,98,0, +345,3,99,0,345, +3,100,0,345,3, +101,0,345,3,102, +0,345,3,103,0, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +345,1347,11,1,867, +0,348,1,-1,3, +115,0,345,3,116, +0,345,3,117,0, +345,3,118,0,345, +3,119,0,345,3, +120,0,345,3,121, +0,345,3,122,0, +345,3,48,0,345, +3,49,0,345,3, +50,0,345,3,51, +0,345,3,52,0, +345,3,53,0,345, +3,54,0,345,3, +55,0,345,3,56, +0,345,3,57,0, +345,3,65,0,345, +3,66,0,345,3, +67,0,345,3,68, +0,345,3,69,0, +345,3,70,0,345, +3,71,0,345,3, +72,0,345,3,73, +0,345,3,74,0, +345,3,75,0,345, +3,76,0,345,3, +77,0,345,3,78, +0,345,3,79,0, +345,3,80,0,345, +3,81,0,345,3, +82,0,345,3,83, +0,345,3,84,0, +345,3,85,0,345, +3,86,0,345,3, +87,0,345,3,88, +0,345,3,89,0, +345,3,90,0,345, +3,95,0,345,3, +97,0,345,3,98, +0,345,3,99,0, +345,3,100,0,345, +3,101,0,345,3, +102,0,345,3,103, +0,345,3,104,0, +345,3,105,0,1348, +12,1,20862,1349,5, +63,3,109,0,1350, +12,1,20890,1351,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,345,3, +116,0,345,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, +3,67,0,345,3, +68,0,345,3,69, +0,345,3,70,0, +345,3,71,0,345, +3,72,0,345,3, +73,0,345,3,74, +0,345,3,75,0, +345,3,76,0,345, +3,77,0,345,3, +78,0,345,3,79, +0,345,3,80,0, +345,3,81,0,345, +3,82,0,345,3, +83,0,345,3,84, +0,345,3,85,0, +345,3,86,0,345, +3,87,0,345,3, +88,0,345,3,89, +0,345,3,90,0, +345,3,95,0,345, +3,97,0,345,3, +98,0,345,3,99, +0,345,3,100,0, +345,3,101,0,1352, +12,1,20937,1353,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,1354, +12,1,20970,1355,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, +0,345,3,113,0, +345,3,114,0,345, +3,115,0,345,3, +116,0,345,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, 3,67,0,345,3, 68,0,345,3,69, 0,345,3,70,0, @@ -17704,15 +18512,233 @@ public class yyLSLTokens : YyLexer { 0,345,3,105,0, 345,3,106,0,345, 3,107,0,345,3, -108,0,345,1308,11, -1,845,0,348,1, --1,3,106,0,345, +108,0,345,1356,11, +1,783,0,1357,4, +22,84,0,73,0, +77,0,69,0,82, +0,95,0,69,0, +86,0,69,0,78, +0,84,0,1,-1, +3,115,0,345,3, +116,0,345,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, +3,67,0,345,3, +68,0,345,3,69, +0,345,3,70,0, +345,3,71,0,345, +3,72,0,345,3, +73,0,345,3,74, +0,345,3,75,0, +345,3,76,0,345, +3,77,0,345,3, +78,0,345,3,79, +0,345,3,80,0, +345,3,81,0,345, +3,82,0,345,3, +83,0,345,3,84, +0,345,3,85,0, +345,3,86,0,345, +3,87,0,345,3, +88,0,345,3,89, +0,345,3,90,0, +345,3,95,0,345, +3,97,0,345,3, +98,0,345,3,99, +0,345,3,100,0, +345,3,101,0,345, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, 3,107,0,345,3, -108,0,345,1309,11, -1,845,0,348,1, --1,3,117,0,343, -3,118,0,1310,12, -1,19351,1311,5,63, +108,0,345,1358,11, +1,867,0,348,1, +-1,3,102,0,345, +3,103,0,345,3, +104,0,345,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1359, +11,1,867,0,348, +1,-1,3,110,0, +345,3,111,0,345, +3,112,0,345,3, +113,0,345,3,114, +0,345,3,115,0, +345,3,116,0,345, +3,117,0,345,3, +118,0,345,3,119, +0,345,3,120,0, +345,3,121,0,345, +3,122,0,345,3, +48,0,345,3,49, +0,345,3,50,0, +345,3,51,0,345, +3,52,0,345,3, +53,0,345,3,54, +0,345,3,55,0, +345,3,56,0,345, +3,57,0,345,3, +65,0,345,3,66, +0,345,3,67,0, +345,3,68,0,345, +3,69,0,345,3, +70,0,345,3,71, +0,345,3,72,0, +345,3,73,0,345, +3,74,0,345,3, +75,0,345,3,76, +0,345,3,77,0, +345,3,78,0,345, +3,79,0,345,3, +80,0,345,3,81, +0,345,3,82,0, +345,3,83,0,345, +3,84,0,345,3, +85,0,345,3,86, +0,345,3,87,0, +345,3,88,0,345, +3,89,0,345,3, +90,0,345,3,95, +0,345,3,97,0, +345,3,98,0,345, +3,99,0,345,3, +100,0,345,3,101, +0,345,3,102,0, +345,3,103,0,345, +3,104,0,345,3, +105,0,345,3,106, +0,345,3,107,0, +345,3,108,0,345, +1360,11,1,867,0, +348,1,-1,3,106, +0,345,3,107,0, +345,3,108,0,345, +1361,11,1,867,0, +348,1,-1,3,117, +0,343,3,118,0, +1362,12,1,21413,1363, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +1364,12,1,21460,1365, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,1366,12,1, +21505,1367,5,63,3, +109,0,345,3,110, +0,345,3,111,0, +345,3,112,0,345, +3,113,0,345,3, +114,0,345,3,115, +0,345,3,116,0, +1368,12,1,21540,1369, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,1370,12, +1,21570,1371,5,63, +3,109,0,345,3, +110,0,345,3,111, +0,345,3,112,0, +345,3,113,0,345, +3,114,0,1372,12, +1,21603,1373,5,63, 3,109,0,345,3, 110,0,345,3,111, 0,345,3,112,0, @@ -17757,13 +18783,19 @@ public class yyLSLTokens : YyLexer { 97,0,345,3,98, 0,345,3,99,0, 345,3,100,0,345, -3,101,0,1312,12, -1,19398,1313,5,63, -3,109,0,345,3, -110,0,345,3,111, -0,345,3,112,0, -345,3,113,0,345, -3,114,0,345,3, +3,101,0,345,3, +102,0,345,3,103, +0,345,3,104,0, +345,3,105,0,345, +3,106,0,345,3, +107,0,345,3,108, +0,345,1374,11,1, +320,0,1375,4,22, +86,0,69,0,67, +0,84,0,79,0, +82,0,95,0,84, +0,89,0,80,0, +69,0,1,-1,3, 115,0,345,3,116, 0,345,3,117,0, 345,3,118,0,345, @@ -17802,27 +18834,15 @@ public class yyLSLTokens : YyLexer { 3,95,0,345,3, 97,0,345,3,98, 0,345,3,99,0, -1314,12,1,19443,1315, -5,63,3,109,0, -345,3,110,0,345, -3,111,0,345,3, -112,0,345,3,113, -0,345,3,114,0, -345,3,115,0,345, -3,116,0,1316,12, -1,19478,1317,5,63, -3,109,0,345,3, -110,0,345,3,111, -0,1318,12,1,19508, -1319,5,63,3,109, -0,345,3,110,0, -345,3,111,0,345, -3,112,0,345,3, -113,0,345,3,114, -0,1320,12,1,19541, -1321,5,63,3,109, -0,345,3,110,0, -345,3,111,0,345, +345,3,100,0,345, +3,101,0,345,3, +102,0,345,3,103, +0,345,3,104,0, +345,3,105,0,345, +3,106,0,345,3, +107,0,345,3,108, +0,345,1376,11,1, +867,0,348,1,-1, 3,112,0,345,3, 113,0,345,3,114, 0,345,3,115,0, @@ -17871,60 +18891,74 @@ public class yyLSLTokens : YyLexer { 105,0,345,3,106, 0,345,3,107,0, 345,3,108,0,345, -1322,11,1,320,0, -1323,4,22,86,0, -69,0,67,0,84, -0,79,0,82,0, -95,0,84,0,89, -0,80,0,69,0, -1,-1,3,115,0, -345,3,116,0,345, -3,117,0,345,3, -118,0,345,3,119, -0,345,3,120,0, -345,3,121,0,345, -3,122,0,345,3, -48,0,345,3,49, -0,345,3,50,0, -345,3,51,0,345, -3,52,0,345,3, -53,0,345,3,54, -0,345,3,55,0, -345,3,56,0,345, -3,57,0,345,3, -65,0,345,3,66, -0,345,3,67,0, -345,3,68,0,345, -3,69,0,345,3, -70,0,345,3,71, -0,345,3,72,0, -345,3,73,0,345, -3,74,0,345,3, -75,0,345,3,76, -0,345,3,77,0, -345,3,78,0,345, -3,79,0,345,3, -80,0,345,3,81, -0,345,3,82,0, -345,3,83,0,345, -3,84,0,345,3, -85,0,345,3,86, -0,345,3,87,0, -345,3,88,0,345, -3,89,0,345,3, -90,0,345,3,95, -0,345,3,97,0, -345,3,98,0,345, -3,99,0,345,3, -100,0,345,3,101, -0,345,3,102,0, -345,3,103,0,345, -3,104,0,345,3, -105,0,345,3,106, -0,345,3,107,0, -345,3,108,0,345, -1324,11,1,845,0, -348,1,-1,3,112, +1377,11,1,867,0, +348,1,-1,3,117, +0,345,3,118,0, +345,3,119,0,345, +3,120,0,345,3, +121,0,345,3,122, +0,345,3,48,0, +345,3,49,0,345, +3,50,0,345,3, +51,0,345,3,52, +0,345,3,53,0, +345,3,54,0,345, +3,55,0,345,3, +56,0,345,3,57, +0,345,3,65,0, +345,3,66,0,345, +3,67,0,345,3, +68,0,345,3,69, +0,345,3,70,0, +345,3,71,0,345, +3,72,0,345,3, +73,0,345,3,74, +0,345,3,75,0, +345,3,76,0,345, +3,77,0,345,3, +78,0,345,3,79, +0,345,3,80,0, +345,3,81,0,345, +3,82,0,345,3, +83,0,345,3,84, +0,345,3,85,0, +345,3,86,0,345, +3,87,0,345,3, +88,0,345,3,89, +0,345,3,90,0, +345,3,95,0,345, +3,97,0,345,3, +98,0,345,3,99, +0,345,3,100,0, +345,3,101,0,345, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, +3,107,0,345,3, +108,0,345,1378,11, +1,867,0,348,1, +-1,3,100,0,345, +3,101,0,345,3, +102,0,345,3,103, +0,345,3,104,0, +345,3,105,0,345, +3,106,0,345,3, +107,0,345,3,108, +0,345,1379,11,1, +867,0,348,1,-1, +3,102,0,345,3, +103,0,345,3,104, +0,345,3,105,0, +345,3,106,0,345, +3,107,0,345,3, +108,0,345,1380,11, +1,867,0,348,1, +-1,3,119,0,1381, +12,1,22134,1382,5, +63,3,109,0,345, +3,110,0,345,3, +111,0,345,3,112, 0,345,3,113,0, 345,3,114,0,345, 3,115,0,345,3, @@ -17969,75 +19003,57 @@ public class yyLSLTokens : YyLexer { 345,3,101,0,345, 3,102,0,345,3, 103,0,345,3,104, -0,345,3,105,0, -345,3,106,0,345, -3,107,0,345,3, -108,0,345,1325,11, -1,845,0,348,1, --1,3,117,0,345, -3,118,0,345,3, -119,0,345,3,120, -0,345,3,121,0, -345,3,122,0,345, -3,48,0,345,3, -49,0,345,3,50, -0,345,3,51,0, -345,3,52,0,345, -3,53,0,345,3, -54,0,345,3,55, -0,345,3,56,0, -345,3,57,0,345, -3,65,0,345,3, -66,0,345,3,67, -0,345,3,68,0, -345,3,69,0,345, -3,70,0,345,3, -71,0,345,3,72, -0,345,3,73,0, -345,3,74,0,345, -3,75,0,345,3, -76,0,345,3,77, -0,345,3,78,0, -345,3,79,0,345, -3,80,0,345,3, -81,0,345,3,82, -0,345,3,83,0, -345,3,84,0,345, -3,85,0,345,3, -86,0,345,3,87, -0,345,3,88,0, -345,3,89,0,345, -3,90,0,345,3, -95,0,345,3,97, -0,345,3,98,0, -345,3,99,0,345, -3,100,0,345,3, -101,0,345,3,102, -0,345,3,103,0, -345,3,104,0,345, -3,105,0,345,3, -106,0,345,3,107, -0,345,3,108,0, -345,1326,11,1,845, -0,348,1,-1,3, +0,1383,12,1,22184, +1384,5,63,3,109, +0,345,3,110,0, +345,3,111,0,345, +3,112,0,345,3, +113,0,345,3,114, +0,345,3,115,0, +345,3,116,0,345, +3,117,0,345,3, +118,0,345,3,119, +0,345,3,120,0, +345,3,121,0,345, +3,122,0,345,3, +48,0,345,3,49, +0,345,3,50,0, +345,3,51,0,345, +3,52,0,345,3, +53,0,345,3,54, +0,345,3,55,0, +345,3,56,0,345, +3,57,0,345,3, +65,0,345,3,66, +0,345,3,67,0, +345,3,68,0,345, +3,69,0,345,3, +70,0,345,3,71, +0,345,3,72,0, +345,3,73,0,345, +3,74,0,345,3, +75,0,345,3,76, +0,345,3,77,0, +345,3,78,0,345, +3,79,0,345,3, +80,0,345,3,81, +0,345,3,82,0, +345,3,83,0,345, +3,84,0,345,3, +85,0,345,3,86, +0,345,3,87,0, +345,3,88,0,345, +3,89,0,345,3, +90,0,345,3,95, +0,345,3,97,0, +345,3,98,0,345, +3,99,0,345,3, 100,0,345,3,101, 0,345,3,102,0, 345,3,103,0,345, 3,104,0,345,3, -105,0,345,3,106, -0,345,3,107,0, -345,3,108,0,345, -1327,11,1,845,0, -348,1,-1,3,102, -0,345,3,103,0, -345,3,104,0,345, -3,105,0,345,3, -106,0,345,3,107, -0,345,3,108,0, -345,1328,11,1,845, -0,348,1,-1,3, -119,0,1329,12,1, -20072,1330,5,63,3, +105,0,1385,12,1, +22235,1386,5,63,3, 109,0,345,3,110, 0,345,3,111,0, 345,3,112,0,345, @@ -18084,57 +19100,57 @@ public class yyLSLTokens : YyLexer { 3,100,0,345,3, 101,0,345,3,102, 0,345,3,103,0, -345,3,104,0,1331, -12,1,20122,1332,5, -63,3,109,0,345, -3,110,0,345,3, -111,0,345,3,112, -0,345,3,113,0, -345,3,114,0,345, -3,115,0,345,3, -116,0,345,3,117, -0,345,3,118,0, -345,3,119,0,345, -3,120,0,345,3, -121,0,345,3,122, -0,345,3,48,0, -345,3,49,0,345, -3,50,0,345,3, -51,0,345,3,52, -0,345,3,53,0, -345,3,54,0,345, -3,55,0,345,3, -56,0,345,3,57, -0,345,3,65,0, -345,3,66,0,345, -3,67,0,345,3, -68,0,345,3,69, -0,345,3,70,0, -345,3,71,0,345, -3,72,0,345,3, -73,0,345,3,74, -0,345,3,75,0, -345,3,76,0,345, -3,77,0,345,3, -78,0,345,3,79, -0,345,3,80,0, -345,3,81,0,345, -3,82,0,345,3, -83,0,345,3,84, -0,345,3,85,0, -345,3,86,0,345, -3,87,0,345,3, -88,0,345,3,89, -0,345,3,90,0, -345,3,95,0,345, -3,97,0,345,3, -98,0,345,3,99, -0,345,3,100,0, -345,3,101,0,345, -3,102,0,345,3, -103,0,345,3,104, -0,345,3,105,0, -1333,12,1,20173,1334, +345,3,104,0,345, +3,105,0,345,3, +106,0,345,3,107, +0,345,3,108,0, +1387,12,1,22289,1388, +5,63,3,109,0, +345,3,110,0,345, +3,111,0,345,3, +112,0,345,3,113, +0,345,3,114,0, +345,3,115,0,345, +3,116,0,345,3, +117,0,345,3,118, +0,345,3,119,0, +345,3,120,0,345, +3,121,0,345,3, +122,0,345,3,48, +0,345,3,49,0, +345,3,50,0,345, +3,51,0,345,3, +52,0,345,3,53, +0,345,3,54,0, +345,3,55,0,345, +3,56,0,345,3, +57,0,345,3,65, +0,345,3,66,0, +345,3,67,0,345, +3,68,0,345,3, +69,0,345,3,70, +0,345,3,71,0, +345,3,72,0,345, +3,73,0,345,3, +74,0,345,3,75, +0,345,3,76,0, +345,3,77,0,345, +3,78,0,345,3, +79,0,345,3,80, +0,345,3,81,0, +345,3,82,0,345, +3,83,0,345,3, +84,0,345,3,85, +0,345,3,86,0, +345,3,87,0,345, +3,88,0,345,3, +89,0,345,3,90, +0,345,3,95,0, +345,3,97,0,345, +3,98,0,345,3, +99,0,345,3,100, +0,345,3,101,0, +1389,12,1,22336,1390, 5,63,3,109,0, 345,3,110,0,345, 3,111,0,345,3, @@ -18185,413 +19201,316 @@ public class yyLSLTokens : YyLexer { 104,0,345,3,105, 0,345,3,106,0, 345,3,107,0,345, -3,108,0,1335,12, -1,20227,1336,5,63, -3,109,0,345,3, -110,0,345,3,111, -0,345,3,112,0, -345,3,113,0,345, -3,114,0,345,3, -115,0,345,3,116, -0,345,3,117,0, -345,3,118,0,345, -3,119,0,345,3, -120,0,345,3,121, -0,345,3,122,0, -345,3,48,0,345, -3,49,0,345,3, -50,0,345,3,51, -0,345,3,52,0, -345,3,53,0,345, -3,54,0,345,3, -55,0,345,3,56, -0,345,3,57,0, -345,3,65,0,345, -3,66,0,345,3, -67,0,345,3,68, -0,345,3,69,0, -345,3,70,0,345, -3,71,0,345,3, -72,0,345,3,73, -0,345,3,74,0, -345,3,75,0,345, -3,76,0,345,3, -77,0,345,3,78, -0,345,3,79,0, -345,3,80,0,345, -3,81,0,345,3, -82,0,345,3,83, -0,345,3,84,0, -345,3,85,0,345, -3,86,0,345,3, -87,0,345,3,88, -0,345,3,89,0, -345,3,90,0,345, -3,95,0,345,3, -97,0,345,3,98, -0,345,3,99,0, -345,3,100,0,345, -3,101,0,1337,12, -1,20274,1338,5,63, -3,109,0,345,3, -110,0,345,3,111, -0,345,3,112,0, -345,3,113,0,345, -3,114,0,345,3, -115,0,345,3,116, -0,345,3,117,0, -345,3,118,0,345, -3,119,0,345,3, -120,0,345,3,121, -0,345,3,122,0, -345,3,48,0,345, -3,49,0,345,3, -50,0,345,3,51, -0,345,3,52,0, -345,3,53,0,345, -3,54,0,345,3, -55,0,345,3,56, -0,345,3,57,0, -345,3,65,0,345, -3,66,0,345,3, -67,0,345,3,68, -0,345,3,69,0, -345,3,70,0,345, -3,71,0,345,3, -72,0,345,3,73, -0,345,3,74,0, -345,3,75,0,345, -3,76,0,345,3, -77,0,345,3,78, -0,345,3,79,0, -345,3,80,0,345, -3,81,0,345,3, -82,0,345,3,83, -0,345,3,84,0, -345,3,85,0,345, -3,86,0,345,3, -87,0,345,3,88, -0,345,3,89,0, -345,3,90,0,345, -3,95,0,345,3, -97,0,345,3,98, -0,345,3,99,0, -345,3,100,0,345, -3,101,0,345,3, +3,108,0,345,1391, +11,1,229,0,1392, +4,10,87,0,72, +0,73,0,76,0, +69,0,1,-1,3, 102,0,345,3,103, 0,345,3,104,0, 345,3,105,0,345, 3,106,0,345,3, 107,0,345,3,108, -0,345,1339,11,1, -229,0,1340,4,10, -87,0,72,0,73, -0,76,0,69,0, -1,-1,3,102,0, -345,3,103,0,345, -3,104,0,345,3, -105,0,345,3,106, +0,345,1393,11,1, +867,0,348,1,-1, +1394,11,1,867,0, +348,1,-1,3,106, 0,345,3,107,0, 345,3,108,0,345, -1341,11,1,845,0, -348,1,-1,1342,11, -1,845,0,348,1, --1,3,106,0,345, -3,107,0,345,3, -108,0,345,1343,11, -1,845,0,348,1, --1,3,105,0,345, -3,106,0,345,3, -107,0,345,3,108, -0,345,1344,11,1, -845,0,348,1,-1, -3,120,0,343,3, -121,0,343,3,122, -0,343,3,123,0, -1345,12,1,41003,1346, -5,0,1347,11,1, -51,0,1348,4,20, -76,0,69,0,70, -0,84,0,95,0, -66,0,82,0,65, -0,67,0,69,0, -1,-1,3,124,0, -1349,12,1,43906,1350, -5,1,3,124,0, -1351,12,1,44018,1352, -5,0,1353,11,1, -191,0,1354,4,26, -83,0,84,0,82, -0,79,0,75,0, -69,0,95,0,83, -0,84,0,82,0, -79,0,75,0,69, -0,1,-1,1355,11, -1,165,0,1356,4, -12,83,0,84,0, +1395,11,1,867,0, +348,1,-1,3,105, +0,345,3,106,0, +345,3,107,0,345, +3,108,0,345,1396, +11,1,867,0,348, +1,-1,3,120,0, +343,3,121,0,343, +3,122,0,343,3, +123,0,1397,12,1, +43065,1398,5,0,1399, +11,1,51,0,1400, +4,20,76,0,69, +0,70,0,84,0, +95,0,66,0,82, +0,65,0,67,0, +69,0,1,-1,3, +124,0,1401,12,1, +45968,1402,5,1,3, +124,0,1403,12,1, +46080,1404,5,0,1405, +11,1,191,0,1406, +4,26,83,0,84, +0,82,0,79,0, +75,0,69,0,95, +0,83,0,84,0, 82,0,79,0,75, 0,69,0,1,-1, -3,125,0,1357,12, -1,41368,1358,5,0, -1359,11,1,56,0, -1360,4,22,82,0, -73,0,71,0,72, -0,84,0,95,0, -66,0,82,0,65, -0,67,0,69,0, -1,-1,3,126,0, -1361,12,1,44147,1362, -5,0,1363,11,1, -175,0,1364,4,10, -84,0,73,0,76, -0,68,0,69,0, -1,-1,0,165,1, --1,1365,4,12,83, -0,84,0,82,0, -73,0,78,0,71, -0,1366,12,1,45715, -1367,5,119,3,1, -0,1368,12,1,45716, -1369,5,0,1370,11, -1,946,0,165,1, --1,3,9,0,1368, -3,10,0,1371,12, -1,45917,1372,5,0, -1373,11,1,952,0, -165,1,-1,3,13, -0,1368,3,0,3, -1368,3,96,33,1368, -3,32,0,1368,3, -33,0,1368,3,34, -0,1374,12,1,46664, -1375,5,0,1376,11, -1,1010,0,165,1, --1,3,35,0,1368, -3,36,0,1368,3, -37,0,1368,3,38, -0,1368,3,40,0, -1368,3,41,0,1368, -3,42,0,1368,3, -43,0,1368,3,44, -0,1368,3,45,0, -1368,3,46,0,1368, -3,47,0,1368,3, -3,9,1368,3,49, -0,1368,3,50,0, -1368,3,48,0,1368, -3,52,0,1368,3, -53,0,1368,3,51, -0,1368,3,55,0, -1368,3,56,0,1368, -3,54,0,1368,3, -59,0,1368,3,57, -0,1368,3,61,0, -1368,3,62,0,1368, -3,60,0,1368,3, -64,0,1368,3,65, -0,1368,3,66,0, -1368,3,67,0,1368, -3,68,0,1368,3, -69,0,1368,3,70, -0,1368,3,71,0, -1368,3,72,0,1368, -3,73,0,1368,3, -74,0,1368,3,75, -0,1368,3,76,0, -1368,3,77,0,1368, -3,78,0,1368,3, -79,0,1368,3,80, -0,1368,3,81,0, -1368,3,82,0,1368, -3,83,0,1368,3, -84,0,1368,3,85, -0,1368,3,86,0, -1368,3,87,0,1368, -3,88,0,1368,3, -89,0,1368,3,90, -0,1368,3,91,0, -1368,3,92,0,1377, -12,1,46060,1378,5, -4,3,110,0,1379, -12,1,46089,1380,5, -0,1381,11,1,957, +1407,11,1,165,0, +1408,4,12,83,0, +84,0,82,0,79, +0,75,0,69,0, +1,-1,3,125,0, +1409,12,1,43430,1410, +5,0,1411,11,1, +56,0,1412,4,22, +82,0,73,0,71, +0,72,0,84,0, +95,0,66,0,82, +0,65,0,67,0, +69,0,1,-1,3, +126,0,1413,12,1, +46209,1414,5,0,1415, +11,1,175,0,1416, +4,10,84,0,73, +0,76,0,68,0, +69,0,1,-1,0, +165,1,-1,1417,4, +12,83,0,84,0, +82,0,73,0,78, +0,71,0,1418,12, +1,47777,1419,5,119, +3,1,0,1420,12, +1,47778,1421,5,0, +1422,11,1,968,0, +165,1,-1,3,9, +0,1420,3,10,0, +1423,12,1,47979,1424, +5,0,1425,11,1, +974,0,165,1,-1, +3,13,0,1420,3, +0,3,1420,3,0, +6,1420,3,32,0, +1420,3,33,0,1420, +3,34,0,1426,12, +1,48726,1427,5,0, +1428,11,1,1032,0, +165,1,-1,3,35, +0,1420,3,36,0, +1420,3,37,0,1420, +3,38,0,1420,3, +40,0,1420,3,41, +0,1420,3,42,0, +1420,3,43,0,1420, +3,44,0,1420,3, +45,0,1420,3,46, +0,1420,3,47,0, +1420,3,3,9,1420, +3,49,0,1420,3, +50,0,1420,3,48, +0,1420,3,52,0, +1420,3,53,0,1420, +3,51,0,1420,3, +55,0,1420,3,56, +0,1420,3,54,0, +1420,3,59,0,1420, +3,57,0,1420,3, +61,0,1420,3,62, +0,1420,3,60,0, +1420,3,64,0,1420, +3,65,0,1420,3, +66,0,1420,3,67, +0,1420,3,68,0, +1420,3,69,0,1420, +3,70,0,1420,3, +71,0,1420,3,72, +0,1420,3,73,0, +1420,3,74,0,1420, +3,75,0,1420,3, +76,0,1420,3,77, +0,1420,3,78,0, +1420,3,79,0,1420, +3,80,0,1420,3, +81,0,1420,3,82, +0,1420,3,83,0, +1420,3,84,0,1420, +3,85,0,1420,3, +86,0,1420,3,87, +0,1420,3,88,0, +1420,3,89,0,1420, +3,90,0,1420,3, +91,0,1420,3,92, +0,1429,12,1,48122, +1430,5,4,3,110, +0,1431,12,1,48151, +1432,5,0,1433,11, +1,979,0,165,1, +-1,3,34,0,1434, +12,1,48591,1435,5, +0,1436,11,1,1003, 0,165,1,-1,3, -34,0,1382,12,1, -46529,1383,5,0,1384, -11,1,981,0,165, -1,-1,3,92,0, -1385,12,1,46405,1386, -5,0,1387,11,1, -993,0,165,1,-1, -3,116,0,1388,12, -1,46215,1389,5,0, -1390,11,1,969,0, -165,1,-1,1391,11, -1,1005,0,165,1, --1,3,93,0,1368, -3,94,0,1368,3, -95,0,1368,3,96, -0,1368,3,97,0, -1368,3,98,0,1368, -3,99,0,1368,3, -100,0,1368,3,101, -0,1368,3,102,0, -1368,3,103,0,1368, -3,104,0,1368,3, -105,0,1368,3,106, -0,1368,3,107,0, -1368,3,108,0,1368, -3,109,0,1368,3, -110,0,1368,3,111, -0,1368,3,112,0, -1368,3,113,0,1368, -3,114,0,1368,3, -115,0,1368,3,116, -0,1368,3,117,0, -1368,3,118,0,1368, -3,119,0,1368,3, -120,0,1368,3,121, -0,1368,3,122,0, -1368,3,123,0,1368, -3,124,0,1368,3, -125,0,1368,3,96, -6,1368,3,126,0, -1368,3,58,15,1368, -3,59,15,1368,3, -136,4,1368,3,160, -0,1368,3,15,7, -1368,3,170,0,1368, -3,171,0,1368,3, -172,0,1368,3,173, -0,1368,3,178,0, -1368,3,176,2,1368, -3,187,0,1368,3, -187,1,1368,3,192, -0,1368,3,41,32, -1368,3,197,1,1368, -3,0,224,1368,3, -40,32,1368,3,63, -32,1368,0,165,1, --1,1392,5,93,251, -1393,10,251,1,19, -573,1394,10,573,1, -47,301,1395,10,301, -1,93,1172,1396,10, -1172,1,50,1041,1397, -10,1041,1,80,1191, -1398,10,1191,1,53, -188,1399,10,188,1, -37,602,1400,10,602, -1,43,700,1401,10, -700,1,51,613,1402, -10,613,1,46,211, -1403,10,211,1,16, -215,1404,10,215,1, -17,672,1405,10,672, -1,68,901,1406,10, -901,1,75,361,1407, -10,361,1,35,223, -1408,10,223,1,20, -229,1409,10,229,1, -6,199,1410,10,199, -1,22,286,1411,10, -286,1,21,265,1412, -10,265,1,95,1292, -1413,10,1292,1,88, -481,1414,10,481,1, -64,720,1415,10,720, -1,49,357,1416,10, -357,1,28,318,1417, -10,318,1,25,709, -1418,10,709,1,42, -792,1419,10,792,1, -69,1231,1420,10,1231, -1,48,336,1421,10, -336,1,41,850,1422, -10,850,1,57,654, -1423,10,654,1,91, -233,1424,10,233,1, -4,342,1425,10,342, -1,23,493,1426,10, -493,1,63,1246,1427, -10,1246,1,84,324, -1428,10,324,1,29, -245,1429,10,245,1, -5,316,1430,10,316, -1,31,624,1431,10, -624,1,52,889,1432, -10,889,1,76,1114, -1433,10,1114,1,83, -1017,1434,10,1017,1, -81,995,1435,10,995, -1,77,186,1436,10, -186,1,30,249,1437, -10,249,1,7,847, -1438,10,847,1,73, -197,1439,10,197,1, -10,353,1440,10,353, -1,27,294,1441,10, -294,1,94,239,1442, -10,239,1,14,269, -1443,10,269,1,24, -731,1444,10,731,1, -54,281,1445,10,281, -1,9,1225,1446,10, -1225,1,86,498,1447, -10,498,1,62,1448, -4,30,83,0,84, -0,82,0,73,0, -78,0,71,0,95, -0,67,0,79,0, -78,0,83,0,84, -0,65,0,78,0, -84,0,1449,10,1448, -1,3,1340,1450,10, -1340,1,45,348,1451, -10,348,1,92,551, -1452,10,551,1,66, -1068,1453,10,1068,1, -56,402,1454,10,402, -1,58,1348,1455,10, -1348,1,12,531,1456, -10,531,1,44,312, -1457,10,312,1,40, -1154,1458,10,1154,1, -82,591,1459,10,591, -1,67,946,1460,10, -946,1,78,1364,1461, -10,1364,1,36,1356, -1462,10,1356,1,34, -787,1463,10,787,1, -70,1305,1464,10,1305, -1,87,865,1465,10, -865,1,74,338,1466, -10,338,1,26,425, -1467,10,425,1,59, -207,1468,10,207,1, -33,306,1469,10,306, -1,11,205,1470,10, -205,1,38,519,1471, -10,519,1,61,828, -1472,10,828,1,72, -1287,1473,10,1287,1, -90,326,1474,10,326, -1,15,969,1475,10, -969,1,79,1354,1476, -10,1354,1,39,332, -1477,10,332,1,32, -1275,1478,10,1275,1, -89,375,1479,10,375, -1,60,1323,1480,10, -1323,1,55,1360,1481, -10,1360,1,13,1214, -1482,10,1214,1,85, -235,1483,10,235,1, -18,221,1484,10,221, -1,8,775,1485,10, -775,1,71,449,1486, -10,449,1,65,1487, -5,0,0}; +92,0,1437,12,1, +48467,1438,5,0,1439, +11,1,1015,0,165, +1,-1,3,116,0, +1440,12,1,48277,1441, +5,0,1442,11,1, +991,0,165,1,-1, +1443,11,1,1027,0, +165,1,-1,3,93, +0,1420,3,94,0, +1420,3,95,0,1420, +3,96,0,1420,3, +238,22,1420,3,98, +0,1420,3,99,0, +1420,3,100,0,1420, +3,101,0,1420,3, +97,0,1420,3,103, +0,1420,3,104,0, +1420,3,105,0,1420, +3,106,0,1420,3, +102,0,1420,3,108, +0,1420,3,109,0, +1420,3,110,0,1420, +3,111,0,1420,3, +112,0,1420,3,113, +0,1420,3,114,0, +1420,3,115,0,1420, +3,116,0,1420,3, +117,0,1420,3,118, +0,1420,3,119,0, +1420,3,120,0,1420, +3,121,0,1420,3, +122,0,1420,3,123, +0,1420,3,124,0, +1420,3,125,0,1420, +3,96,6,1420,3, +107,0,1420,3,126, +0,1420,3,58,15, +1420,3,59,15,1420, +3,136,4,1420,3, +160,0,1420,3,170, +0,1420,3,171,0, +1420,3,172,0,1420, +3,173,0,1420,3, +178,0,1420,3,176, +2,1420,3,187,0, +1420,3,187,1,1420, +3,192,0,1420,3, +41,32,1420,3,197, +1,1420,3,0,224, +1420,3,40,32,1420, +3,63,32,1420,0, +165,1,-1,1444,5, +94,251,1445,10,251, +1,19,573,1446,10, +573,1,47,301,1447, +10,301,1,94,1172, +1448,10,1172,1,50, +1041,1449,10,1041,1, +80,1191,1450,10,1191, +1,53,188,1451,10, +188,1,37,602,1452, +10,602,1,43,700, +1453,10,700,1,51, +613,1454,10,613,1, +46,1331,1455,10,1331, +1,92,211,1456,10, +211,1,16,215,1457, +10,215,1,17,672, +1458,10,672,1,68, +901,1459,10,901,1, +75,361,1460,10,361, +1,35,223,1461,10, +223,1,20,229,1462, +10,229,1,6,199, +1463,10,199,1,22, +286,1464,10,286,1, +21,265,1465,10,265, +1,96,1292,1466,10, +1292,1,88,481,1467, +10,481,1,64,720, +1468,10,720,1,49, +357,1469,10,357,1, +28,318,1470,10,318, +1,25,709,1471,10, +709,1,42,792,1472, +10,792,1,69,1231, +1473,10,1231,1,48, +336,1474,10,336,1, +41,850,1475,10,850, +1,57,654,1476,10, +654,1,91,233,1477, +10,233,1,4,342, +1478,10,342,1,23, +493,1479,10,493,1, +63,1246,1480,10,1246, +1,84,324,1481,10, +324,1,29,245,1482, +10,245,1,5,316, +1483,10,316,1,31, +624,1484,10,624,1, +52,889,1485,10,889, +1,76,1114,1486,10, +1114,1,83,1017,1487, +10,1017,1,81,995, +1488,10,995,1,77, +186,1489,10,186,1, +30,249,1490,10,249, +1,7,847,1491,10, +847,1,73,197,1492, +10,197,1,10,353, +1493,10,353,1,27, +294,1494,10,294,1, +95,239,1495,10,239, +1,14,269,1496,10, +269,1,24,731,1497, +10,731,1,54,281, +1498,10,281,1,9, +1225,1499,10,1225,1, +86,498,1500,10,498, +1,62,1501,4,30, +83,0,84,0,82, +0,73,0,78,0, +71,0,95,0,67, +0,79,0,78,0, +83,0,84,0,65, +0,78,0,84,0, +1502,10,1501,1,3, +1392,1503,10,1392,1, +45,348,1504,10,348, +1,93,551,1505,10, +551,1,66,1068,1506, +10,1068,1,56,402, +1507,10,402,1,58, +1400,1508,10,1400,1, +12,531,1509,10,531, +1,44,312,1510,10, +312,1,40,1154,1511, +10,1154,1,82,591, +1512,10,591,1,67, +946,1513,10,946,1, +78,1416,1514,10,1416, +1,36,1408,1515,10, +1408,1,34,787,1516, +10,787,1,70,1357, +1517,10,1357,1,87, +865,1518,10,865,1, +74,338,1519,10,338, +1,26,425,1520,10, +425,1,59,207,1521, +10,207,1,33,306, +1522,10,306,1,11, +205,1523,10,205,1, +38,519,1524,10,519, +1,61,828,1525,10, +828,1,72,1287,1526, +10,1287,1,90,326, +1527,10,326,1,15, +969,1528,10,969,1, +79,1406,1529,10,1406, +1,39,332,1530,10, +332,1,32,1275,1531, +10,1275,1,89,375, +1532,10,375,1,60, +1375,1533,10,1375,1, +55,1412,1534,10,1412, +1,13,1214,1535,10, +1214,1,85,235,1536, +10,235,1,18,221, +1537,10,221,1,8, +775,1538,10,775,1, +71,449,1539,10,449, +1,65,1540,5,0,0}; new Tfactory(this,"MINUS",new TCreator(MINUS_factory)); new Tfactory(this,"DEFAULT_STATE",new TCreator(DEFAULT_STATE_factory)); new Tfactory(this,"INTEGER_CONSTANT",new TCreator(INTEGER_CONSTANT_factory)); @@ -18602,6 +19521,7 @@ public class yyLSLTokens : YyLexer { new Tfactory(this,"ELSE",new TCreator(ELSE_factory)); new Tfactory(this,"INTEGER_TYPE",new TCreator(INTEGER_TYPE_factory)); new Tfactory(this,"FOR",new TCreator(FOR_factory)); + new Tfactory(this,"TRANSACTION_RESULT_EVENT",new TCreator(TRANSACTION_RESULT_EVENT_factory)); new Tfactory(this,"LEFT_PAREN",new TCreator(LEFT_PAREN_factory)); new Tfactory(this,"RIGHT_PAREN",new TCreator(RIGHT_PAREN_factory)); new Tfactory(this,"HTTP_RESPONSE_EVENT",new TCreator(HTTP_RESPONSE_EVENT_factory)); @@ -18696,6 +19616,7 @@ public static object EXCLAMATION_factory(Lexer yyl) { return new EXCLAMATION(yyl public static object ELSE_factory(Lexer yyl) { return new ELSE(yyl);} public static object INTEGER_TYPE_factory(Lexer yyl) { return new INTEGER_TYPE(yyl);} public static object FOR_factory(Lexer yyl) { return new FOR(yyl);} +public static object TRANSACTION_RESULT_EVENT_factory(Lexer yyl) { return new TRANSACTION_RESULT_EVENT(yyl);} public static object LEFT_PAREN_factory(Lexer yyl) { return new LEFT_PAREN(yyl);} public static object RIGHT_PAREN_factory(Lexer yyl) { return new RIGHT_PAREN(yyl);} public static object HTTP_RESPONSE_EVENT_factory(Lexer yyl) { return new HTTP_RESPONSE_EVENT(yyl);} @@ -18782,35 +19703,35 @@ public static object CONTROL_EVENT_factory(Lexer yyl) { return new CONTROL_EVENT public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool reject) { switch(action) { case -1: break; - case 946: { ((LSLTokens)yym).str += yytext; } + case 1015: { ((LSLTokens)yym).str += "\\\\"; } break; - case 1010: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } + case 991: { ((LSLTokens)yym).str += " "; } break; - case 1015: { yym.yy_begin("COMMENT"); } + case 963: { yym.yy_begin("STRING"); ((LSLTokens)yym).str = "";} break; - case 1027: { yym.yy_begin("YYINITIAL"); } + case 1037: { yym.yy_begin("COMMENT"); } break; - case 1041: ; + case 1049: { yym.yy_begin("YYINITIAL"); } break; - case 1045: ; + case 1027: { ((LSLTokens)yym).str += '\\'; } break; - case 1054: ; + case 1063: ; break; - case 1005: { ((LSLTokens)yym).str += '\\'; } + case 1076: ; break; - case 1050: ; + case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } break; - case 941: { yym.yy_begin("STRING"); ((LSLTokens)yym).str = "";} + case 1067: ; break; - case 957: { ((LSLTokens)yym).str += "\\n"; } + case 1072: ; break; - case 969: { ((LSLTokens)yym).str += " "; } + case 1003: { ((LSLTokens)yym).str += "\\\""; } break; - case 981: { ((LSLTokens)yym).str += "\\\""; } + case 974: { ((LSLTokens)yym).str += "\\n"; } break; - case 952: { ((LSLTokens)yym).str += "\\n"; } + case 979: { ((LSLTokens)yym).str += "\\n"; } break; - case 993: { ((LSLTokens)yym).str += "\\\\"; } + case 968: { ((LSLTokens)yym).str += yytext; } break; } return null; diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs index ca56cd6..5fef83c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs @@ -1,6 +1,6 @@ using System;using Tools; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { -//%+LSLProgramRoot+96 +//%+LSLProgramRoot+97 public class LSLProgramRoot : SYMBOL{ public LSLProgramRoot (Parser yyp, States s ):base(((LSLSyntax )yyp)){ while (0< s . kids . Count ) kids . Add ( s . kids . Pop ()); @@ -11,9 +11,9 @@ public class LSLProgramRoot : SYMBOL{ } public override string yyname { get { return "LSLProgramRoot"; }} -public override int yynum { get { return 96; }} +public override int yynum { get { return 97; }} public LSLProgramRoot(Parser yyp):base(yyp){}} -//%+GlobalDefinitions+97 +//%+GlobalDefinitions+98 public class GlobalDefinitions : SYMBOL{ public GlobalDefinitions (Parser yyp, GlobalVariableDeclaration gvd ):base(((LSLSyntax )yyp)){ kids . Add ( gvd ); @@ -31,9 +31,9 @@ public class GlobalDefinitions : SYMBOL{ } public override string yyname { get { return "GlobalDefinitions"; }} -public override int yynum { get { return 97; }} +public override int yynum { get { return 98; }} public GlobalDefinitions(Parser yyp):base(yyp){}} -//%+GlobalVariableDeclaration+98 +//%+GlobalVariableDeclaration+99 public class GlobalVariableDeclaration : SYMBOL{ public GlobalVariableDeclaration (Parser yyp, Declaration d ):base(((LSLSyntax )yyp)){ kids . Add ( d ); @@ -43,9 +43,9 @@ public class GlobalVariableDeclaration : SYMBOL{ } public override string yyname { get { return "GlobalVariableDeclaration"; }} -public override int yynum { get { return 98; }} +public override int yynum { get { return 99; }} public GlobalVariableDeclaration(Parser yyp):base(yyp){}} -//%+GlobalFunctionDefinition+99 +//%+GlobalFunctionDefinition+100 public class GlobalFunctionDefinition : SYMBOL{ private string m_returnType ; private string m_name ; @@ -65,9 +65,9 @@ public class GlobalFunctionDefinition : SYMBOL{ } public override string yyname { get { return "GlobalFunctionDefinition"; }} -public override int yynum { get { return 99; }} +public override int yynum { get { return 100; }} public GlobalFunctionDefinition(Parser yyp):base(yyp){}} -//%+States+100 +//%+States+101 public class States : SYMBOL{ public States (Parser yyp, State ds ):base(((LSLSyntax )yyp)){ kids . Add ( ds ); @@ -78,9 +78,9 @@ public class States : SYMBOL{ } public override string yyname { get { return "States"; }} -public override int yynum { get { return 100; }} +public override int yynum { get { return 101; }} public States(Parser yyp):base(yyp){}} -//%+State+101 +//%+State+102 public class State : SYMBOL{ private string m_name ; public State (Parser yyp, string name , StateBody sb ):base(((LSLSyntax @@ -94,9 +94,9 @@ public class State : SYMBOL{ } public override string yyname { get { return "State"; }} -public override int yynum { get { return 101; }} +public override int yynum { get { return 102; }} public State(Parser yyp):base(yyp){}} -//%+StateBody+102 +//%+StateBody+103 public class StateBody : SYMBOL{ public StateBody (Parser yyp, StateBody sb , StateEvent se ):base(((LSLSyntax )yyp)){ while (0< sb . kids . Count ) kids . Add ( sb . kids . Pop ()); @@ -107,18 +107,18 @@ public class StateBody : SYMBOL{ } public override string yyname { get { return "StateBody"; }} -public override int yynum { get { return 102; }} +public override int yynum { get { return 103; }} public StateBody(Parser yyp):base(yyp){}} -//%+StateEvent+103 +//%+StateEvent+104 public class StateEvent : SYMBOL{ private string m_name ; public StateEvent (Parser yyp, string name , CompoundStatement cs ):base(((LSLSyntax )yyp)){ m_name = name ; kids . Add ( cs ); } - public StateEvent (Parser yyp, string name , ArgumentDeclarationList dal , CompoundStatement cs ):base(((LSLSyntax + public StateEvent (Parser yyp, string name , ArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax )yyp)){ m_name = name ; - if (0< dal . kids . Count ) kids . Add ( dal ); + if (0< adl . kids . Count ) kids . Add ( adl ); kids . Add ( cs ); } public override string ToString (){ return "EVENT<"+ m_name +">"; @@ -128,22 +128,135 @@ public class StateEvent : SYMBOL{ } public override string yyname { get { return "StateEvent"; }} -public override int yynum { get { return 103; }} +public override int yynum { get { return 104; }} public StateEvent(Parser yyp):base(yyp){}} -//%+ArgumentDeclarationList+104 +//%+VoidArgStateEvent+105 +public class VoidArgStateEvent : StateEvent{ + public VoidArgStateEvent (Parser yyp, string name , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , cs ){} + +public override string yyname { get { return "VoidArgStateEvent"; }} +public override int yynum { get { return 105; }} +public VoidArgStateEvent(Parser yyp):base(yyp){}} +//%+KeyArgStateEvent+106 +public class KeyArgStateEvent : StateEvent{ + public KeyArgStateEvent (Parser yyp, string name , KeyArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "KeyArgStateEvent"; }} +public override int yynum { get { return 106; }} +public KeyArgStateEvent(Parser yyp):base(yyp){}} +//%+IntArgStateEvent+107 +public class IntArgStateEvent : StateEvent{ + public IntArgStateEvent (Parser yyp, string name , IntArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "IntArgStateEvent"; }} +public override int yynum { get { return 107; }} +public IntArgStateEvent(Parser yyp):base(yyp){}} +//%+VectorArgStateEvent+108 +public class VectorArgStateEvent : StateEvent{ + public VectorArgStateEvent (Parser yyp, string name , VectorArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "VectorArgStateEvent"; }} +public override int yynum { get { return 108; }} +public VectorArgStateEvent(Parser yyp):base(yyp){}} +//%+IntRotRotArgStateEvent+109 +public class IntRotRotArgStateEvent : StateEvent{ + public IntRotRotArgStateEvent (Parser yyp, string name , IntRotRotArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "IntRotRotArgStateEvent"; }} +public override int yynum { get { return 109; }} +public IntRotRotArgStateEvent(Parser yyp):base(yyp){}} +//%+IntVecVecArgStateEvent+110 +public class IntVecVecArgStateEvent : StateEvent{ + public IntVecVecArgStateEvent (Parser yyp, string name , IntVecVecArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "IntVecVecArgStateEvent"; }} +public override int yynum { get { return 110; }} +public IntVecVecArgStateEvent(Parser yyp):base(yyp){}} +//%+KeyIntIntArgStateEvent+111 +public class KeyIntIntArgStateEvent : StateEvent{ + public KeyIntIntArgStateEvent (Parser yyp, string name , KeyIntIntArgumentDeclarationList adl , CompoundStatement cs ):base(((LSLSyntax +)yyp), name , adl , cs ){} + +public override string yyname { get { return "KeyIntIntArgStateEvent"; }} +public override int yynum { get { return 111; }} +public KeyIntIntArgStateEvent(Parser yyp):base(yyp){}} +//%+ArgumentDeclarationList+112 public class ArgumentDeclarationList : SYMBOL{ public ArgumentDeclarationList (Parser yyp, Declaration d ):base(((LSLSyntax )yyp)){ kids . Add ( d ); } + public ArgumentDeclarationList (Parser yyp, Declaration d , Declaration d2 ):base(((LSLSyntax +)yyp)){ kids . Add ( d ); + kids . Add ( d2 ); +} + public ArgumentDeclarationList (Parser yyp, Declaration d , Declaration d2 , Declaration d3 ):base(((LSLSyntax +)yyp)){ kids . Add ( d ); + kids . Add ( d2 ); + kids . Add ( d3 ); +} public ArgumentDeclarationList (Parser yyp, ArgumentDeclarationList adl , Declaration d ):base(((LSLSyntax )yyp)){ while (0< adl . kids . Count ) kids . Add ( adl . kids . Pop ()); kids . Add ( d ); } public override string yyname { get { return "ArgumentDeclarationList"; }} -public override int yynum { get { return 104; }} +public override int yynum { get { return 112; }} public ArgumentDeclarationList(Parser yyp):base(yyp){}} -//%+Declaration+105 +//%+KeyArgumentDeclarationList+113 +public class KeyArgumentDeclarationList : ArgumentDeclarationList{ + public KeyArgumentDeclarationList (Parser yyp, KeyDeclaration d ):base(((LSLSyntax +)yyp), d ){} + +public override string yyname { get { return "KeyArgumentDeclarationList"; }} +public override int yynum { get { return 113; }} +public KeyArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+IntArgumentDeclarationList+114 +public class IntArgumentDeclarationList : ArgumentDeclarationList{ + public IntArgumentDeclarationList (Parser yyp, IntDeclaration d ):base(((LSLSyntax +)yyp), d ){} + +public override string yyname { get { return "IntArgumentDeclarationList"; }} +public override int yynum { get { return 114; }} +public IntArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+VectorArgumentDeclarationList+115 +public class VectorArgumentDeclarationList : ArgumentDeclarationList{ + public VectorArgumentDeclarationList (Parser yyp, VecDeclaration d ):base(((LSLSyntax +)yyp), d ){} + +public override string yyname { get { return "VectorArgumentDeclarationList"; }} +public override int yynum { get { return 115; }} +public VectorArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+IntRotRotArgumentDeclarationList+116 +public class IntRotRotArgumentDeclarationList : ArgumentDeclarationList{ + public IntRotRotArgumentDeclarationList (Parser yyp, Declaration d1 , Declaration d2 , Declaration d3 ):base(((LSLSyntax +)yyp), d1 , d2 , d3 ){} + +public override string yyname { get { return "IntRotRotArgumentDeclarationList"; }} +public override int yynum { get { return 116; }} +public IntRotRotArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+IntVecVecArgumentDeclarationList+117 +public class IntVecVecArgumentDeclarationList : ArgumentDeclarationList{ + public IntVecVecArgumentDeclarationList (Parser yyp, Declaration d1 , Declaration d2 , Declaration d3 ):base(((LSLSyntax +)yyp), d1 , d2 , d3 ){} + +public override string yyname { get { return "IntVecVecArgumentDeclarationList"; }} +public override int yynum { get { return 117; }} +public IntVecVecArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+KeyIntIntArgumentDeclarationList+118 +public class KeyIntIntArgumentDeclarationList : ArgumentDeclarationList{ + public KeyIntIntArgumentDeclarationList (Parser yyp, Declaration d1 , Declaration d2 , Declaration d3 ):base(((LSLSyntax +)yyp), d1 , d2 , d3 ){} + +public override string yyname { get { return "KeyIntIntArgumentDeclarationList"; }} +public override int yynum { get { return 118; }} +public KeyIntIntArgumentDeclarationList(Parser yyp):base(yyp){}} +//%+Declaration+119 public class Declaration : SYMBOL{ private string m_datatype ; private string m_id ; @@ -163,9 +276,41 @@ public class Declaration : SYMBOL{ } public override string yyname { get { return "Declaration"; }} -public override int yynum { get { return 105; }} +public override int yynum { get { return 119; }} public Declaration(Parser yyp):base(yyp){}} -//%+Typename+106 +//%+KeyDeclaration+120 +public class KeyDeclaration : Declaration{ + public KeyDeclaration (Parser yyp, string type , string id ):base(((LSLSyntax +)yyp), type , id ){} + +public override string yyname { get { return "KeyDeclaration"; }} +public override int yynum { get { return 120; }} +public KeyDeclaration(Parser yyp):base(yyp){}} +//%+IntDeclaration+121 +public class IntDeclaration : Declaration{ + public IntDeclaration (Parser yyp, string type , string id ):base(((LSLSyntax +)yyp), type , id ){} + +public override string yyname { get { return "IntDeclaration"; }} +public override int yynum { get { return 121; }} +public IntDeclaration(Parser yyp):base(yyp){}} +//%+VecDeclaration+122 +public class VecDeclaration : Declaration{ + public VecDeclaration (Parser yyp, string type , string id ):base(((LSLSyntax +)yyp), type , id ){} + +public override string yyname { get { return "VecDeclaration"; }} +public override int yynum { get { return 122; }} +public VecDeclaration(Parser yyp):base(yyp){}} +//%+RotDeclaration+123 +public class RotDeclaration : Declaration{ + public RotDeclaration (Parser yyp, string type , string id ):base(((LSLSyntax +)yyp), type , id ){} + +public override string yyname { get { return "RotDeclaration"; }} +public override int yynum { get { return 123; }} +public RotDeclaration(Parser yyp):base(yyp){}} +//%+Typename+124 public class Typename : SYMBOL{ public string yytext ; public Typename (Parser yyp, string text ):base(((LSLSyntax @@ -173,9 +318,9 @@ public class Typename : SYMBOL{ } public override string yyname { get { return "Typename"; }} -public override int yynum { get { return 106; }} +public override int yynum { get { return 124; }} public Typename(Parser yyp):base(yyp){}} -//%+Event+107 +//%+Event+125 public class Event : SYMBOL{ public string yytext ; public Event (Parser yyp, string text ):base(((LSLSyntax @@ -183,9 +328,65 @@ public class Event : SYMBOL{ } public override string yyname { get { return "Event"; }} -public override int yynum { get { return 107; }} +public override int yynum { get { return 125; }} public Event(Parser yyp):base(yyp){}} -//%+CompoundStatement+108 +//%+VoidArgEvent+126 +public class VoidArgEvent : Event{ + public VoidArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "VoidArgEvent"; }} +public override int yynum { get { return 126; }} +public VoidArgEvent(Parser yyp):base(yyp){}} +//%+KeyArgEvent+127 +public class KeyArgEvent : Event{ + public KeyArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "KeyArgEvent"; }} +public override int yynum { get { return 127; }} +public KeyArgEvent(Parser yyp):base(yyp){}} +//%+IntArgEvent+128 +public class IntArgEvent : Event{ + public IntArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "IntArgEvent"; }} +public override int yynum { get { return 128; }} +public IntArgEvent(Parser yyp):base(yyp){}} +//%+VectorArgEvent+129 +public class VectorArgEvent : Event{ + public VectorArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "VectorArgEvent"; }} +public override int yynum { get { return 129; }} +public VectorArgEvent(Parser yyp):base(yyp){}} +//%+IntRotRotArgEvent+130 +public class IntRotRotArgEvent : Event{ + public IntRotRotArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "IntRotRotArgEvent"; }} +public override int yynum { get { return 130; }} +public IntRotRotArgEvent(Parser yyp):base(yyp){}} +//%+IntVecVecArgEvent+131 +public class IntVecVecArgEvent : Event{ + public IntVecVecArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "IntVecVecArgEvent"; }} +public override int yynum { get { return 131; }} +public IntVecVecArgEvent(Parser yyp):base(yyp){}} +//%+KeyIntIntArgEvent+132 +public class KeyIntIntArgEvent : Event{ + public KeyIntIntArgEvent (Parser yyp, string text ):base(((LSLSyntax +)yyp), text ){} + +public override string yyname { get { return "KeyIntIntArgEvent"; }} +public override int yynum { get { return 132; }} +public KeyIntIntArgEvent(Parser yyp):base(yyp){}} +//%+CompoundStatement+133 public class CompoundStatement : SYMBOL{ public CompoundStatement (Parser yyp):base(((LSLSyntax )yyp)){} @@ -194,9 +395,9 @@ public class CompoundStatement : SYMBOL{ } public override string yyname { get { return "CompoundStatement"; }} -public override int yynum { get { return 108; }} +public override int yynum { get { return 133; }} } -//%+StatementList+109 +//%+StatementList+134 public class StatementList : SYMBOL{ private void AddStatement ( Statement s ){ if ( s . kids . Top is IfStatement || s . kids . Top is WhileStatement || s . kids . Top is DoWhileStatement || s . kids . Top is ForLoop ) kids . Add ( s . kids . Pop ()); else kids . Add ( s ); @@ -210,9 +411,9 @@ public class StatementList : SYMBOL{ } public override string yyname { get { return "StatementList"; }} -public override int yynum { get { return 109; }} +public override int yynum { get { return 134; }} public StatementList(Parser yyp):base(yyp){}} -//%+Statement+110 +//%+Statement+135 public class Statement : SYMBOL{ public Statement (Parser yyp, Declaration d ):base(((LSLSyntax )yyp)){ kids . Add ( d ); @@ -258,9 +459,9 @@ public class Statement : SYMBOL{ } public override string yyname { get { return "Statement"; }} -public override int yynum { get { return 110; }} +public override int yynum { get { return 135; }} public Statement(Parser yyp):base(yyp){}} -//%+EmptyStatement+111 +//%+EmptyStatement+136 public class EmptyStatement : SYMBOL{ public EmptyStatement (Parser yyp):base(((LSLSyntax )yyp)){} @@ -268,9 +469,9 @@ public class EmptyStatement : SYMBOL{ } public override string yyname { get { return "EmptyStatement"; }} -public override int yynum { get { return 111; }} +public override int yynum { get { return 136; }} } -//%+Assignment+112 +//%+Assignment+137 public class Assignment : SYMBOL{ protected string m_assignmentType ; public Assignment (Parser yyp, SYMBOL lhs , SYMBOL rhs , string assignmentType ):base(((LSLSyntax @@ -290,9 +491,9 @@ public class Assignment : SYMBOL{ } public override string yyname { get { return "Assignment"; }} -public override int yynum { get { return 112; }} +public override int yynum { get { return 137; }} public Assignment(Parser yyp):base(yyp){}} -//%+SimpleAssignment+113 +//%+SimpleAssignment+138 public class SimpleAssignment : Assignment{ public SimpleAssignment (Parser yyp, SYMBOL lhs , SYMBOL rhs , string assignmentType ):base(((LSLSyntax )yyp)){ m_assignmentType = assignmentType ; @@ -302,9 +503,9 @@ public class SimpleAssignment : Assignment{ } public override string yyname { get { return "SimpleAssignment"; }} -public override int yynum { get { return 113; }} +public override int yynum { get { return 138; }} public SimpleAssignment(Parser yyp):base(yyp){}} -//%+ReturnStatement+114 +//%+ReturnStatement+139 public class ReturnStatement : SYMBOL{ public ReturnStatement (Parser yyp):base(((LSLSyntax )yyp)){} @@ -314,9 +515,9 @@ public class ReturnStatement : SYMBOL{ } public override string yyname { get { return "ReturnStatement"; }} -public override int yynum { get { return 114; }} +public override int yynum { get { return 139; }} } -//%+JumpLabel+115 +//%+JumpLabel+140 public class JumpLabel : SYMBOL{ private string m_labelName ; public JumpLabel (Parser yyp, string labelName ):base(((LSLSyntax @@ -329,9 +530,9 @@ public class JumpLabel : SYMBOL{ } public override string yyname { get { return "JumpLabel"; }} -public override int yynum { get { return 115; }} +public override int yynum { get { return 140; }} public JumpLabel(Parser yyp):base(yyp){}} -//%+JumpStatement+116 +//%+JumpStatement+141 public class JumpStatement : SYMBOL{ private string m_targetName ; public JumpStatement (Parser yyp, string targetName ):base(((LSLSyntax @@ -344,9 +545,9 @@ public class JumpStatement : SYMBOL{ } public override string yyname { get { return "JumpStatement"; }} -public override int yynum { get { return 116; }} +public override int yynum { get { return 141; }} public JumpStatement(Parser yyp):base(yyp){}} -//%+StateChange+117 +//%+StateChange+142 public class StateChange : SYMBOL{ private string m_newState ; public StateChange (Parser yyp, string newState ):base(((LSLSyntax @@ -357,9 +558,9 @@ public class StateChange : SYMBOL{ } public override string yyname { get { return "StateChange"; }} -public override int yynum { get { return 117; }} +public override int yynum { get { return 142; }} public StateChange(Parser yyp):base(yyp){}} -//%+IfStatement+118 +//%+IfStatement+143 public class IfStatement : SYMBOL{ private void AddStatement ( Statement s ){ if (0< s . kids . Count && s . kids . Top is CompoundStatement ) kids . Add ( s . kids . Pop ()); else kids . Add ( s ); @@ -376,9 +577,9 @@ public class IfStatement : SYMBOL{ } public override string yyname { get { return "IfStatement"; }} -public override int yynum { get { return 118; }} +public override int yynum { get { return 143; }} public IfStatement(Parser yyp):base(yyp){}} -//%+WhileStatement+119 +//%+WhileStatement+144 public class WhileStatement : SYMBOL{ public WhileStatement (Parser yyp, SYMBOL s , Statement st ):base(((LSLSyntax )yyp)){ kids . Add ( s ); @@ -387,9 +588,9 @@ public class WhileStatement : SYMBOL{ } public override string yyname { get { return "WhileStatement"; }} -public override int yynum { get { return 119; }} +public override int yynum { get { return 144; }} public WhileStatement(Parser yyp):base(yyp){}} -//%+DoWhileStatement+120 +//%+DoWhileStatement+145 public class DoWhileStatement : SYMBOL{ public DoWhileStatement (Parser yyp, SYMBOL s , Statement st ):base(((LSLSyntax )yyp)){ if (0< st . kids . Count && st . kids . Top is CompoundStatement ) kids . Add ( st . kids . Pop ()); @@ -398,9 +599,9 @@ public class DoWhileStatement : SYMBOL{ } public override string yyname { get { return "DoWhileStatement"; }} -public override int yynum { get { return 120; }} +public override int yynum { get { return 145; }} public DoWhileStatement(Parser yyp):base(yyp){}} -//%+ForLoop+121 +//%+ForLoop+146 public class ForLoop : SYMBOL{ public ForLoop (Parser yyp, ForLoopStatement flsa , Expression e , ForLoopStatement flsb , Statement s ):base(((LSLSyntax )yyp)){ kids . Add ( flsa ); @@ -411,9 +612,9 @@ public class ForLoop : SYMBOL{ } public override string yyname { get { return "ForLoop"; }} -public override int yynum { get { return 121; }} +public override int yynum { get { return 146; }} public ForLoop(Parser yyp):base(yyp){}} -//%+ForLoopStatement+122 +//%+ForLoopStatement+147 public class ForLoopStatement : SYMBOL{ public ForLoopStatement (Parser yyp, Expression e ):base(((LSLSyntax )yyp)){ kids . Add ( e ); @@ -431,9 +632,9 @@ public class ForLoopStatement : SYMBOL{ } public override string yyname { get { return "ForLoopStatement"; }} -public override int yynum { get { return 122; }} +public override int yynum { get { return 147; }} public ForLoopStatement(Parser yyp):base(yyp){}} -//%+FunctionCall+123 +//%+FunctionCall+148 public class FunctionCall : SYMBOL{ private string m_id ; public FunctionCall (Parser yyp, string id , ArgumentList al ):base(((LSLSyntax @@ -447,9 +648,9 @@ public class FunctionCall : SYMBOL{ } public override string yyname { get { return "FunctionCall"; }} -public override int yynum { get { return 123; }} +public override int yynum { get { return 148; }} public FunctionCall(Parser yyp):base(yyp){}} -//%+ArgumentList+124 +//%+ArgumentList+149 public class ArgumentList : SYMBOL{ public ArgumentList (Parser yyp, Argument a ):base(((LSLSyntax )yyp)){ AddArgument ( a ); @@ -463,14 +664,14 @@ public class ArgumentList : SYMBOL{ } public override string yyname { get { return "ArgumentList"; }} -public override int yynum { get { return 124; }} +public override int yynum { get { return 149; }} public ArgumentList(Parser yyp):base(yyp){}} -//%+Argument+125 +//%+Argument+150 public class Argument : SYMBOL{ public override string yyname { get { return "Argument"; }} -public override int yynum { get { return 125; }} +public override int yynum { get { return 150; }} public Argument(Parser yyp):base(yyp){}} -//%+ExpressionArgument+126 +//%+ExpressionArgument+151 public class ExpressionArgument : Argument{ public ExpressionArgument (Parser yyp, Expression e ):base(((LSLSyntax )yyp)){ if ( e is ConstantExpression ) while (0< e . kids . Count ) kids . Add ( e . kids . Pop ()); @@ -478,9 +679,9 @@ public class ExpressionArgument : Argument{ } public override string yyname { get { return "ExpressionArgument"; }} -public override int yynum { get { return 126; }} +public override int yynum { get { return 151; }} public ExpressionArgument(Parser yyp):base(yyp){}} -//%+Constant+127 +//%+Constant+152 public class Constant : SYMBOL{ private string m_type ; private string m_val ; @@ -502,9 +703,9 @@ public class Constant : SYMBOL{ } public override string yyname { get { return "Constant"; }} -public override int yynum { get { return 127; }} +public override int yynum { get { return 152; }} public Constant(Parser yyp):base(yyp){}} -//%+VectorConstant+128 +//%+VectorConstant+153 public class VectorConstant : Constant{ public VectorConstant (Parser yyp, Expression valX , Expression valY , Expression valZ ):base(((LSLSyntax )yyp),"vector", null ){ kids . Add ( valX ); @@ -513,9 +714,9 @@ public class VectorConstant : Constant{ } public override string yyname { get { return "VectorConstant"; }} -public override int yynum { get { return 128; }} +public override int yynum { get { return 153; }} public VectorConstant(Parser yyp):base(yyp){}} -//%+RotationConstant+129 +//%+RotationConstant+154 public class RotationConstant : Constant{ public RotationConstant (Parser yyp, Expression valX , Expression valY , Expression valZ , Expression valS ):base(((LSLSyntax )yyp),"rotation", null ){ kids . Add ( valX ); @@ -525,36 +726,36 @@ public class RotationConstant : Constant{ } public override string yyname { get { return "RotationConstant"; }} -public override int yynum { get { return 129; }} +public override int yynum { get { return 154; }} public RotationConstant(Parser yyp):base(yyp){}} -//%+ListConstant+130 +//%+ListConstant+155 public class ListConstant : Constant{ public ListConstant (Parser yyp, ArgumentList al ):base(((LSLSyntax )yyp),"list", null ){ kids . Add ( al ); } public override string yyname { get { return "ListConstant"; }} -public override int yynum { get { return 130; }} +public override int yynum { get { return 155; }} public ListConstant(Parser yyp):base(yyp){}} -//%+Expression+131 +//%+Expression+156 public class Expression : SYMBOL{ protected void AddExpression ( Expression e ){ if ( e is ConstantExpression ) while (0< e . kids . Count ) kids . Add ( e . kids . Pop ()); else kids . Add ( e ); } public override string yyname { get { return "Expression"; }} -public override int yynum { get { return 131; }} +public override int yynum { get { return 156; }} public Expression(Parser yyp):base(yyp){}} -//%+ConstantExpression+132 +//%+ConstantExpression+157 public class ConstantExpression : Expression{ public ConstantExpression (Parser yyp, Constant c ):base(((LSLSyntax )yyp)){ kids . Add ( c ); } public override string yyname { get { return "ConstantExpression"; }} -public override int yynum { get { return 132; }} +public override int yynum { get { return 157; }} public ConstantExpression(Parser yyp):base(yyp){}} -//%+IdentExpression+133 +//%+IdentExpression+158 public class IdentExpression : Expression{ protected string m_name ; public IdentExpression (Parser yyp, string name ):base(((LSLSyntax @@ -567,9 +768,9 @@ public class IdentExpression : Expression{ } public override string yyname { get { return "IdentExpression"; }} -public override int yynum { get { return 133; }} +public override int yynum { get { return 158; }} public IdentExpression(Parser yyp):base(yyp){}} -//%+IdentDotExpression+134 +//%+IdentDotExpression+159 public class IdentDotExpression : IdentExpression{ private string m_member ; public IdentDotExpression (Parser yyp, string name , string member ):base(((LSLSyntax @@ -583,18 +784,18 @@ public class IdentDotExpression : IdentExpression{ } public override string yyname { get { return "IdentDotExpression"; }} -public override int yynum { get { return 134; }} +public override int yynum { get { return 159; }} public IdentDotExpression(Parser yyp):base(yyp){}} -//%+FunctionCallExpression+135 +//%+FunctionCallExpression+160 public class FunctionCallExpression : Expression{ public FunctionCallExpression (Parser yyp, FunctionCall fc ):base(((LSLSyntax )yyp)){ kids . Add ( fc ); } public override string yyname { get { return "FunctionCallExpression"; }} -public override int yynum { get { return 135; }} +public override int yynum { get { return 160; }} public FunctionCallExpression(Parser yyp):base(yyp){}} -//%+BinaryExpression+136 +//%+BinaryExpression+161 public class BinaryExpression : Expression{ private string m_expressionSymbol ; public BinaryExpression (Parser yyp, Expression lhs , Expression rhs , string expressionSymbol ):base(((LSLSyntax @@ -609,9 +810,9 @@ public class BinaryExpression : Expression{ } public override string yyname { get { return "BinaryExpression"; }} -public override int yynum { get { return 136; }} +public override int yynum { get { return 161; }} public BinaryExpression(Parser yyp):base(yyp){}} -//%+UnaryExpression+137 +//%+UnaryExpression+162 public class UnaryExpression : Expression{ private string m_unarySymbol ; public UnaryExpression (Parser yyp, string unarySymbol , Expression e ):base(((LSLSyntax @@ -625,9 +826,9 @@ public class UnaryExpression : Expression{ } public override string yyname { get { return "UnaryExpression"; }} -public override int yynum { get { return 137; }} +public override int yynum { get { return 162; }} public UnaryExpression(Parser yyp):base(yyp){}} -//%+TypecastExpression+138 +//%+TypecastExpression+163 public class TypecastExpression : Expression{ private string m_typecastType ; public TypecastExpression (Parser yyp, string typecastType , SYMBOL rhs ):base(((LSLSyntax @@ -641,18 +842,18 @@ public class TypecastExpression : Expression{ } public override string yyname { get { return "TypecastExpression"; }} -public override int yynum { get { return 138; }} +public override int yynum { get { return 163; }} public TypecastExpression(Parser yyp):base(yyp){}} -//%+ParenthesisExpression+139 +//%+ParenthesisExpression+164 public class ParenthesisExpression : Expression{ public ParenthesisExpression (Parser yyp, SYMBOL s ):base(((LSLSyntax )yyp)){ kids . Add ( s ); } public override string yyname { get { return "ParenthesisExpression"; }} -public override int yynum { get { return 139; }} +public override int yynum { get { return 164; }} public ParenthesisExpression(Parser yyp):base(yyp){}} -//%+IncrementDecrementExpression+140 +//%+IncrementDecrementExpression+165 public class IncrementDecrementExpression : Expression{ private string m_name ; private string m_operation ; @@ -680,7 +881,7 @@ public class IncrementDecrementExpression : Expression{ } public override string yyname { get { return "IncrementDecrementExpression"; }} -public override int yynum { get { return 140; }} +public override int yynum { get { return 165; }} public IncrementDecrementExpression(Parser yyp):base(yyp){}} public class LSLProgramRoot_1 : LSLProgramRoot { @@ -792,6 +993,90 @@ public class StateBody_2 : StateBody { ((StateEvent)(yyq.StackAt(0).m_value)) ){}} +public class StateBody_3 : StateBody { + public StateBody_3(Parser yyq):base(yyq, + ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_4 : StateBody { + public StateBody_4(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_5 : StateBody { + public StateBody_5(Parser yyq):base(yyq, + ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_6 : StateBody { + public StateBody_6(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_7 : StateBody { + public StateBody_7(Parser yyq):base(yyq, + ((IntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_8 : StateBody { + public StateBody_8(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_9 : StateBody { + public StateBody_9(Parser yyq):base(yyq, + ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_10 : StateBody { + public StateBody_10(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_11 : StateBody { + public StateBody_11(Parser yyq):base(yyq, + ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_12 : StateBody { + public StateBody_12(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_13 : StateBody { + public StateBody_13(Parser yyq):base(yyq, + ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_14 : StateBody { + public StateBody_14(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_15 : StateBody { + public StateBody_15(Parser yyq):base(yyq, + ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + +public class StateBody_16 : StateBody { + public StateBody_16(Parser yyq):base(yyq, + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} + public class StateEvent_1 : StateEvent { public StateEvent_1(Parser yyq):base(yyq, ((Event)(yyq.StackAt(4).m_value)) @@ -801,6 +1086,67 @@ public class StateEvent_1 : StateEvent { ((CompoundStatement)(yyq.StackAt(0).m_value)) ){}} +public class VoidArgStateEvent_1 : VoidArgStateEvent { + public VoidArgStateEvent_1(Parser yyq):base(yyq, + ((VoidArgEvent)(yyq.StackAt(3).m_value)) + .yytext, + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class KeyArgStateEvent_1 : KeyArgStateEvent { + public KeyArgStateEvent_1(Parser yyq):base(yyq, + ((KeyArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class IntArgStateEvent_1 : IntArgStateEvent { + public IntArgStateEvent_1(Parser yyq):base(yyq, + ((IntArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class VectorArgStateEvent_1 : VectorArgStateEvent { + public VectorArgStateEvent_1(Parser yyq):base(yyq, + ((VectorArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent { + public IntRotRotArgStateEvent_1(Parser yyq):base(yyq, + ((IntRotRotArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent { + public IntVecVecArgStateEvent_1(Parser yyq):base(yyq, + ((IntVecVecArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + +public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent { + public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq, + ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} + public class ArgumentDeclarationList_1 : ArgumentDeclarationList { public ArgumentDeclarationList_1(Parser yyq):base(yyq, ((Declaration)(yyq.StackAt(0).m_value)) @@ -813,6 +1159,48 @@ public class ArgumentDeclarationList_2 : ArgumentDeclarationList { ((Declaration)(yyq.StackAt(0).m_value)) ){}} +public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList { + public KeyArgumentDeclarationList_1(Parser yyq):base(yyq, + ((KeyDeclaration)(yyq.StackAt(0).m_value)) + ){}} + +public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList { + public IntArgumentDeclarationList_1(Parser yyq):base(yyq, + ((IntDeclaration)(yyq.StackAt(0).m_value)) + ){}} + +public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList { + public VectorArgumentDeclarationList_1(Parser yyq):base(yyq, + ((VecDeclaration)(yyq.StackAt(0).m_value)) + ){}} + +public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList { + public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq, + ((IntDeclaration)(yyq.StackAt(4).m_value)) + , + ((RotDeclaration)(yyq.StackAt(2).m_value)) + , + ((RotDeclaration)(yyq.StackAt(0).m_value)) + ){}} + +public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList { + public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq, + ((IntDeclaration)(yyq.StackAt(4).m_value)) + , + ((VecDeclaration)(yyq.StackAt(2).m_value)) + , + ((VecDeclaration)(yyq.StackAt(0).m_value)) + ){}} + +public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList { + public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq, + ((KeyDeclaration)(yyq.StackAt(4).m_value)) + , + ((IntDeclaration)(yyq.StackAt(2).m_value)) + , + ((IntDeclaration)(yyq.StackAt(0).m_value)) + ){}} + public class Declaration_1 : Declaration { public Declaration_1(Parser yyq):base(yyq, ((Typename)(yyq.StackAt(1).m_value)) @@ -820,6 +1208,34 @@ public class Declaration_1 : Declaration { ((IDENT)(yyq.StackAt(0).m_value)) .yytext){}} +public class KeyDeclaration_1 : KeyDeclaration { + public KeyDeclaration_1(Parser yyq):base(yyq, + ((KEY_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} + +public class IntDeclaration_1 : IntDeclaration { + public IntDeclaration_1(Parser yyq):base(yyq, + ((INTEGER_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} + +public class VecDeclaration_1 : VecDeclaration { + public VecDeclaration_1(Parser yyq):base(yyq, + ((VECTOR_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} + +public class RotDeclaration_1 : RotDeclaration { + public RotDeclaration_1(Parser yyq):base(yyq, + ((ROTATION_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} + public class CompoundStatement_1 : CompoundStatement { public CompoundStatement_1(Parser yyq):base(yyq){}} @@ -1780,172 +2196,177 @@ public class Typename_7 : Typename { public class Event_1 : Event { public Event_1(Parser yyq):base(yyq, - ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_2 : Event { public Event_2(Parser yyq):base(yyq, - ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_3 : Event { public Event_3(Parser yyq):base(yyq, - ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) + ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_4 : Event { public Event_4(Parser yyq):base(yyq, - ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) + ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_5 : Event { public Event_5(Parser yyq):base(yyq, - ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) + ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_6 : Event { public Event_6(Parser yyq):base(yyq, - ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) + ((MONEY_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_7 : Event { public Event_7(Parser yyq):base(yyq, - ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) + ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_8 : Event { public Event_8(Parser yyq):base(yyq, - ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) + ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class Event_9 : Event { public Event_9(Parser yyq):base(yyq, - ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) + ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_10 : Event { - public Event_10(Parser yyq):base(yyq, - ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_1 : VoidArgEvent { + public VoidArgEvent_1(Parser yyq):base(yyq, + ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_11 : Event { - public Event_11(Parser yyq):base(yyq, - ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_2 : VoidArgEvent { + public VoidArgEvent_2(Parser yyq):base(yyq, + ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_12 : Event { - public Event_12(Parser yyq):base(yyq, - ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_3 : VoidArgEvent { + public VoidArgEvent_3(Parser yyq):base(yyq, + ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_13 : Event { - public Event_13(Parser yyq):base(yyq, - ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_4 : VoidArgEvent { + public VoidArgEvent_4(Parser yyq):base(yyq, + ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_14 : Event { - public Event_14(Parser yyq):base(yyq, - ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_5 : VoidArgEvent { + public VoidArgEvent_5(Parser yyq):base(yyq, + ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_15 : Event { - public Event_15(Parser yyq):base(yyq, - ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_6 : VoidArgEvent { + public VoidArgEvent_6(Parser yyq):base(yyq, + ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_16 : Event { - public Event_16(Parser yyq):base(yyq, - ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_7 : VoidArgEvent { + public VoidArgEvent_7(Parser yyq):base(yyq, + ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_17 : Event { - public Event_17(Parser yyq):base(yyq, - ((MONEY_EVENT)(yyq.StackAt(0).m_value)) +public class VoidArgEvent_8 : VoidArgEvent { + public VoidArgEvent_8(Parser yyq):base(yyq, + ((TIMER_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_18 : Event { - public Event_18(Parser yyq):base(yyq, - ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) +public class KeyArgEvent_1 : KeyArgEvent { + public KeyArgEvent_1(Parser yyq):base(yyq, + ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_19 : Event { - public Event_19(Parser yyq):base(yyq, - ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) +public class KeyArgEvent_2 : KeyArgEvent { + public KeyArgEvent_2(Parser yyq):base(yyq, + ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_20 : Event { - public Event_20(Parser yyq):base(yyq, - ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_1 : IntArgEvent { + public IntArgEvent_1(Parser yyq):base(yyq, + ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_21 : Event { - public Event_21(Parser yyq):base(yyq, - ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_2 : IntArgEvent { + public IntArgEvent_2(Parser yyq):base(yyq, + ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_22 : Event { - public Event_22(Parser yyq):base(yyq, - ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_3 : IntArgEvent { + public IntArgEvent_3(Parser yyq):base(yyq, + ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_23 : Event { - public Event_23(Parser yyq):base(yyq, - ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_4 : IntArgEvent { + public IntArgEvent_4(Parser yyq):base(yyq, + ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_24 : Event { - public Event_24(Parser yyq):base(yyq, +public class IntArgEvent_5 : IntArgEvent { + public IntArgEvent_5(Parser yyq):base(yyq, ((ON_REZ_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_25 : Event { - public Event_25(Parser yyq):base(yyq, - ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} - -public class Event_26 : Event { - public Event_26(Parser yyq):base(yyq, +public class IntArgEvent_6 : IntArgEvent { + public IntArgEvent_6(Parser yyq):base(yyq, ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_27 : Event { - public Event_27(Parser yyq):base(yyq, +public class IntArgEvent_7 : IntArgEvent { + public IntArgEvent_7(Parser yyq):base(yyq, ((SENSOR_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_28 : Event { - public Event_28(Parser yyq):base(yyq, - ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_8 : IntArgEvent { + public IntArgEvent_8(Parser yyq):base(yyq, + ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_29 : Event { - public Event_29(Parser yyq):base(yyq, - ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_9 : IntArgEvent { + public IntArgEvent_9(Parser yyq):base(yyq, + ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_30 : Event { - public Event_30(Parser yyq):base(yyq, - ((TIMER_EVENT)(yyq.StackAt(0).m_value)) +public class IntArgEvent_10 : IntArgEvent { + public IntArgEvent_10(Parser yyq):base(yyq, + ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_31 : Event { - public Event_31(Parser yyq):base(yyq, - ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) +public class VectorArgEvent_1 : VectorArgEvent { + public VectorArgEvent_1(Parser yyq):base(yyq, + ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_32 : Event { - public Event_32(Parser yyq):base(yyq, - ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) +public class VectorArgEvent_2 : VectorArgEvent { + public VectorArgEvent_2(Parser yyq):base(yyq, + ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_33 : Event { - public Event_33(Parser yyq):base(yyq, - ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) +public class VectorArgEvent_3 : VectorArgEvent { + public VectorArgEvent_3(Parser yyq):base(yyq, + ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} -public class Event_34 : Event { - public Event_34(Parser yyq):base(yyq, - ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) +public class IntRotRotArgEvent_1 : IntRotRotArgEvent { + public IntRotRotArgEvent_1(Parser yyq):base(yyq, + ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} + +public class IntVecVecArgEvent_1 : IntVecVecArgEvent { + public IntVecVecArgEvent_1(Parser yyq):base(yyq, + ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} + +public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent { + public KeyIntIntArgEvent_1(Parser yyq):base(yyq, + ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) .yytext){}} public class yyLSLSyntax : YyParser { @@ -1960,12 +2381,12 @@ public class ArgumentDeclarationList_3 : ArgumentDeclarationList { public class ArgumentList_3 : ArgumentList { public ArgumentList_3(Parser yyq):base(yyq){}} -public class ArgumentDeclarationList_4 : ArgumentDeclarationList { - public ArgumentDeclarationList_4(Parser yyq):base(yyq){}} - public class ArgumentList_4 : ArgumentList { public ArgumentList_4(Parser yyq):base(yyq){}} +public class ArgumentDeclarationList_4 : ArgumentDeclarationList { + public ArgumentDeclarationList_4(Parser yyq):base(yyq){}} + public class ArgumentDeclarationList_5 : ArgumentDeclarationList { public ArgumentDeclarationList_5(Parser yyq):base(yyq){}} public yyLSLSyntax @@ -1978,10 +2399,10 @@ public yyLSLSyntax 0,103,0,114,0, 97,0,109,0,82, 0,111,0,111,0, -116,0,1,96,1, -2,104,18,1,2717, +116,0,1,97,1, +2,104,18,1,2845, 102,2,0,105,5, -320,1,0,106,18, +395,1,0,106,18, 1,0,0,2,0, 1,1,107,18,1, 1,108,20,109,4, @@ -2042,12 +2463,12 @@ public yyLSLSyntax 121,0,112,0,101, 0,110,0,97,0, 109,0,101,0,1, -106,1,2,2,0, +124,1,2,2,0, 1,9,131,18,1, 9,132,20,133,4, 10,73,0,68,0, 69,0,78,0,84, -0,1,92,1,1, +0,1,93,1,1, 2,0,1,10,134, 18,1,10,135,20, 136,4,20,76,0, @@ -2071,7 +2492,7 @@ public yyLSLSyntax 105,0,111,0,110, 0,76,0,105,0, 115,0,116,0,1, -104,1,2,2,0, +112,1,2,2,0, 1,21,142,18,1, 21,143,20,144,4, 10,67,0,79,0, @@ -2086,222 +2507,310 @@ public yyLSLSyntax 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, -1,122,1,2,2, +1,147,1,2,2, 0,1,1695,148,18, 1,1695,143,2,0, -1,30,149,18,1, -30,150,20,151,4, -22,68,0,101,0, -99,0,108,0,97, -0,114,0,97,0, -116,0,105,0,111, -0,110,0,1,105, +1,2811,149,18,1, +2811,150,20,151,4, +18,83,0,69,0, +77,0,73,0,67, +0,79,0,76,0, +79,0,78,0,1, +11,1,1,2,0, +1,2645,152,18,1, +2645,153,20,154,4, +32,73,0,110,0, +116,0,65,0,114, +0,103,0,83,0, +116,0,97,0,116, +0,101,0,69,0, +118,0,101,0,110, +0,116,0,1,107, 1,2,2,0,1, -31,152,18,1,31, -153,20,154,4,22, -82,0,73,0,71, -0,72,0,84,0, -95,0,80,0,65, -0,82,0,69,0, -78,0,1,17,1, -1,2,0,1,32, -155,18,1,32,156, -20,157,4,20,76, -0,69,0,70,0, -84,0,95,0,66, -0,82,0,65,0, -67,0,69,0,1, -12,1,1,2,0, -1,1114,158,18,1, -1114,132,2,0,1, -1152,159,18,1,1152, -160,20,161,4,32, -83,0,105,0,109, -0,112,0,108,0, -101,0,65,0,115, -0,115,0,105,0, -103,0,110,0,109, +2646,155,18,1,2646, +156,20,157,4,32, +75,0,101,0,121, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, 0,101,0,110,0, -116,0,1,113,1, -2,2,0,1,1117, -162,18,1,1117,163, -20,164,4,28,80, -0,69,0,82,0, -67,0,69,0,78, +116,0,1,106,1, +2,2,0,1,30, +158,18,1,30,159, +20,160,4,22,68, +0,101,0,99,0, +108,0,97,0,114, +0,97,0,116,0, +105,0,111,0,110, +0,1,119,1,2, +2,0,1,31,161, +18,1,31,162,20, +163,4,22,82,0, +73,0,71,0,72, 0,84,0,95,0, -69,0,81,0,85, -0,65,0,76,0, -83,0,1,10,1, -1,2,0,1,40, -165,18,1,40,132, -2,0,1,41,166, -18,1,41,135,2, -0,1,42,167,18, -1,42,168,20,169, -4,20,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,1,131,1, -2,2,0,1,43, -170,18,1,43,171, -20,172,4,22,82, -0,73,0,71,0, -72,0,84,0,95, -0,83,0,72,0, -73,0,70,0,84, -0,1,41,1,1, -2,0,1,44,173, -18,1,44,132,2, -0,1,1159,174,18, -1,1159,168,2,0, -1,46,175,18,1, -46,176,20,177,4, -12,80,0,69,0, -82,0,73,0,79, -0,68,0,1,24, -1,1,2,0,1, -47,178,18,1,47, -132,2,0,1,48, -179,18,1,48,180, -20,181,4,18,68, -0,69,0,67,0, -82,0,69,0,77, +80,0,65,0,82, 0,69,0,78,0, -84,0,1,5,1, -1,2,0,1,49, -182,18,1,49,183, -20,184,4,18,73, -0,78,0,67,0, -82,0,69,0,77, +1,17,1,1,2, +0,1,32,164,18, +1,32,165,20,166, +4,20,76,0,69, +0,70,0,84,0, +95,0,66,0,82, +0,65,0,67,0, +69,0,1,12,1, +1,2,0,1,2650, +167,18,1,2650,168, +20,169,4,44,75, +0,101,0,121,0, +73,0,110,0,116, +0,73,0,110,0, +116,0,65,0,114, +0,103,0,83,0, +116,0,97,0,116, +0,101,0,69,0, +118,0,101,0,110, +0,116,0,1,111, +1,2,2,0,1, +2651,170,18,1,2651, +171,20,172,4,44, +73,0,110,0,116, +0,86,0,101,0, +99,0,86,0,101, +0,99,0,65,0, +114,0,103,0,83, +0,116,0,97,0, +116,0,101,0,69, +0,118,0,101,0, +110,0,116,0,1, +110,1,2,2,0, +1,1114,173,18,1, +1114,132,2,0,1, +2654,174,18,1,2654, +153,2,0,1,1152, +175,18,1,1152,176, +20,177,4,32,83, +0,105,0,109,0, +112,0,108,0,101, +0,65,0,115,0, +115,0,105,0,103, +0,110,0,109,0, +101,0,110,0,116, +0,1,138,1,2, +2,0,1,1117,178, +18,1,1117,179,20, +180,4,28,80,0, +69,0,82,0,67, 0,69,0,78,0, -84,0,1,4,1, -1,2,0,1,50, -185,18,1,50,180, -2,0,1,51,186, -18,1,51,183,2, -0,1,52,187,18, -1,52,135,2,0, -1,2281,188,18,1, -2281,160,2,0,1, -1730,189,18,1,1730, -160,2,0,1,1731, -190,18,1,1731,191, -20,192,4,18,83, +84,0,95,0,69, +0,81,0,85,0, +65,0,76,0,83, +0,1,10,1,1, +2,0,1,40,181, +18,1,40,132,2, +0,1,41,182,18, +1,41,135,2,0, +1,42,183,18,1, +42,184,20,185,4, +20,69,0,120,0, +112,0,114,0,101, +0,115,0,115,0, +105,0,111,0,110, +0,1,156,1,2, +2,0,1,43,186, +18,1,43,187,20, +188,4,22,82,0, +73,0,71,0,72, +0,84,0,95,0, +83,0,72,0,73, +0,70,0,84,0, +1,41,1,1,2, +0,1,44,189,18, +1,44,132,2,0, +1,1159,190,18,1, +1159,184,2,0,1, +46,191,18,1,46, +192,20,193,4,12, +80,0,69,0,82, +0,73,0,79,0, +68,0,1,24,1, +1,2,0,1,47, +194,18,1,47,132, +2,0,1,48,195, +18,1,48,196,20, +197,4,18,68,0, +69,0,67,0,82, 0,69,0,77,0, -73,0,67,0,79, -0,76,0,79,0, -78,0,1,11,1, -1,2,0,1,61, -193,18,1,61,129, -2,0,1,62,194, -18,1,62,153,2, -0,1,63,195,18, -1,63,132,2,0, -1,65,196,18,1, -65,176,2,0,1, -66,197,18,1,66, -132,2,0,1,67, -198,18,1,67,180, -2,0,1,68,199, -18,1,68,183,2, -0,1,69,200,18, -1,69,180,2,0, -1,70,201,18,1, -70,183,2,0,1, -71,202,18,1,71, -135,2,0,1,73, -203,18,1,73,168, -2,0,1,74,204, -18,1,74,153,2, -0,1,1189,205,18, -1,1189,206,20,207, -4,22,83,0,84, -0,65,0,82,0, -95,0,69,0,81, -0,85,0,65,0, -76,0,83,0,1, -8,1,1,2,0, -1,76,208,18,1, -76,209,20,210,4, -20,76,0,69,0, -70,0,84,0,95, -0,83,0,72,0, -73,0,70,0,84, -0,1,40,1,1, -2,0,1,1153,211, -18,1,1153,212,20, -213,4,24,83,0, -76,0,65,0,83, -0,72,0,95,0, -69,0,81,0,85, -0,65,0,76,0, -83,0,1,9,1, -1,2,0,1,79, -214,18,1,79,215, -20,216,4,10,84, -0,73,0,76,0, -68,0,69,0,1, -36,1,1,2,0, -1,1195,217,18,1, -1195,168,2,0,1, -82,218,18,1,82, -168,2,0,1,1123, -219,18,1,1123,168, -2,0,1,85,220, -18,1,85,221,20, -222,4,26,83,0, -84,0,82,0,79, -0,75,0,69,0, -95,0,83,0,84, +69,0,78,0,84, +0,1,5,1,1, +2,0,1,49,198, +18,1,49,199,20, +200,4,18,73,0, +78,0,67,0,82, +0,69,0,77,0, +69,0,78,0,84, +0,1,4,1,1, +2,0,1,50,201, +18,1,50,196,2, +0,1,51,202,18, +1,51,199,2,0, +1,52,203,18,1, +52,135,2,0,1, +2281,204,18,1,2281, +176,2,0,1,2841, +205,18,1,2841,206, +20,207,4,48,71, +0,108,0,111,0, +98,0,97,0,108, +0,70,0,117,0, +110,0,99,0,116, +0,105,0,111,0, +110,0,68,0,101, +0,102,0,105,0, +110,0,105,0,116, +0,105,0,111,0, +110,0,1,100,1, +2,2,0,1,2842, +208,18,1,2842,209, +20,210,4,50,71, +0,108,0,111,0, +98,0,97,0,108, +0,86,0,97,0, +114,0,105,0,97, +0,98,0,108,0, +101,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,1, +99,1,2,2,0, +1,2755,211,18,1, +2755,212,20,213,4, +22,82,0,73,0, +71,0,72,0,84, +0,95,0,66,0, +82,0,65,0,67, +0,69,0,1,13, +1,1,2,0,1, +1730,214,18,1,1730, +176,2,0,1,1731, +215,18,1,1731,150, +2,0,1,61,216, +18,1,61,129,2, +0,1,62,217,18, +1,62,162,2,0, +1,63,218,18,1, +63,132,2,0,1, +65,219,18,1,65, +192,2,0,1,66, +220,18,1,66,132, +2,0,1,67,221, +18,1,67,196,2, +0,1,68,222,18, +1,68,199,2,0, +1,69,223,18,1, +69,196,2,0,1, +70,224,18,1,70, +199,2,0,1,71, +225,18,1,71,135, +2,0,1,73,226, +18,1,73,184,2, +0,1,74,227,18, +1,74,162,2,0, +1,1189,228,18,1, +1189,229,20,230,4, +22,83,0,84,0, +65,0,82,0,95, +0,69,0,81,0, +85,0,65,0,76, +0,83,0,1,8, +1,1,2,0,1, +76,231,18,1,76, +232,20,233,4,20, +76,0,69,0,70, +0,84,0,95,0, +83,0,72,0,73, +0,70,0,84,0, +1,40,1,1,2, +0,1,1153,234,18, +1,1153,235,20,236, +4,24,83,0,76, +0,65,0,83,0, +72,0,95,0,69, +0,81,0,85,0, +65,0,76,0,83, +0,1,9,1,1, +2,0,1,79,237, +18,1,79,238,20, +239,4,10,84,0, +73,0,76,0,68, +0,69,0,1,36, +1,1,2,0,1, +1195,240,18,1,1195, +184,2,0,1,82, +241,18,1,82,184, +2,0,1,1123,242, +18,1,1123,184,2, +0,1,85,243,18, +1,85,244,20,245, +4,26,83,0,84, 0,82,0,79,0, -75,0,69,0,1, -39,1,1,2,0, -1,89,223,18,1, -89,224,20,225,4, -10,77,0,73,0, -78,0,85,0,83, -0,1,19,1,1, -2,0,1,2318,226, -18,1,2318,191,2, -0,1,93,227,18, -1,93,168,2,0, -1,97,228,18,1, -97,229,20,230,4, -14,65,0,77,0, -80,0,95,0,65, +75,0,69,0,95, +0,83,0,84,0, +82,0,79,0,75, +0,69,0,1,39, +1,1,2,0,1, +2547,246,18,1,2547, +247,20,248,4,28, +82,0,111,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,1,123, +1,2,2,0,1, +89,249,18,1,89, +250,20,251,4,10, +77,0,73,0,78, +0,85,0,83,0, +1,19,1,1,2, +0,1,2318,252,18, +1,2318,150,2,0, +1,93,253,18,1, +93,184,2,0,1, +2792,254,18,1,2792, +184,2,0,1,97, +255,18,1,97,256, +20,257,4,14,65, 0,77,0,80,0, -1,38,1,1,2, -0,1,102,231,18, -1,102,232,20,233, -4,22,69,0,88, -0,67,0,76,0, -65,0,77,0,65, -0,84,0,73,0, -79,0,78,0,1, -37,1,1,2,0, -1,1775,234,18,1, -1775,153,2,0,1, -2718,235,18,1,2718, -236,23,237,4,6, -69,0,79,0,70, -0,1,2,1,6, -2,0,1,107,238, -18,1,107,168,2, -0,1,2337,239,18, -1,2337,153,2,0, -1,1224,240,18,1, -1224,160,2,0,1, -1225,241,18,1,1225, -242,20,243,4,24, +95,0,65,0,77, +0,80,0,1,38, +1,1,2,0,1, +102,258,18,1,102, +259,20,260,4,22, +69,0,88,0,67, +0,76,0,65,0, +77,0,65,0,84, +0,73,0,79,0, +78,0,1,37,1, +1,2,0,1,1775, +261,18,1,1775,162, +2,0,1,107,262, +18,1,107,184,2, +0,1,2337,263,18, +1,2337,162,2,0, +1,1224,264,18,1, +1224,176,2,0,1, +1225,265,18,1,1225, +266,20,267,4,24, 77,0,73,0,78, 0,85,0,83,0, 95,0,69,0,81, 0,85,0,65,0, 76,0,83,0,1, 7,1,1,2,0, -1,112,244,18,1, -112,245,20,246,4, +1,112,268,18,1, +112,269,20,270,4, 28,71,0,82,0, 69,0,65,0,84, 0,69,0,82,0, @@ -2309,576 +2818,496 @@ public yyLSLSyntax 0,85,0,65,0, 76,0,83,0,1, 32,1,1,2,0, -1,1188,247,18,1, -1188,160,2,0,1, -1231,248,18,1,1231, -168,2,0,1,118, -249,18,1,118,168, -2,0,1,1737,250, -18,1,1737,168,2, -0,1,124,251,18, -1,124,252,20,253, +1,1188,271,18,1, +1188,176,2,0,1, +1231,272,18,1,1231, +184,2,0,1,118, +273,18,1,118,184, +2,0,1,1737,274, +18,1,1737,184,2, +0,1,124,275,18, +1,124,276,20,277, 4,22,76,0,69, 0,83,0,83,0, 95,0,69,0,81, 0,85,0,65,0, 76,0,83,0,1, 31,1,1,2,0, -1,2657,254,18,1, -2657,150,2,0,1, -2658,255,18,1,2658, -256,20,257,4,12, -69,0,81,0,85, -0,65,0,76,0, -83,0,1,15,1, -1,2,0,1,130, -258,18,1,130,168, -2,0,1,1803,259, -18,1,1803,260,20, -261,4,18,83,0, +1,2657,278,18,1, +2657,279,20,280,4, +20,83,0,116,0, +97,0,116,0,101, +0,69,0,118,0, +101,0,110,0,116, +0,1,104,1,2, +2,0,1,2658,281, +18,1,2658,282,20, +283,4,26,68,0, +69,0,70,0,65, +0,85,0,76,0, +84,0,95,0,83, +0,84,0,65,0, +84,0,69,0,1, +47,1,1,2,0, +1,2659,284,18,1, +2659,165,2,0,1, +130,285,18,1,130, +184,2,0,1,2843, +286,18,1,2843,206, +2,0,1,1803,287, +18,1,1803,288,20, +289,4,18,83,0, 116,0,97,0,116, 0,101,0,109,0, 101,0,110,0,116, -0,1,110,1,2, -2,0,1,1804,262, -18,1,1804,263,20, -264,4,4,68,0, +0,1,135,1,2, +2,0,1,1804,290, +18,1,1804,291,20, +292,4,4,68,0, 79,0,1,44,1, -1,2,0,1,2364, -265,18,1,2364,260, -2,0,1,137,266, -18,1,137,267,20, -268,4,36,69,0, -88,0,67,0,76, -0,65,0,77,0, -65,0,84,0,73, -0,79,0,78,0, +1,2,0,1,2591, +293,18,1,2591,140, +2,0,1,2364,294, +18,1,2364,288,2, +0,1,137,295,18, +1,137,296,20,297, +4,36,69,0,88, +0,67,0,76,0, +65,0,77,0,65, +0,84,0,73,0, +79,0,78,0,95, +0,69,0,81,0, +85,0,65,0,76, +0,83,0,1,30, +1,1,2,0,1, +2293,298,18,1,2293, +150,2,0,1,2834, +299,18,1,2834,300, +20,301,4,12,83, +0,116,0,97,0, +116,0,101,0,115, +0,1,101,1,2, +2,0,1,1701,302, +18,1,1701,184,2, +0,1,1756,303,18, +1,1756,150,2,0, +1,2527,304,18,1, +2527,114,2,0,1, +143,305,18,1,143, +184,2,0,1,2299, +306,18,1,2299,184, +2,0,1,1260,307, +18,1,1260,176,2, +0,1,1261,308,18, +1,1261,309,20,310, +4,22,80,0,76, +0,85,0,83,0, 95,0,69,0,81, 0,85,0,65,0, 76,0,83,0,1, -30,1,1,2,0, -1,2293,269,18,1, -2293,191,2,0,1, -1701,270,18,1,1701, -168,2,0,1,1756, -271,18,1,1756,191, -2,0,1,143,272, -18,1,143,168,2, -0,1,2299,273,18, -1,2299,168,2,0, -1,1260,274,18,1, -1260,160,2,0,1, -1261,275,18,1,1261, -276,20,277,4,22, -80,0,76,0,85, -0,83,0,95,0, -69,0,81,0,85, -0,65,0,76,0, -83,0,1,6,1, -1,2,0,1,151, -278,18,1,151,279, -20,280,4,26,69, -0,81,0,85,0, -65,0,76,0,83, -0,95,0,69,0, -81,0,85,0,65, -0,76,0,83,0, -1,29,1,1,2, -0,1,1267,281,18, -1,1267,168,2,0, -1,157,282,18,1, -157,168,2,0,1, -1773,283,18,1,1773, +6,1,1,2,0, +1,2528,311,18,1, +2528,132,2,0,1, +2844,312,18,1,2844, +209,2,0,1,2845, +104,1,151,313,18, +1,151,314,20,315, +4,26,69,0,81, +0,85,0,65,0, +76,0,83,0,95, +0,69,0,81,0, +85,0,65,0,76, +0,83,0,1,29, +1,1,2,0,1, +1267,316,18,1,1267, +184,2,0,1,157, +317,18,1,157,184, +2,0,1,2767,318, +18,1,2767,319,20, +320,4,10,83,0, +116,0,97,0,116, +0,101,0,1,102, +1,2,2,0,1, +1773,321,18,1,1773, 146,2,0,1,1832, -284,18,1,1832,260, -2,0,1,1833,285, -18,1,1833,286,20, -287,4,10,87,0, +322,18,1,1832,288, +2,0,1,1833,323, +18,1,1833,324,20, +325,4,10,87,0, 72,0,73,0,76, 0,69,0,1,45, 1,1,2,0,1, -1834,288,18,1,1834, +1834,326,18,1,1834, 135,2,0,1,166, -289,18,1,166,290, -20,291,4,20,76, +327,18,1,166,328, +20,329,4,20,76, 0,69,0,70,0, 84,0,95,0,65, 0,78,0,71,0, 76,0,69,0,1, 25,1,1,2,0, -1,1840,292,18,1, -1840,168,2,0,1, -172,293,18,1,172, -168,2,0,1,2706, -294,18,1,2706,295, -20,296,4,12,83, -0,116,0,97,0, -116,0,101,0,115, -0,1,100,1,2, -2,0,1,2335,297, -18,1,2335,146,2, -0,1,1296,298,18, -1,1296,160,2,0, -1,1297,299,18,1, -1297,256,2,0,1, -2413,300,18,1,2413, -301,20,302,4,26, -83,0,116,0,97, -0,116,0,101,0, -109,0,101,0,110, -0,116,0,76,0, -105,0,115,0,116, -0,1,109,1,2, -2,0,1,1859,303, -18,1,1859,153,2, -0,1,1860,304,18, -1,1860,191,2,0, -1,188,305,18,1, -188,168,2,0,1, -182,306,18,1,182, -307,20,308,4,22, -82,0,73,0,71, -0,72,0,84,0, -95,0,65,0,78, -0,71,0,76,0, -69,0,1,26,1, -1,2,0,1,199, -309,18,1,199,310, -20,311,4,10,67, -0,65,0,82,0, -69,0,84,0,1, -35,1,1,2,0, -1,1871,312,18,1, -1871,160,2,0,1, -1872,313,18,1,1872, -153,2,0,1,1873, -314,18,1,1873,191, -2,0,1,1875,315, -18,1,1875,286,2, -0,1,205,316,18, -1,205,168,2,0, -1,2515,317,18,1, -2515,140,2,0,1, -1882,318,18,1,1882, -168,2,0,1,2227, -319,18,1,2227,260, -2,0,1,217,320, -18,1,217,321,20, -322,4,12,83,0, +1,1840,330,18,1, +1840,184,2,0,1, +2779,331,18,1,2779, +140,2,0,1,172, +332,18,1,172,184, +2,0,1,2785,333, +18,1,2785,159,2, +0,1,2786,334,18, +1,2786,335,20,336, +4,12,69,0,81, +0,85,0,65,0, +76,0,83,0,1, +15,1,1,2,0, +1,2335,337,18,1, +2335,146,2,0,1, +1296,338,18,1,1296, +176,2,0,1,1297, +339,18,1,1297,335, +2,0,1,2413,340, +18,1,2413,341,20, +342,4,26,83,0, +116,0,97,0,116, +0,101,0,109,0, +101,0,110,0,116, +0,76,0,105,0, +115,0,116,0,1, +134,1,2,2,0, +1,1859,343,18,1, +1859,162,2,0,1, +1860,344,18,1,1860, +150,2,0,1,188, +345,18,1,188,184, +2,0,1,182,346, +18,1,182,347,20, +348,4,22,82,0, +73,0,71,0,72, +0,84,0,95,0, +65,0,78,0,71, +0,76,0,69,0, +1,26,1,1,2, +0,1,199,349,18, +1,199,350,20,351, +4,10,67,0,65, +0,82,0,69,0, +84,0,1,35,1, +1,2,0,1,1871, +352,18,1,1871,176, +2,0,1,1872,353, +18,1,1872,162,2, +0,1,1873,354,18, +1,1873,150,2,0, +1,1875,355,18,1, +1875,324,2,0,1, +205,356,18,1,205, +184,2,0,1,2581, +357,18,1,2581,358, +20,359,4,10,69, +0,118,0,101,0, +110,0,116,0,1, +125,1,2,2,0, +1,2515,360,18,1, +2515,143,2,0,1, +1882,361,18,1,1882, +184,2,0,1,2227, +362,18,1,2227,288, +2,0,1,217,363, +18,1,217,364,20, +365,4,12,83,0, 84,0,82,0,79, 0,75,0,69,0, 1,34,1,1,2, -0,1,1332,323,18, -1,1332,160,2,0, -1,1335,324,18,1, -1335,163,2,0,1, -223,325,18,1,223, -168,2,0,1,1341, -326,18,1,1341,168, -2,0,1,1901,327, -18,1,1901,153,2, -0,1,1303,328,18, -1,1303,168,2,0, -1,2462,329,18,1, -2462,260,2,0,1, -236,330,18,1,236, -331,20,332,4,6, -65,0,77,0,80, -0,1,33,1,1, -2,0,1,2466,333, -18,1,2466,334,20, -335,4,34,67,0, -111,0,109,0,112, -0,111,0,117,0, -110,0,100,0,83, -0,116,0,97,0, -116,0,101,0,109, -0,101,0,110,0, -116,0,1,108,1, -2,2,0,1,2467, -336,18,1,2467,150, -2,0,1,2468,337, -18,1,2468,338,20, -339,4,10,83,0, -84,0,65,0,84, -0,69,0,1,48, -1,1,2,0,1, -2469,340,18,1,2469, -132,2,0,1,242, -341,18,1,242,168, -2,0,1,2471,342, -18,1,2471,343,20, -344,4,36,72,0, -84,0,84,0,80, -0,95,0,82,0, -69,0,81,0,85, -0,69,0,83,0, +0,1,1332,366,18, +1,1332,176,2,0, +1,1335,367,18,1, +1335,179,2,0,1, +223,368,18,1,223, +184,2,0,1,2846, +369,18,1,2846,370, +23,371,4,6,69, +0,79,0,70,0, +1,2,1,6,2, +0,1,1341,372,18, +1,1341,184,2,0, +1,1901,373,18,1, +1901,162,2,0,1, +1303,374,18,1,1303, +184,2,0,1,2462, +375,18,1,2462,288, +2,0,1,236,376, +18,1,236,377,20, +378,4,6,65,0, +77,0,80,0,1, +33,1,1,2,0, +1,2466,379,18,1, +2466,380,20,381,4, +34,67,0,111,0, +109,0,112,0,111, +0,117,0,110,0, +100,0,83,0,116, +0,97,0,116,0, +101,0,109,0,101, +0,110,0,116,0, +1,133,1,2,2, +0,1,2467,382,18, +1,2467,159,2,0, +1,2468,383,18,1, +2468,384,20,385,4, +10,83,0,84,0, +65,0,84,0,69, +0,1,48,1,1, +2,0,1,2469,386, +18,1,2469,132,2, +0,1,242,387,18, +1,242,184,2,0, +1,2471,388,18,1, +2471,389,20,390,4, +26,67,0,79,0, +78,0,84,0,82, +0,79,0,76,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,65,1, +1,2,0,1,2472, +391,18,1,2472,392, +20,393,4,30,65, +0,84,0,95,0, +84,0,65,0,82, +0,71,0,69,0, 84,0,95,0,69, 0,86,0,69,0, 78,0,84,0,1, -91,1,1,2,0, -1,2472,345,18,1, -2472,346,20,347,4, -34,84,0,79,0, -85,0,67,0,72, -0,95,0,83,0, -84,0,65,0,82, +59,1,1,2,0, +1,2473,394,18,1, +2473,395,20,396,4, +38,65,0,84,0, +95,0,82,0,79, 0,84,0,95,0, -69,0,86,0,69, -0,78,0,84,0, -1,89,1,1,2, -0,1,2473,348,18, -1,2473,349,20,350, -4,30,84,0,79, -0,85,0,67,0, -72,0,95,0,69, -0,78,0,68,0, -95,0,69,0,86, -0,69,0,78,0, -84,0,1,90,1, -1,2,0,1,2474, -351,18,1,2474,352, -20,353,4,22,84, -0,79,0,85,0, -67,0,72,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,88,1,1, -2,0,1,2475,354, -18,1,2475,355,20, -356,4,22,84,0, -73,0,77,0,69, -0,82,0,95,0, -69,0,86,0,69, -0,78,0,84,0, -1,87,1,1,2, -0,1,2476,357,18, -1,2476,358,20,359, -4,32,83,0,84, -0,65,0,84,0, -69,0,95,0,69, -0,88,0,73,0, +84,0,65,0,82, +0,71,0,69,0, 84,0,95,0,69, 0,86,0,69,0, 78,0,84,0,1, -86,1,1,2,0, -1,2477,360,18,1, -2477,361,20,362,4, -34,83,0,84,0, -65,0,84,0,69, +58,1,1,2,0, +1,2474,397,18,1, +2474,398,20,399,4, +52,76,0,65,0, +78,0,68,0,95, +0,67,0,79,0, +76,0,76,0,73, +0,83,0,73,0, +79,0,78,0,95, +0,83,0,84,0, +65,0,82,0,84, 0,95,0,69,0, -78,0,84,0,82, -0,89,0,95,0, +86,0,69,0,78, +0,84,0,1,71, +1,1,2,0,1, +2475,400,18,1,2475, +401,20,402,4,48, +76,0,65,0,78, +0,68,0,95,0, +67,0,79,0,76, +0,76,0,73,0, +83,0,73,0,79, +0,78,0,95,0, +69,0,78,0,68, +0,95,0,69,0, +86,0,69,0,78, +0,84,0,1,70, +1,1,2,0,1, +2476,403,18,1,2476, +404,20,405,4,40, +76,0,65,0,78, +0,68,0,95,0, +67,0,79,0,76, +0,76,0,73,0, +83,0,73,0,79, +0,78,0,95,0, 69,0,86,0,69, 0,78,0,84,0, -1,85,1,1,2, -0,1,2478,363,18, -1,2478,364,20,365, -4,24,83,0,69, -0,78,0,83,0, -79,0,82,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,84,1,1, -2,0,1,2479,366, -18,1,2479,367,20, -368,4,52,82,0, -85,0,78,0,95, -0,84,0,73,0, -77,0,69,0,95, -0,80,0,69,0, -82,0,77,0,73, -0,83,0,83,0, -73,0,79,0,78, -0,83,0,95,0, -69,0,86,0,69, -0,78,0,84,0, -1,83,1,1,2, -0,1,2480,369,18, -1,2480,370,20,371, -4,34,82,0,69, -0,77,0,79,0, -84,0,69,0,95, -0,68,0,65,0, -84,0,65,0,95, +1,69,1,1,2, +0,1,2477,406,18, +1,2477,407,20,408, +4,34,84,0,79, +0,85,0,67,0, +72,0,95,0,83, +0,84,0,65,0, +82,0,84,0,95, 0,69,0,86,0, 69,0,78,0,84, -0,1,82,1,1, -2,0,1,2481,372, -18,1,2481,373,20, -374,4,24,79,0, -78,0,95,0,82, -0,69,0,90,0, +0,1,89,1,1, +2,0,1,2478,409, +18,1,2478,410,20, +411,4,30,84,0, +79,0,85,0,67, +0,72,0,95,0, +69,0,78,0,68, +0,95,0,69,0, +86,0,69,0,78, +0,84,0,1,90, +1,1,2,0,1, +2479,412,18,1,2479, +413,20,414,4,22, +84,0,79,0,85, +0,67,0,72,0, 95,0,69,0,86, 0,69,0,78,0, -84,0,1,81,1, -1,2,0,1,2482, -375,18,1,2482,376, -20,377,4,32,79, -0,66,0,74,0, -69,0,67,0,84, -0,95,0,82,0, -69,0,90,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,80,1,1, -2,0,1,2483,378, -18,1,2483,379,20, -380,4,38,78,0, -79,0,84,0,95, -0,65,0,84,0, -95,0,84,0,65, -0,82,0,71,0, -69,0,84,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,79,1,1, -2,0,1,256,381, -18,1,256,382,20, -383,4,14,80,0, -69,0,82,0,67, +84,0,1,88,1, +1,2,0,1,2480, +415,18,1,2480,416, +20,417,4,24,83, 0,69,0,78,0, -84,0,1,22,1, -1,2,0,1,1371, -384,18,1,1371,212, -2,0,1,2486,385, -18,1,2486,386,20, -387,4,36,77,0, -79,0,86,0,73, -0,78,0,71,0, -95,0,83,0,84, -0,65,0,82,0, -84,0,95,0,69, -0,86,0,69,0, -78,0,84,0,1, -76,1,1,2,0, -1,2487,388,18,1, -2487,389,20,390,4, -32,77,0,79,0, -86,0,73,0,78, -0,71,0,95,0, -69,0,78,0,68, +83,0,79,0,82, 0,95,0,69,0, 86,0,69,0,78, -0,84,0,1,75, -1,1,2,0,1, -1931,391,18,1,1931, -260,2,0,1,1932, -392,18,1,1932,393, -20,394,4,4,73, -0,70,0,1,42, +0,84,0,1,84, 1,1,2,0,1, -262,395,18,1,262, -168,2,0,1,1377, -396,18,1,1377,168, -2,0,1,2492,397, -18,1,2492,398,20, -399,4,48,76,0, -65,0,78,0,68, -0,95,0,67,0, -79,0,76,0,76, +2481,418,18,1,2481, +419,20,420,4,52, +82,0,85,0,78, +0,95,0,84,0, +73,0,77,0,69, +0,95,0,80,0, +69,0,82,0,77, 0,73,0,83,0, -73,0,79,0,78, +83,0,73,0,79, +0,78,0,83,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,83,1, +1,2,0,1,2482, +421,18,1,2482,422, +20,423,4,24,79, +0,78,0,95,0, +82,0,69,0,90, 0,95,0,69,0, -78,0,68,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,70,1,1, -2,0,1,1876,400, -18,1,1876,135,2, -0,1,2494,401,18, -1,2494,402,20,403, -4,38,72,0,84, -0,84,0,80,0, -95,0,82,0,69, -0,83,0,80,0, -79,0,78,0,83, -0,69,0,95,0, -69,0,86,0,69, -0,78,0,84,0, -1,68,1,1,2, -0,1,2495,404,18, -1,2495,405,20,406, -4,22,69,0,77, -0,65,0,73,0, -76,0,95,0,69, -0,86,0,69,0, -78,0,84,0,1, -67,1,1,2,0, -1,1939,407,18,1, -1939,168,2,0,1, -2497,408,18,1,2497, -409,20,410,4,26, -67,0,79,0,78, -0,84,0,82,0, -79,0,76,0,95, -0,69,0,86,0, -69,0,78,0,84, -0,1,65,1,1, -2,0,1,827,411, -18,1,827,168,2, -0,1,2499,412,18, -1,2499,413,20,414, -4,38,67,0,79, -0,76,0,76,0, -73,0,83,0,73, -0,79,0,78,0, -95,0,69,0,78, -0,68,0,95,0, -69,0,86,0,69, -0,78,0,84,0, -1,63,1,1,2, -0,1,2500,415,18, -1,2500,416,20,417, -4,30,67,0,79, -0,76,0,76,0, -73,0,83,0,73, -0,79,0,78,0, +86,0,69,0,78, +0,84,0,1,81, +1,1,2,0,1, +2483,424,18,1,2483, +425,20,426,4,42, +67,0,79,0,76, +0,76,0,73,0, +83,0,73,0,79, +0,78,0,95,0, +83,0,84,0,65, +0,82,0,84,0, 95,0,69,0,86, 0,69,0,78,0, -84,0,1,62,1, -1,2,0,1,2501, -418,18,1,2501,419, -20,420,4,26,67, +84,0,1,64,1, +1,2,0,1,256, +427,18,1,256,428, +20,429,4,14,80, +0,69,0,82,0, +67,0,69,0,78, +0,84,0,1,22, +1,1,2,0,1, +1371,430,18,1,1371, +235,2,0,1,2486, +431,18,1,2486,432, +20,433,4,26,67, 0,72,0,65,0, 78,0,71,0,69, 0,68,0,95,0, 69,0,86,0,69, 0,78,0,84,0, 1,61,1,1,2, -0,1,2502,421,18, -1,2502,422,20,423, -4,24,65,0,84, +0,1,2487,434,18, +1,2487,435,20,436, +4,32,79,0,66, +0,74,0,69,0, +67,0,84,0,95, +0,82,0,69,0, +90,0,95,0,69, +0,86,0,69,0, +78,0,84,0,1, +80,1,1,2,0, +1,1931,437,18,1, +1931,288,2,0,1, +1932,438,18,1,1932, +439,20,440,4,4, +73,0,70,0,1, +42,1,1,2,0, +1,262,441,18,1, +262,184,2,0,1, +1377,442,18,1,1377, +184,2,0,1,2492, +443,18,1,2492,444, +20,445,4,30,78, +0,79,0,95,0, +83,0,69,0,78, +0,83,0,79,0, +82,0,95,0,69, +0,86,0,69,0, +78,0,84,0,1, +77,1,1,2,0, +1,1876,446,18,1, +1876,135,2,0,1, +2494,447,18,1,2494, +448,20,449,4,32, +77,0,79,0,86, +0,73,0,78,0, +71,0,95,0,69, +0,78,0,68,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,75,1, +1,2,0,1,2495, +450,18,1,2495,451, +20,452,4,32,83, 0,84,0,65,0, -67,0,72,0,95, +84,0,69,0,95, +0,69,0,88,0, +73,0,84,0,95, 0,69,0,86,0, 69,0,78,0,84, -0,1,60,1,1, -2,0,1,2503,424, -18,1,2503,425,20, -426,4,30,65,0, -84,0,95,0,84, -0,65,0,82,0, -71,0,69,0,84, -0,95,0,69,0, -86,0,69,0,78, -0,84,0,1,59, -1,1,2,0,1, -2504,427,18,1,2504, -428,20,429,4,38, -65,0,84,0,95, -0,82,0,79,0, -84,0,95,0,84, -0,65,0,82,0, -71,0,69,0,84, -0,95,0,69,0, -86,0,69,0,78, -0,84,0,1,58, -1,1,2,0,1, -277,430,18,1,277, -431,20,432,4,10, -83,0,76,0,65, -0,83,0,72,0, -1,21,1,1,2, -0,1,2506,433,18, -1,2506,135,2,0, -1,283,434,18,1, -283,168,2,0,1, -1958,435,18,1,1958, -153,2,0,1,2517, -436,18,1,2517,153, -2,0,1,2519,437, -18,1,2519,334,2, -0,1,1406,438,18, -1,1406,160,2,0, -1,1407,439,18,1, -1407,206,2,0,1, -299,440,18,1,299, -441,20,442,4,8, -83,0,84,0,65, -0,82,0,1,20, -1,1,2,0,1, -1370,443,18,1,1370, -160,2,0,1,305, -444,18,1,305,168, -2,0,1,2458,445, -18,1,2458,260,2, -0,1,2459,446,18, -1,2459,447,20,448, -4,22,82,0,73, -0,71,0,72,0, -84,0,95,0,66, -0,82,0,65,0, -67,0,69,0,1, -13,1,1,2,0, -1,2464,449,18,1, -2464,447,2,0,1, -1989,450,18,1,1989, -260,2,0,1,1990, -451,18,1,1990,452, -20,453,4,8,69, -0,76,0,83,0, -69,0,1,43,1, -1,2,0,1,2470, -454,18,1,2470,156, -2,0,1,322,455, -18,1,322,224,2, -0,1,1933,456,18, -1,1933,135,2,0, -1,883,457,18,1, -883,168,2,0,1, -328,458,18,1,328, -168,2,0,1,1443, -459,18,1,1443,242, -2,0,1,2558,460, -18,1,2558,447,2, -0,1,2559,461,18, -1,2559,462,20,463, -4,20,83,0,116, -0,97,0,116,0, -101,0,69,0,118, -0,101,0,110,0, -116,0,1,103,1, -2,2,0,1,2560, -464,18,1,2560,465, -20,466,4,26,68, -0,69,0,70,0, -65,0,85,0,76, +0,1,86,1,1, +2,0,1,1939,453, +18,1,1939,184,2, +0,1,2497,454,18, +1,2497,455,20,456, +4,48,84,0,82, +0,65,0,78,0, +83,0,65,0,67, +0,84,0,73,0, +79,0,78,0,95, +0,82,0,69,0, +83,0,85,0,76, 0,84,0,95,0, -83,0,84,0,65, -0,84,0,69,0, -1,47,1,1,2, -0,1,2561,467,18, -1,2561,156,2,0, -1,1449,468,18,1, -1449,168,2,0,1, -2485,469,18,1,2485, -470,20,471,4,30, -78,0,79,0,95, -0,83,0,69,0, -78,0,83,0,79, -0,82,0,95,0, 69,0,86,0,69, 0,78,0,84,0, -1,77,1,1,2, -0,1,2488,472,18, -1,2488,473,20,474, +1,92,1,1,2, +0,1,827,457,18, +1,827,184,2,0, +1,2499,458,18,1, +2499,459,20,460,4, +34,82,0,69,0, +77,0,79,0,84, +0,69,0,95,0, +68,0,65,0,84, +0,65,0,95,0, +69,0,86,0,69, +0,78,0,84,0, +1,82,1,1,2, +0,1,2500,461,18, +1,2500,462,20,463, 4,22,77,0,79, 0,78,0,69,0, 89,0,95,0,69, 0,86,0,69,0, 78,0,84,0,1, 74,1,1,2,0, -1,2489,475,18,1, -2489,476,20,477,4, +1,2501,464,18,1, +2501,465,20,466,4, 24,76,0,73,0, 83,0,84,0,69, 0,78,0,95,0, 69,0,86,0,69, 0,78,0,84,0, 1,73,1,1,2, -0,1,2490,478,18, -1,2490,479,20,480, +0,1,2502,467,18, +1,2502,468,20,469, 4,36,76,0,73, 0,78,0,75,0, 95,0,77,0,69, @@ -2888,746 +3317,1109 @@ public yyLSLSyntax 86,0,69,0,78, 0,84,0,1,72, 1,1,2,0,1, -2491,481,18,1,2491, -482,20,483,4,52, -76,0,65,0,78, -0,68,0,95,0, -67,0,79,0,76, -0,76,0,73,0, -83,0,73,0,79, -0,78,0,95,0, -83,0,84,0,65, -0,82,0,84,0, -95,0,69,0,86, -0,69,0,78,0, -84,0,1,71,1, -1,2,0,1,2493, -484,18,1,2493,485, -20,486,4,40,76, -0,65,0,78,0, -68,0,95,0,67, -0,79,0,76,0, -76,0,73,0,83, -0,73,0,79,0, -78,0,95,0,69, -0,86,0,69,0, -78,0,84,0,1, -69,1,1,2,0, -1,1413,487,18,1, -1413,168,2,0,1, -346,488,18,1,346, -489,20,490,4,8, -80,0,76,0,85, -0,83,0,1,18, -1,1,2,0,1, -2496,491,18,1,2496, -492,20,493,4,32, -68,0,65,0,84, -0,65,0,83,0, -69,0,82,0,86, -0,69,0,82,0, -95,0,69,0,86, -0,69,0,78,0, -84,0,1,66,1, -1,2,0,1,2021, -494,18,1,2021,260, -2,0,1,2022,495, -18,1,2022,338,2, -0,1,352,496,18, -1,352,168,2,0, -1,2024,497,18,1, -2024,132,2,0,1, -2025,498,18,1,2025, -499,20,500,4,8, -74,0,85,0,77, -0,80,0,1,49, -1,1,2,0,1, -2026,501,18,1,2026, -132,2,0,1,2027, -502,18,1,2027,503, -20,504,4,4,65, -0,84,0,1,23, -1,1,2,0,1, -2028,505,18,1,2028, -132,2,0,1,2029, -506,18,1,2029,334, -2,0,1,2030,507, -18,1,2030,508,20, -509,4,14,70,0, -111,0,114,0,76, -0,111,0,111,0, -112,0,1,121,1, -2,2,0,1,2031, -510,18,1,2031,511, -20,512,4,32,68, -0,111,0,87,0, -104,0,105,0,108, -0,101,0,83,0, -116,0,97,0,116, -0,101,0,109,0, -101,0,110,0,116, -0,1,120,1,2, -2,0,1,2032,513, -18,1,2032,514,20, -515,4,28,87,0, -104,0,105,0,108, -0,101,0,83,0, -116,0,97,0,116, -0,101,0,109,0, -101,0,110,0,116, -0,1,119,1,2, -2,0,1,2033,516, -18,1,2033,517,20, -518,4,22,73,0, -102,0,83,0,116, -0,97,0,116,0, -101,0,109,0,101, -0,110,0,116,0, -1,118,1,2,2, -0,1,2034,519,18, -1,2034,520,20,521, -4,22,83,0,116, -0,97,0,116,0, -101,0,67,0,104, -0,97,0,110,0, -103,0,101,0,1, -117,1,2,2,0, -1,1478,522,18,1, -1478,160,2,0,1, -1479,523,18,1,1479, -276,2,0,1,2037, -524,18,1,2037,191, -2,0,1,2038,525, -18,1,2038,526,20, -527,4,18,74,0, -117,0,109,0,112, -0,76,0,97,0, -98,0,101,0,108, -0,1,115,1,2, -2,0,1,2039,528, -18,1,2039,191,2, -0,1,2040,529,18, -1,2040,530,20,531, -4,30,82,0,101, -0,116,0,117,0, -114,0,110,0,83, -0,116,0,97,0, -116,0,101,0,109, -0,101,0,110,0, -116,0,1,114,1, -2,2,0,1,2041, -532,18,1,2041,191, -2,0,1,1485,533, -18,1,1485,168,2, -0,1,372,534,18, -1,372,180,2,0, -1,373,535,18,1, -373,132,2,0,1, -374,536,18,1,374, -176,2,0,1,375, -537,18,1,375,132, -2,0,1,376,538, -18,1,376,183,2, -0,1,377,539,18, -1,377,132,2,0, -1,378,540,18,1, -378,176,2,0,1, -379,541,18,1,379, -132,2,0,1,380, -542,18,1,380,543, -20,544,4,16,67, -0,111,0,110,0, -115,0,116,0,97, -0,110,0,116,0, -1,127,1,2,2, -0,1,381,545,18, -1,381,290,2,0, -1,371,546,18,1, -371,547,20,548,4, -24,70,0,117,0, -110,0,99,0,116, -0,105,0,111,0, -110,0,67,0,97, -0,108,0,108,0, -1,123,1,2,2, -0,1,942,549,18, -1,942,168,2,0, -1,387,550,18,1, -387,168,2,0,1, -1514,551,18,1,1514, -160,2,0,1,1515, -552,18,1,1515,256, -2,0,1,2074,553, -18,1,2074,160,2, -0,1,2075,554,18, -1,2075,153,2,0, -1,406,555,18,1, -406,143,2,0,1, -1521,556,18,1,1521, -168,2,0,1,2636, -557,18,1,2636,295, -2,0,1,2557,558, -18,1,2557,462,2, -0,1,2639,559,18, -1,2639,560,20,561, -4,10,83,0,116, -0,97,0,116,0, -101,0,1,101,1, -2,2,0,1,412, -562,18,1,412,168, -2,0,1,2641,563, -18,1,2641,132,2, -0,1,2484,564,18, -1,2484,565,20,566, -4,46,78,0,79, -0,84,0,95,0, -65,0,84,0,95, -0,82,0,79,0, -84,0,95,0,84, -0,65,0,82,0, -71,0,69,0,84, +2503,470,18,1,2503, +471,20,472,4,38, +72,0,84,0,84, +0,80,0,95,0, +82,0,69,0,83, +0,80,0,79,0, +78,0,83,0,69, 0,95,0,69,0, 86,0,69,0,78, -0,84,0,1,78, +0,84,0,1,68, 1,1,2,0,1, -2023,567,18,1,2023, -465,2,0,1,1442, -568,18,1,1442,160, -2,0,1,2651,569, -18,1,2651,140,2, -0,1,2653,570,18, -1,2653,153,2,0, -1,2655,571,18,1, -2655,334,2,0,1, -2035,572,18,1,2035, -191,2,0,1,2036, -573,18,1,2036,574, -20,575,4,26,74, -0,117,0,109,0, -112,0,83,0,116, -0,97,0,116,0, -101,0,109,0,101, -0,110,0,116,0, -1,116,1,2,2, -0,1,431,576,18, -1,431,143,2,0, -1,2105,577,18,1, -2105,260,2,0,1, -2106,578,18,1,2106, -452,2,0,1,1550, -579,18,1,1550,160, -2,0,1,437,580, -18,1,437,168,2, -0,1,2044,581,18, -1,2044,582,20,583, -4,28,69,0,109, -0,112,0,116,0, -121,0,83,0,116, -0,97,0,116,0, -101,0,109,0,101, +2504,473,18,1,2504, +474,20,475,4,22, +69,0,77,0,65, +0,73,0,76,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,67,1, +1,2,0,1,277, +476,18,1,277,477, +20,478,4,10,83, +0,76,0,65,0, +83,0,72,0,1, +21,1,1,2,0, +1,2506,479,18,1, +2506,480,20,481,4, +34,75,0,101,0, +121,0,73,0,110, +0,116,0,73,0, +110,0,116,0,65, +0,114,0,103,0, +69,0,118,0,101, 0,110,0,116,0, -1,111,1,2,2, -0,1,2045,584,18, -1,2045,191,2,0, -1,1555,585,18,1, -1555,168,2,0,1, -1001,586,18,1,1001, -547,2,0,1,1002, -587,18,1,1002,543, -2,0,1,447,588, -18,1,447,307,2, -0,1,2597,589,18, -1,2597,590,20,591, -4,18,83,0,116, -0,97,0,116,0, -101,0,66,0,111, -0,100,0,121,0, -1,102,1,2,2, -0,1,1010,592,18, -1,1010,160,2,0, -1,1011,593,18,1, -1011,153,2,0,1, -1012,594,18,1,1012, -168,2,0,1,1013, -595,18,1,1013,153, -2,0,1,459,596, -18,1,459,597,20, -598,4,24,76,0, -69,0,70,0,84, -0,95,0,66,0, -82,0,65,0,67, -0,75,0,69,0, -84,0,1,27,1, -1,2,0,1,1574, -599,18,1,1574,191, -2,0,1,461,600, -18,1,461,601,20, -602,4,24,65,0, -114,0,103,0,117, -0,109,0,101,0, -110,0,116,0,76, -0,105,0,115,0, -116,0,1,124,1, -2,2,0,1,462, -603,18,1,462,143, -2,0,1,464,604, -18,1,464,605,20, -606,4,16,65,0, -114,0,103,0,117, -0,109,0,101,0, -110,0,116,0,1, -125,1,2,2,0, -1,2136,607,18,1, -2136,260,2,0,1, -2694,608,18,1,2694, -191,2,0,1,2695, -609,18,1,2695,610, -20,611,4,34,71, -0,108,0,111,0, -98,0,97,0,108, -0,68,0,101,0, -102,0,105,0,110, -0,105,0,116,0, -105,0,111,0,110, -0,115,0,1,97, -1,2,2,0,1, -1585,612,18,1,1585, -613,20,614,4,12, -82,0,69,0,84, -0,85,0,82,0, -78,0,1,50,1, -1,2,0,1,476, -615,18,1,476,616, -20,617,4,30,83, -0,84,0,82,0, -73,0,78,0,71, -0,95,0,67,0, -79,0,78,0,83, -0,84,0,65,0, -78,0,84,0,1, -3,1,1,2,0, -1,477,618,18,1, -477,619,20,620,4, -28,70,0,76,0, -79,0,65,0,84, -0,95,0,67,0, -79,0,78,0,83, -0,84,0,65,0, -78,0,84,0,1, -95,1,1,2,0, -1,478,621,18,1, -478,622,20,623,4, -40,72,0,69,0, -88,0,95,0,73, -0,78,0,84,0, -69,0,71,0,69, -0,82,0,95,0, -67,0,79,0,78, -0,83,0,84,0, -65,0,78,0,84, -0,1,94,1,1, -2,0,1,479,624, -18,1,479,625,20, -626,4,32,73,0, -78,0,84,0,69, -0,71,0,69,0, -82,0,95,0,67, -0,79,0,78,0, -83,0,84,0,65, -0,78,0,84,0, -1,93,1,1,2, -0,1,480,627,18, -1,480,628,20,629, -4,26,82,0,73, -0,71,0,72,0, -84,0,95,0,66, -0,82,0,65,0, -67,0,75,0,69, -0,84,0,1,28, -1,1,2,0,1, -481,630,18,1,481, -605,2,0,1,2713, -631,18,1,2713,632, -20,633,4,48,71, -0,108,0,111,0, -98,0,97,0,108, -0,70,0,117,0, -110,0,99,0,116, -0,105,0,111,0, -110,0,68,0,101, -0,102,0,105,0, -110,0,105,0,116, +1,132,1,2,2, +0,1,2507,482,18, +1,2507,135,2,0, +1,2508,483,18,1, +2508,117,2,0,1, +2509,484,18,1,2509, +132,2,0,1,2510, +485,18,1,2510,486, +20,487,4,28,75, +0,101,0,121,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, 0,105,0,111,0, -110,0,1,99,1, -2,2,0,1,2714, -634,18,1,2714,635, -20,636,4,50,71, -0,108,0,111,0, -98,0,97,0,108, -0,86,0,97,0, -114,0,105,0,97, -0,98,0,108,0, -101,0,68,0,101, +110,0,1,120,1, +2,2,0,1,283, +488,18,1,283,184, +2,0,1,2512,489, +18,1,2512,126,2, +0,1,2513,490,18, +1,2513,132,2,0, +1,2514,491,18,1, +2514,492,20,493,4, +28,73,0,110,0, +116,0,68,0,101, 0,99,0,108,0, 97,0,114,0,97, 0,116,0,105,0, 111,0,110,0,1, -98,1,2,2,0, -1,2715,637,18,1, -2715,632,2,0,1, -2716,638,18,1,2716, -635,2,0,1,2717, -104,1,2634,639,18, -1,2634,447,2,0, -1,1048,640,18,1, -1048,168,2,0,1, -2640,641,18,1,2640, -560,2,0,1,2642, -642,18,1,2642,135, -2,0,1,2042,643, -18,1,2042,644,20, -645,4,20,65,0, -115,0,115,0,105, -0,103,0,110,0, +121,1,2,2,0, +1,1958,494,18,1, +1958,162,2,0,1, +2517,495,18,1,2517, +492,2,0,1,2518, +496,18,1,2518,497, +20,498,4,64,75, +0,101,0,121,0, +73,0,110,0,116, +0,73,0,110,0, +116,0,65,0,114, +0,103,0,117,0, 109,0,101,0,110, -0,116,0,1,112, -1,2,2,0,1, -2043,646,18,1,2043, -191,2,0,1,1620, -647,18,1,1620,160, -2,0,1,1621,648, -18,1,1621,150,2, -0,1,1622,649,18, -1,1622,256,2,0, -1,509,650,18,1, -509,143,2,0,1, -2498,651,18,1,2498, -652,20,653,4,42, -67,0,79,0,76, -0,76,0,73,0, -83,0,73,0,79, -0,78,0,95,0, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,1,118, +1,2,2,0,1, +2519,499,18,1,2519, +162,2,0,1,1406, +500,18,1,1406,176, +2,0,1,1407,501, +18,1,1407,229,2, +0,1,2522,502,18, +1,2522,503,20,504, +4,34,73,0,110, +0,116,0,86,0, +101,0,99,0,86, +0,101,0,99,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,1,131,1,2, +2,0,1,2523,505, +18,1,2523,135,2, +0,1,2525,506,18, +1,2525,492,2,0, +1,2526,507,18,1, +2526,143,2,0,1, +299,508,18,1,299, +509,20,510,4,8, 83,0,84,0,65, -0,82,0,84,0, +0,82,0,1,20, +1,1,2,0,1, +1370,511,18,1,1370, +176,2,0,1,2529, +512,18,1,2529,513, +20,514,4,28,86, +0,101,0,99,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,1,122,1, +2,2,0,1,2530, +515,18,1,2530,143, +2,0,1,2532,516, +18,1,2532,513,2, +0,1,305,517,18, +1,305,184,2,0, +1,2534,518,18,1, +2534,162,2,0,1, +2822,519,18,1,2822, +150,2,0,1,2458, +520,18,1,2458,288, +2,0,1,2459,521, +18,1,2459,212,2, +0,1,2538,522,18, +1,2538,135,2,0, +1,2540,523,18,1, +2540,492,2,0,1, +2541,524,18,1,2541, +143,2,0,1,2542, +525,18,1,2542,111, +2,0,1,2464,526, +18,1,2464,212,2, +0,1,2544,527,18, +1,2544,247,2,0, +1,2545,528,18,1, +2545,143,2,0,1, +1989,529,18,1,1989, +288,2,0,1,1990, +530,18,1,1990,531, +20,532,4,8,69, +0,76,0,83,0, +69,0,1,43,1, +1,2,0,1,2548, +533,18,1,2548,534, +20,535,4,64,73, +0,110,0,116,0, +82,0,111,0,116, +0,82,0,111,0, +116,0,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,1,116, +1,2,2,0,1, +2470,536,18,1,2470, +165,2,0,1,322, +537,18,1,322,250, +2,0,1,2551,538, +18,1,2551,380,2, +0,1,1933,539,18, +1,1933,135,2,0, +1,2553,540,18,1, +2553,135,2,0,1, +883,541,18,1,883, +184,2,0,1,2555, +542,18,1,2555,513, +2,0,1,328,543, +18,1,328,184,2, +0,1,1443,544,18, +1,1443,266,2,0, +1,2559,545,18,1, +2559,380,2,0,1, +2560,546,18,1,2560, +547,20,548,4,22, +73,0,110,0,116, +0,65,0,114,0, +103,0,69,0,118, +0,101,0,110,0, +116,0,1,128,1, +2,2,0,1,2561, +549,18,1,2561,135, +2,0,1,1449,550, +18,1,1449,184,2, +0,1,2485,551,18, +1,2485,552,20,553, +4,30,67,0,79, +0,76,0,76,0, +73,0,83,0,73, +0,79,0,78,0, 95,0,69,0,86, 0,69,0,78,0, -84,0,1,64,1, -1,2,0,1,1628, -654,18,1,1628,168, -2,0,1,515,655, -18,1,515,168,2, -0,1,2505,656,18, -1,2505,657,20,658, -4,10,69,0,118, +84,0,1,62,1, +1,2,0,1,2565, +554,18,1,2565,162, +2,0,1,2488,555, +18,1,2488,556,20, +557,4,24,65,0, +84,0,84,0,65, +0,67,0,72,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,60,1, +1,2,0,1,2489, +558,18,1,2489,559, +20,560,4,22,84, +0,73,0,77,0, +69,0,82,0,95, +0,69,0,86,0, +69,0,78,0,84, +0,1,87,1,1, +2,0,1,2490,561, +18,1,2490,562,20, +563,4,38,78,0, +79,0,84,0,95, +0,65,0,84,0, +95,0,84,0,65, +0,82,0,71,0, +69,0,84,0,95, +0,69,0,86,0, +69,0,78,0,84, +0,1,79,1,1, +2,0,1,2491,564, +18,1,2491,565,20, +566,4,46,78,0, +79,0,84,0,95, +0,65,0,84,0, +95,0,82,0,79, +0,84,0,95,0, +84,0,65,0,82, +0,71,0,69,0, +84,0,95,0,69, +0,86,0,69,0, +78,0,84,0,1, +78,1,1,2,0, +1,2571,567,18,1, +2571,486,2,0,1, +2493,568,18,1,2493, +569,20,570,4,36, +77,0,79,0,86, +0,73,0,78,0, +71,0,95,0,83, +0,84,0,65,0, +82,0,84,0,95, +0,69,0,86,0, +69,0,78,0,84, +0,1,76,1,1, +2,0,1,1413,571, +18,1,1413,184,2, +0,1,346,572,18, +1,346,573,20,574, +4,8,80,0,76, +0,85,0,83,0, +1,18,1,1,2, +0,1,2575,575,18, +1,2575,380,2,0, +1,2496,576,18,1, +2496,577,20,578,4, +34,83,0,84,0, +65,0,84,0,69, +0,95,0,69,0, +78,0,84,0,82, +0,89,0,95,0, +69,0,86,0,69, +0,78,0,84,0, +1,85,1,1,2, +0,1,2577,579,18, +1,2577,135,2,0, +1,2021,580,18,1, +2021,288,2,0,1, +2022,581,18,1,2022, +384,2,0,1,352, +582,18,1,352,184, +2,0,1,2024,583, +18,1,2024,132,2, +0,1,2025,584,18, +1,2025,585,20,586, +4,8,74,0,85, +0,77,0,80,0, +1,49,1,1,2, +0,1,2026,587,18, +1,2026,132,2,0, +1,2027,588,18,1, +2027,589,20,590,4, +4,65,0,84,0, +1,23,1,1,2, +0,1,2028,591,18, +1,2028,132,2,0, +1,2029,592,18,1, +2029,380,2,0,1, +2030,593,18,1,2030, +594,20,595,4,14, +70,0,111,0,114, +0,76,0,111,0, +111,0,112,0,1, +146,1,2,2,0, +1,2031,596,18,1, +2031,597,20,598,4, +32,68,0,111,0, +87,0,104,0,105, +0,108,0,101,0, +83,0,116,0,97, +0,116,0,101,0, +109,0,101,0,110, +0,116,0,1,145, +1,2,2,0,1, +2032,599,18,1,2032, +600,20,601,4,28, +87,0,104,0,105, +0,108,0,101,0, +83,0,116,0,97, +0,116,0,101,0, +109,0,101,0,110, +0,116,0,1,144, +1,2,2,0,1, +2033,602,18,1,2033, +603,20,604,4,22, +73,0,102,0,83, +0,116,0,97,0, +116,0,101,0,109, +0,101,0,110,0, +116,0,1,143,1, +2,2,0,1,2034, +605,18,1,2034,606, +20,607,4,22,83, +0,116,0,97,0, +116,0,101,0,67, +0,104,0,97,0, +110,0,103,0,101, +0,1,142,1,2, +2,0,1,1478,608, +18,1,1478,176,2, +0,1,1479,609,18, +1,1479,309,2,0, +1,2037,610,18,1, +2037,150,2,0,1, +2038,611,18,1,2038, +612,20,613,4,18, +74,0,117,0,109, +0,112,0,76,0, +97,0,98,0,101, +0,108,0,1,140, +1,2,2,0,1, +2039,614,18,1,2039, +150,2,0,1,2040, +615,18,1,2040,616, +20,617,4,30,82, +0,101,0,116,0, +117,0,114,0,110, +0,83,0,116,0, +97,0,116,0,101, +0,109,0,101,0, +110,0,116,0,1, +139,1,2,2,0, +1,2041,618,18,1, +2041,150,2,0,1, +1485,619,18,1,1485, +184,2,0,1,372, +620,18,1,372,196, +2,0,1,373,621, +18,1,373,132,2, +0,1,374,622,18, +1,374,192,2,0, +1,375,623,18,1, +375,132,2,0,1, +376,624,18,1,376, +199,2,0,1,377, +625,18,1,377,132, +2,0,1,378,626, +18,1,378,192,2, +0,1,379,627,18, +1,379,132,2,0, +1,380,628,18,1, +380,629,20,630,4, +16,67,0,111,0, +110,0,115,0,116, +0,97,0,110,0, +116,0,1,152,1, +2,2,0,1,381, +631,18,1,381,328, +2,0,1,371,632, +18,1,371,633,20, +634,4,24,70,0, +117,0,110,0,99, +0,116,0,105,0, +111,0,110,0,67, +0,97,0,108,0, +108,0,1,148,1, +2,2,0,1,942, +635,18,1,942,184, +2,0,1,2533,636, +18,1,2533,637,20, +638,4,64,73,0, +110,0,116,0,86, +0,101,0,99,0, +86,0,101,0,99, +0,65,0,114,0, +103,0,117,0,109, 0,101,0,110,0, -116,0,1,107,1, -2,2,0,1,2664, -659,18,1,2664,168, -2,0,1,525,660, -18,1,525,307,2, -0,1,2197,661,18, -1,2197,160,2,0, -1,2198,662,18,1, -2198,153,2,0,1, -1591,663,18,1,1591, -168,2,0,1,2521, -664,18,1,2521,590, -2,0,1,1094,665, -18,1,1094,601,2, -0,1,1096,666,18, -1,1096,153,2,0, -1,2683,667,18,1, -2683,191,2,0,1, -1657,668,18,1,1657, -191,2,0,1,1658, -669,18,1,1658,670, -20,671,4,6,70, -0,79,0,82,0, -1,46,1,1,2, -0,1,1659,672,18, -1,1659,135,2,0, -1,1665,673,18,1, -1665,168,2,0,1, -1113,674,18,1,1113, -176,2,0,675,5, -0,676,5,324,1, -2,677,19,237,1, -2,678,5,6,1, -2706,679,17,680,15, -681,4,30,37,0, +116,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,76, +0,105,0,115,0, +116,0,1,117,1, +2,2,0,1,387, +639,18,1,387,184, +2,0,1,2536,640, +18,1,2536,380,2, +0,1,2537,641,18, +1,2537,642,20,643, +4,34,73,0,110, +0,116,0,82,0, +111,0,116,0,82, +0,111,0,116,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,1,130,1,2, +2,0,1,2543,644, +18,1,2543,132,2, +0,1,2823,645,18, +1,2823,646,20,647, +4,34,71,0,108, +0,111,0,98,0, +97,0,108,0,68, +0,101,0,102,0, +105,0,110,0,105, +0,116,0,105,0, +111,0,110,0,115, +0,1,98,1,2, +2,0,1,1514,648, +18,1,1514,176,2, +0,1,1515,649,18, +1,1515,335,2,0, +1,2549,650,18,1, +2549,162,2,0,1, +2074,651,18,1,2074, +176,2,0,1,2075, +652,18,1,2075,162, +2,0,1,2552,653, +18,1,2552,654,20, +655,4,28,86,0, +101,0,99,0,116, +0,111,0,114,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,1,129,1,2, +2,0,1,406,656, +18,1,406,143,2, +0,1,1521,657,18, +1,1521,184,2,0, +1,2556,658,18,1, +2556,659,20,660,4, +58,86,0,101,0, +99,0,116,0,111, +0,114,0,65,0, +114,0,103,0,117, +0,109,0,101,0, +110,0,116,0,68, +0,101,0,99,0, +108,0,97,0,114, +0,97,0,116,0, +105,0,111,0,110, +0,76,0,105,0, +115,0,116,0,1, +115,1,2,2,0, +1,2557,661,18,1, +2557,162,2,0,1, +412,662,18,1,412, +184,2,0,1,2641, +663,18,1,2641,168, +2,0,1,2484,664, +18,1,2484,665,20, +666,4,38,67,0, +79,0,76,0,76, +0,73,0,83,0, +73,0,79,0,78, +0,95,0,69,0, +78,0,68,0,95, +0,69,0,86,0, +69,0,78,0,84, +0,1,63,1,1, +2,0,1,2643,667, +18,1,2643,668,20, +669,4,44,73,0, +110,0,116,0,82, +0,111,0,116,0, +82,0,111,0,116, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, +0,101,0,110,0, +116,0,1,109,1, +2,2,0,1,2644, +670,18,1,2644,671, +20,672,4,38,86, +0,101,0,99,0, +116,0,111,0,114, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, +0,101,0,110,0, +116,0,1,108,1, +2,2,0,1,2023, +673,18,1,2023,282, +2,0,1,2564,674, +18,1,2564,675,20, +676,4,52,73,0, +110,0,116,0,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,76,0,105, +0,115,0,116,0, +1,114,1,2,2, +0,1,2647,677,18, +1,2647,678,20,679, +4,34,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,83,0,116,0, +97,0,116,0,101, +0,69,0,118,0, +101,0,110,0,116, +0,1,105,1,2, +2,0,1,2648,680, +18,1,2648,279,2, +0,1,2567,681,18, +1,2567,380,2,0, +1,1442,682,18,1, +1442,176,2,0,1, +2569,683,18,1,2569, +135,2,0,1,2652, +684,18,1,2652,668, +2,0,1,2653,685, +18,1,2653,671,2, +0,1,2572,686,18, +1,2572,687,20,688, +4,52,75,0,101, +0,121,0,65,0, +114,0,103,0,117, +0,109,0,101,0, +110,0,116,0,68, +0,101,0,99,0, +108,0,97,0,114, +0,97,0,116,0, +105,0,111,0,110, +0,76,0,105,0, +115,0,116,0,1, +113,1,2,2,0, +1,2573,689,18,1, +2573,162,2,0,1, +2656,690,18,1,2656, +678,2,0,1,2035, +691,18,1,2035,150, +2,0,1,2036,692, +18,1,2036,693,20, +694,4,26,74,0, +117,0,109,0,112, +0,83,0,116,0, +97,0,116,0,101, +0,109,0,101,0, +110,0,116,0,1, +141,1,2,2,0, +1,431,695,18,1, +431,143,2,0,1, +2578,696,18,1,2578, +162,2,0,1,2105, +697,18,1,2105,288, +2,0,1,2106,698, +18,1,2106,531,2, +0,1,1550,699,18, +1,1550,176,2,0, +1,437,700,18,1, +437,184,2,0,1, +2044,701,18,1,2044, +702,20,703,4,28, +69,0,109,0,112, +0,116,0,121,0, +83,0,116,0,97, +0,116,0,101,0, +109,0,101,0,110, +0,116,0,1,136, +1,2,2,0,1, +2045,704,18,1,2045, +150,2,0,1,1555, +705,18,1,1555,184, +2,0,1,2511,706, +18,1,2511,143,2, +0,1,1001,707,18, +1,1001,633,2,0, +1,1002,708,18,1, +1002,629,2,0,1, +447,709,18,1,447, +347,2,0,1,2593, +710,18,1,2593,162, +2,0,1,2595,711, +18,1,2595,380,2, +0,1,2597,712,18, +1,2597,713,20,714, +4,18,83,0,116, +0,97,0,116,0, +101,0,66,0,111, +0,100,0,121,0, +1,103,1,2,2, +0,1,1010,715,18, +1,1010,176,2,0, +1,1011,716,18,1, +1011,162,2,0,1, +1012,717,18,1,1012, +184,2,0,1,1013, +718,18,1,1013,162, +2,0,1,459,719, +18,1,459,720,20, +721,4,24,76,0, +69,0,70,0,84, +0,95,0,66,0, +82,0,65,0,67, +0,75,0,69,0, +84,0,1,27,1, +1,2,0,1,1574, +722,18,1,1574,150, +2,0,1,461,723, +18,1,461,724,20, +725,4,24,65,0, +114,0,103,0,117, +0,109,0,101,0, +110,0,116,0,76, +0,105,0,115,0, +116,0,1,149,1, +2,2,0,1,462, +726,18,1,462,143, +2,0,1,464,727, +18,1,464,728,20, +729,4,16,65,0, +114,0,103,0,117, +0,109,0,101,0, +110,0,116,0,1, +150,1,2,2,0, +1,2136,730,18,1, +2136,288,2,0,1, +1585,731,18,1,1585, +732,20,733,4,12, +82,0,69,0,84, +0,85,0,82,0, +78,0,1,50,1, +1,2,0,1,2703, +734,18,1,2703,713, +2,0,1,476,735, +18,1,476,736,20, +737,4,30,83,0, +84,0,82,0,73, +0,78,0,71,0, +95,0,67,0,79, +0,78,0,83,0, +84,0,65,0,78, +0,84,0,1,3, +1,1,2,0,1, +477,738,18,1,477, +739,20,740,4,28, +70,0,76,0,79, +0,65,0,84,0, +95,0,67,0,79, +0,78,0,83,0, +84,0,65,0,78, +0,84,0,1,96, +1,1,2,0,1, +478,741,18,1,478, +742,20,743,4,40, +72,0,69,0,88, +0,95,0,73,0, +78,0,84,0,69, +0,71,0,69,0, +82,0,95,0,67, +0,79,0,78,0, +83,0,84,0,65, +0,78,0,84,0, +1,95,1,1,2, +0,1,479,744,18, +1,479,745,20,746, +4,32,73,0,78, +0,84,0,69,0, +71,0,69,0,82, +0,95,0,67,0, +79,0,78,0,83, +0,84,0,65,0, +78,0,84,0,1, +94,1,1,2,0, +1,480,747,18,1, +480,748,20,749,4, +26,82,0,73,0, +71,0,72,0,84, +0,95,0,66,0, +82,0,65,0,67, +0,75,0,69,0, +84,0,1,28,1, +1,2,0,1,481, +750,18,1,481,728, +2,0,1,1048,751, +18,1,1048,184,2, +0,1,2642,752,18, +1,2642,171,2,0, +1,2563,753,18,1, +2563,492,2,0,1, +2042,754,18,1,2042, +755,20,756,4,20, +65,0,115,0,115, +0,105,0,103,0, +110,0,109,0,101, +0,110,0,116,0, +1,137,1,2,2, +0,1,2043,757,18, +1,2043,150,2,0, +1,2568,758,18,1, +2568,759,20,760,4, +22,75,0,101,0, +121,0,65,0,114, +0,103,0,69,0, +118,0,101,0,110, +0,116,0,1,127, +1,2,2,0,1, +2649,761,18,1,2649, +212,2,0,1,1620, +762,18,1,1620,176, +2,0,1,1621,763, +18,1,1621,159,2, +0,1,1622,764,18, +1,1622,335,2,0, +1,509,765,18,1, +509,143,2,0,1, +2498,766,18,1,2498, +767,20,768,4,36, +72,0,84,0,84, +0,80,0,95,0, +82,0,69,0,81, +0,85,0,69,0, +83,0,84,0,95, +0,69,0,86,0, +69,0,78,0,84, +0,1,91,1,1, +2,0,1,2655,769, +18,1,2655,156,2, +0,1,2576,770,18, +1,2576,771,20,772, +4,24,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,1,126,1,2, +2,0,1,1628,773, +18,1,1628,184,2, +0,1,515,774,18, +1,515,184,2,0, +1,2580,775,18,1, +2580,380,2,0,1, +2505,776,18,1,2505, +777,20,778,4,32, +68,0,65,0,84, +0,65,0,83,0, +69,0,82,0,86, +0,69,0,82,0, +95,0,69,0,86, +0,69,0,78,0, +84,0,1,66,1, +1,2,0,1,2582, +779,18,1,2582,135, +2,0,1,525,780, +18,1,525,347,2, +0,1,2197,781,18, +1,2197,176,2,0, +1,2198,782,18,1, +2198,162,2,0,1, +1591,783,18,1,1591, +184,2,0,1,2521, +784,18,1,2521,380, +2,0,1,2764,785, +18,1,2764,300,2, +0,1,1094,786,18, +1,1094,724,2,0, +1,1096,787,18,1, +1096,162,2,0,1, +2768,788,18,1,2768, +319,2,0,1,2769, +789,18,1,2769,132, +2,0,1,2770,790, +18,1,2770,135,2, +0,1,1657,791,18, +1,1657,150,2,0, +1,1658,792,18,1, +1658,793,20,794,4, +6,70,0,79,0, +82,0,1,46,1, +1,2,0,1,1659, +795,18,1,1659,135, +2,0,1,1665,796, +18,1,1665,184,2, +0,1,2781,797,18, +1,2781,162,2,0, +1,2783,798,18,1, +2783,380,2,0,1, +1113,799,18,1,1113, +192,2,0,800,5, +0,801,5,381,1, +2,802,19,371,1, +2,803,5,6,1, +2764,804,17,805,15, +806,4,30,37,0, 76,0,83,0,76, 0,80,0,114,0, 111,0,103,0,114, 0,97,0,109,0, 82,0,111,0,111, 0,116,0,1,-1, -1,5,682,20,683, +1,5,807,20,808, 4,32,76,0,83, 0,76,0,80,0, 114,0,111,0,103, 0,114,0,97,0, 109,0,82,0,111, 0,111,0,116,0, -95,0,49,0,1, -142,1,3,1,3, -1,2,684,22,1, -1,1,2640,685,17, -686,15,687,4,14, +95,0,50,0,1, +168,1,3,1,2, +1,1,809,22,1, +2,1,2768,810,17, +811,15,812,4,14, 37,0,83,0,116, 0,97,0,116,0, 101,0,115,0,1, --1,1,5,688,20, -689,4,16,83,0, +-1,1,5,813,20, +814,4,16,83,0, 116,0,97,0,116, 0,101,0,115,0, 95,0,49,0,1, -152,1,3,1,2, -1,1,690,22,1, -11,1,2634,691,17, -692,15,693,4,12, +177,1,3,1,2, +1,1,815,22,1, +11,1,2755,816,17, +817,15,818,4,12, 37,0,83,0,116, 0,97,0,116,0, 101,0,1,-1,1, -5,694,20,695,4, +5,819,20,820,4, 14,83,0,116,0, 97,0,116,0,101, 0,95,0,49,0, -1,154,1,3,1, -5,1,4,696,22, -1,13,1,2558,697, -17,698,15,693,1, --1,1,5,699,20, -700,4,14,83,0, +1,179,1,3,1, +5,1,4,821,22, +1,13,1,2767,822, +17,823,15,812,1, +-1,1,5,824,20, +825,4,16,83,0, 116,0,97,0,116, -0,101,0,95,0, -50,0,1,155,1, -3,1,6,1,5, -701,22,1,14,1, -2636,702,17,703,15, -681,1,-1,1,5, -704,20,705,4,32, -76,0,83,0,76, -0,80,0,114,0, -111,0,103,0,114, -0,97,0,109,0, -82,0,111,0,111, -0,116,0,95,0, -50,0,1,143,1, -3,1,2,1,1, -706,22,1,2,1, -2639,707,17,708,15, -687,1,-1,1,5, -709,20,710,4,16, -83,0,116,0,97, -0,116,0,101,0, -115,0,95,0,50, -0,1,153,1,3, -1,3,1,2,711, -22,1,12,1,3, -712,19,617,1,3, -713,5,95,1,256, -714,16,0,615,1, -1261,715,16,0,615, -1,509,716,16,0, -615,1,1515,717,16, -0,615,1,2021,718, -17,719,15,720,4, +0,101,0,115,0, +95,0,50,0,1, +178,1,3,1,3, +1,2,826,22,1, +12,1,2834,827,17, +828,15,806,1,-1, +1,5,829,20,830, +4,32,76,0,83, +0,76,0,80,0, +114,0,111,0,103, +0,114,0,97,0, +109,0,82,0,111, +0,111,0,116,0, +95,0,49,0,1, +167,1,3,1,3, +1,2,831,22,1, +1,1,2649,832,17, +833,15,818,1,-1, +1,5,834,20,835, +4,14,83,0,116, +0,97,0,116,0, +101,0,95,0,50, +0,1,180,1,3, +1,6,1,5,836, +22,1,14,1,3, +837,19,737,1,3, +838,5,95,1,256, +839,16,0,735,1, +1261,840,16,0,735, +1,509,841,16,0, +735,1,1515,842,16, +0,735,1,2021,843, +17,844,15,845,4, 24,37,0,73,0, 102,0,83,0,116, 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, -1,-1,1,5,721, -20,722,4,26,73, +1,-1,1,5,846, +20,847,4,26,73, 0,102,0,83,0, 116,0,97,0,116, 0,101,0,109,0, 101,0,110,0,116, 0,95,0,50,0, -1,185,1,3,1, -8,1,7,723,22, -1,45,1,1775,724, -16,0,615,1,2029, -725,17,726,15,727, +1,241,1,3,1, +8,1,7,848,22, +1,76,1,1775,849, +16,0,735,1,2029, +850,17,851,15,852, 4,20,37,0,83, 0,116,0,97,0, 116,0,101,0,109, 0,101,0,110,0, 116,0,1,-1,1, -5,728,20,729,4, +5,853,20,854,4, 24,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, 0,49,0,51,0, -1,179,1,3,1, -2,1,1,730,22, -1,39,1,2030,731, -17,732,15,727,1, --1,1,5,733,20, -734,4,24,83,0, +1,235,1,3,1, +2,1,1,855,22, +1,70,1,2030,856, +17,857,15,852,1, +-1,1,5,858,20, +859,4,24,83,0, 116,0,97,0,116, 0,101,0,109,0, 101,0,110,0,116, 0,95,0,49,0, -50,0,1,178,1, +50,0,1,234,1, 3,1,2,1,1, -735,22,1,38,1, -2031,736,17,737,15, -727,1,-1,1,5, -738,20,739,4,24, +860,22,1,69,1, +2031,861,17,862,15, +852,1,-1,1,5, +863,20,864,4,24, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, 49,0,49,0,1, -177,1,3,1,2, -1,1,740,22,1, -37,1,2032,741,17, -742,15,727,1,-1, -1,5,743,20,744, +233,1,3,1,2, +1,1,865,22,1, +68,1,2032,866,17, +867,15,852,1,-1, +1,5,868,20,869, 4,24,83,0,116, 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, 95,0,49,0,48, -0,1,176,1,3, -1,2,1,1,745, -22,1,36,1,2033, -746,17,747,15,727, -1,-1,1,5,748, -20,749,4,22,83, +0,1,232,1,3, +1,2,1,1,870, +22,1,67,1,2033, +871,17,872,15,852, +1,-1,1,5,873, +20,874,4,22,83, 0,116,0,97,0, 116,0,101,0,109, 0,101,0,110,0, 116,0,95,0,57, -0,1,175,1,3, -1,2,1,1,750, -22,1,35,1,277, -751,16,0,615,1, -2035,752,17,753,15, -727,1,-1,1,5, -754,20,755,4,22, +0,1,231,1,3, +1,2,1,1,875, +22,1,66,1,277, +876,16,0,735,1, +2035,877,17,878,15, +852,1,-1,1,5, +879,20,880,4,22, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -56,0,1,174,1, +56,0,1,230,1, 3,1,3,1,2, -756,22,1,34,1, -2037,757,17,758,15, -727,1,-1,1,5, -759,20,760,4,22, +881,22,1,65,1, +2037,882,17,883,15, +852,1,-1,1,5, +884,20,885,4,22, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -55,0,1,173,1, +55,0,1,229,1, 3,1,3,1,2, -761,22,1,33,1, -2039,762,17,763,15, -727,1,-1,1,5, -764,20,765,4,22, +886,22,1,64,1, +2039,887,17,888,15, +852,1,-1,1,5, +889,20,890,4,22, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -54,0,1,172,1, +54,0,1,228,1, 3,1,3,1,2, -766,22,1,32,1, -32,767,16,0,615, -1,2041,768,17,769, -15,727,1,-1,1, -5,770,20,771,4, +891,22,1,63,1, +32,892,16,0,735, +1,2041,893,17,894, +15,852,1,-1,1, +5,895,20,896,4, 22,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,53,0,1,171, +0,53,0,1,227, 1,3,1,3,1, -2,772,22,1,31, -1,2293,773,16,0, -615,1,2043,774,17, -775,15,727,1,-1, -1,5,776,20,777, +2,897,22,1,62, +1,2293,898,16,0, +735,1,2043,899,17, +900,15,852,1,-1, +1,5,901,20,902, 4,22,83,0,116, 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, 95,0,51,0,1, -169,1,3,1,3, -1,2,778,22,1, -29,1,2045,779,17, -780,15,727,1,-1, -1,5,781,20,782, +225,1,3,1,3, +1,2,903,22,1, +60,1,2045,904,17, +905,15,852,1,-1, +1,5,906,20,907, 4,22,83,0,116, 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, 95,0,49,0,1, -167,1,3,1,3, -1,2,783,22,1, -27,1,41,784,16, -0,615,1,1297,785, -16,0,615,1,43, -786,16,0,615,1, -1803,787,17,788,15, -789,4,16,37,0, +223,1,3,1,3, +1,2,908,22,1, +58,1,41,909,16, +0,735,1,1297,910, +16,0,735,1,43, +911,16,0,735,1, +1803,912,17,913,15, +914,4,16,37,0, 70,0,111,0,114, 0,76,0,111,0, 111,0,112,0,1, --1,1,5,790,20, -791,4,18,70,0, +-1,1,5,915,20, +916,4,18,70,0, 111,0,114,0,76, 0,111,0,111,0, 112,0,95,0,49, -0,1,192,1,3, -1,10,1,9,792, -22,1,52,1,1804, -793,16,0,615,1, -299,794,16,0,615, -1,52,795,16,0, -615,1,2318,796,16, -0,615,1,62,797, -16,0,615,1,2075, -798,16,0,615,1, -1574,799,17,800,15, -727,1,-1,1,5, -801,20,802,4,22, +0,1,248,1,3, +1,10,1,9,917, +22,1,83,1,1804, +918,16,0,735,1, +299,919,16,0,735, +1,52,920,16,0, +735,1,2318,921,16, +0,735,1,62,922, +16,0,735,1,2075, +923,16,0,735,1, +1574,924,17,925,15, +852,1,-1,1,5, +926,20,927,4,22, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -52,0,1,170,1, +52,0,1,226,1, 3,1,3,1,2, -803,22,1,30,1, -71,804,16,0,615, -1,76,805,16,0, -615,1,1834,806,16, -0,615,1,2337,807, -16,0,615,1,79, -808,16,0,615,1, -1335,809,16,0,615, -1,322,810,16,0, -615,1,85,811,16, -0,615,1,89,812, -16,0,615,1,346, -813,16,0,615,1, -2105,814,17,815,15, -720,1,-1,1,5, -816,20,817,4,26, +928,22,1,61,1, +71,929,16,0,735, +1,76,930,16,0, +735,1,1834,931,16, +0,735,1,2337,932, +16,0,735,1,79, +933,16,0,735,1, +1335,934,16,0,735, +1,322,935,16,0, +735,1,85,936,16, +0,735,1,89,937, +16,0,735,1,346, +938,16,0,735,1, +2105,939,17,940,15, +845,1,-1,1,5, +941,20,942,4,26, 73,0,102,0,83, 0,116,0,97,0, 116,0,101,0,109, 0,101,0,110,0, 116,0,95,0,51, -0,1,186,1,3, -1,6,1,5,818, -22,1,46,1,2106, -819,16,0,615,1, -97,820,16,0,615, -1,1860,821,17,822, -15,823,4,34,37, +0,1,242,1,3, +1,6,1,5,943, +22,1,77,1,2106, +944,16,0,735,1, +97,945,16,0,735, +1,1860,946,17,947, +15,948,4,34,37, 0,68,0,111,0, 87,0,104,0,105, 0,108,0,101,0, @@ -3635,7 +4427,7 @@ public yyLSLSyntax 0,116,0,101,0, 109,0,101,0,110, 0,116,0,1,-1, -1,5,824,20,825, +1,5,949,20,950, 4,36,68,0,111, 0,87,0,104,0, 105,0,108,0,101, @@ -3643,66 +4435,66 @@ public yyLSLSyntax 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,49,0,1,190, +0,49,0,1,246, 1,3,1,8,1, -7,826,22,1,50, -1,2364,827,17,828, -15,789,1,-1,1, -5,829,20,830,4, +7,951,22,1,81, +1,2364,952,17,953, +15,914,1,-1,1, +5,954,20,955,4, 18,70,0,111,0, 114,0,76,0,111, 0,111,0,112,0, 95,0,50,0,1, -193,1,3,1,9, -1,8,831,22,1, -53,1,102,832,16, -0,615,1,112,833, -16,0,615,1,1117, -834,16,0,615,1, -1873,835,17,836,15, -823,1,-1,1,5, -837,20,838,4,36, -68,0,111,0,87, -0,104,0,105,0, -108,0,101,0,83, -0,116,0,97,0, -116,0,101,0,109, -0,101,0,110,0, -116,0,95,0,50, -0,1,191,1,3, -1,8,1,7,839, -22,1,51,1,1876, -840,16,0,615,1, -124,841,16,0,615, -1,2136,842,17,843, -15,720,1,-1,1, -5,844,20,845,4, -26,73,0,102,0, +249,1,3,1,9, +1,8,956,22,1, +84,1,102,957,16, +0,735,1,112,958, +16,0,735,1,1117, +959,16,0,735,1, +2786,960,16,0,735, +1,1873,961,17,962, +15,948,1,-1,1, +5,963,20,964,4, +36,68,0,111,0, +87,0,104,0,105, +0,108,0,101,0, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -52,0,1,187,1, +50,0,1,247,1, 3,1,8,1,7, -846,22,1,47,1, -381,847,16,0,615, -1,525,848,16,0, -615,1,137,849,16, -0,615,1,1901,850, -16,0,615,1,2658, -851,16,0,615,1, -1153,852,16,0,615, -1,151,853,16,0, -615,1,1407,854,16, -0,615,1,1659,855, -16,0,615,1,2413, -856,16,0,615,1, -406,857,16,0,615, -1,1371,858,16,0, -615,1,166,859,16, -0,615,1,1622,860, -16,0,615,1,1931, -861,17,862,15,863, +965,22,1,82,1, +1876,966,16,0,735, +1,124,967,16,0, +735,1,2136,968,17, +969,15,845,1,-1, +1,5,970,20,971, +4,26,73,0,102, +0,83,0,116,0, +97,0,116,0,101, +0,109,0,101,0, +110,0,116,0,95, +0,52,0,1,243, +1,3,1,8,1, +7,972,22,1,78, +1,381,973,16,0, +735,1,525,974,16, +0,735,1,137,975, +16,0,735,1,1901, +976,16,0,735,1, +1153,977,16,0,735, +1,151,978,16,0, +735,1,1407,979,16, +0,735,1,1659,980, +16,0,735,1,2413, +981,16,0,735,1, +406,982,16,0,735, +1,1371,983,16,0, +735,1,166,984,16, +0,735,1,1622,985, +16,0,735,1,1931, +986,17,987,15,988, 4,30,37,0,87, 0,104,0,105,0, 108,0,101,0,83, @@ -3710,46 +4502,46 @@ public yyLSLSyntax 116,0,101,0,109, 0,101,0,110,0, 116,0,1,-1,1, -5,864,20,865,4, +5,989,20,990,4, 32,87,0,104,0, 105,0,108,0,101, 0,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,49,0,1,188, +0,49,0,1,244, 1,3,1,6,1, -5,866,22,1,48, -1,1933,867,16,0, -615,1,431,868,16, -0,615,1,1585,869, -16,0,615,1,182, -870,16,0,615,1, -1189,871,16,0,615, -1,1443,872,16,0, -615,1,1695,873,16, -0,615,1,2198,874, -16,0,615,1,447, -875,16,0,615,1, -2458,876,17,877,15, -878,4,28,37,0, +5,991,22,1,79, +1,1933,992,16,0, +735,1,431,993,16, +0,735,1,1585,994, +16,0,735,1,182, +995,16,0,735,1, +1189,996,16,0,735, +1,1443,997,16,0, +735,1,1695,998,16, +0,735,1,2198,999, +16,0,735,1,447, +1000,16,0,735,1, +2458,1001,17,1002,15, +1003,4,28,37,0, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,76,0, 105,0,115,0,116, 0,1,-1,1,5, -879,20,880,4,30, +1004,20,1005,4,30, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,76,0, 105,0,115,0,116, 0,95,0,50,0, -1,165,1,3,1, -3,1,2,881,22, -1,25,1,2459,882, -17,883,15,884,4, +1,221,1,3,1, +3,1,2,1006,22, +1,56,1,2459,1007, +17,1008,15,1009,4, 36,37,0,67,0, 111,0,109,0,112, 0,111,0,117,0, @@ -3758,7 +4550,7 @@ public yyLSLSyntax 116,0,101,0,109, 0,101,0,110,0, 116,0,1,-1,1, -5,885,20,886,4, +5,1010,20,1011,4, 38,67,0,111,0, 109,0,112,0,111, 0,117,0,110,0, @@ -3767,34 +4559,34 @@ public yyLSLSyntax 101,0,109,0,101, 0,110,0,116,0, 95,0,50,0,1, -163,1,3,1,4, -1,3,887,22,1, -23,1,1958,888,16, -0,615,1,2462,889, -17,890,15,878,1, --1,1,5,891,20, -892,4,30,83,0, +219,1,3,1,4, +1,3,1012,22,1, +54,1,1958,1013,16, +0,735,1,2462,1014, +17,1015,15,1003,1, +-1,1,5,1016,20, +1017,4,30,83,0, 116,0,97,0,116, 0,101,0,109,0, 101,0,110,0,116, 0,76,0,105,0, 115,0,116,0,95, -0,49,0,1,164, +0,49,0,1,220, 1,3,1,2,1, -1,893,22,1,24, -1,1657,894,17,895, -15,727,1,-1,1, -5,896,20,897,4, +1,1018,22,1,55, +1,1657,1019,17,1020, +15,852,1,-1,1, +5,1021,20,1022,4, 22,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,50,0,1,168, +0,50,0,1,224, 1,3,1,3,1, -2,898,22,1,28, -1,2464,899,17,900, -15,884,1,-1,1, -5,901,20,902,4, +2,1023,22,1,59, +1,2464,1024,17,1025, +15,1009,1,-1,1, +5,1026,20,1027,4, 38,67,0,111,0, 109,0,112,0,111, 0,117,0,110,0, @@ -3803,280 +4595,280 @@ public yyLSLSyntax 101,0,109,0,101, 0,110,0,116,0, 95,0,49,0,1, -162,1,3,1,3, -1,2,903,22,1, -22,1,199,904,16, -0,615,1,459,905, -16,0,615,1,462, -906,16,0,615,1, -217,907,16,0,615, -1,2227,908,17,909, -15,863,1,-1,1, -5,910,20,911,4, +218,1,3,1,3, +1,2,1028,22,1, +53,1,199,1029,16, +0,735,1,459,1030, +16,0,735,1,462, +1031,16,0,735,1, +217,1032,16,0,735, +1,2227,1033,17,1034, +15,988,1,-1,1, +5,1035,20,1036,4, 32,87,0,104,0, 105,0,108,0,101, 0,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,50,0,1,189, +0,50,0,1,245, 1,3,1,6,1, -5,912,22,1,49, -1,1225,913,16,0, -615,1,1479,914,16, -0,615,1,1731,915, -16,0,615,1,1989, -916,17,917,15,720, -1,-1,1,5,918, -20,919,4,26,73, +5,1037,22,1,80, +1,1225,1038,16,0, +735,1,1479,1039,16, +0,735,1,1731,1040, +16,0,735,1,1989, +1041,17,1042,15,845, +1,-1,1,5,1043, +20,1044,4,26,73, 0,102,0,83,0, 116,0,97,0,116, 0,101,0,109,0, 101,0,110,0,116, 0,95,0,49,0, -1,184,1,3,1, -6,1,5,920,22, -1,44,1,1990,921, -16,0,615,1,236, -922,16,0,615,1, -1756,923,16,0,615, -1,4,924,19,184, -1,4,925,5,100, -1,256,926,16,0, -538,1,1261,927,16, -0,538,1,509,928, -16,0,538,1,1515, -929,16,0,538,1, -2021,718,1,1775,930, -16,0,538,1,2029, -725,1,2030,731,1, -2031,736,1,2032,741, -1,2033,746,1,277, -931,16,0,538,1, -2035,752,1,2037,757, -1,2039,762,1,32, -932,16,0,538,1, -2041,768,1,2293,933, -16,0,538,1,2043, -774,1,2045,779,1, -40,934,16,0,186, -1,41,935,16,0, -538,1,1297,936,16, -0,538,1,43,937, -16,0,538,1,44, -938,16,0,186,1, -1803,787,1,1804,939, -16,0,538,1,299, -940,16,0,538,1, -47,941,16,0,182, -1,52,942,16,0, -538,1,2318,943,16, -0,538,1,63,944, -16,0,201,1,66, -945,16,0,199,1, -2075,946,16,0,538, -1,1574,799,1,71, -947,16,0,538,1, -76,948,16,0,538, -1,1834,949,16,0, -538,1,2337,950,16, -0,538,1,79,951, -16,0,538,1,1335, -952,16,0,538,1, -322,953,16,0,538, -1,85,954,16,0, -538,1,89,955,16, -0,538,1,346,956, -16,0,538,1,97, -957,16,0,538,1, -2106,958,16,0,538, -1,102,959,16,0, -538,1,1860,821,1, -2364,827,1,1114,960, -16,0,182,1,112, -961,16,0,538,1, -1117,962,16,0,538, -1,1873,835,1,1876, -963,16,0,538,1, -124,964,16,0,538, -1,2136,842,1,381, -965,16,0,538,1, -525,966,16,0,538, -1,137,967,16,0, -538,1,1901,968,16, -0,538,1,2658,969, -16,0,538,1,1153, -970,16,0,538,1, -151,971,16,0,538, -1,1407,972,16,0, -538,1,1659,973,16, -0,538,1,2413,974, -16,0,538,1,406, -975,16,0,538,1, -1371,976,16,0,538, -1,2105,814,1,166, -977,16,0,538,1, -1622,978,16,0,538, -1,1931,861,1,1933, -979,16,0,538,1, -431,980,16,0,538, -1,1585,981,16,0, -538,1,182,982,16, -0,538,1,1189,983, -16,0,538,1,1443, -984,16,0,538,1, -1695,985,16,0,538, -1,2198,986,16,0, -538,1,447,987,16, -0,538,1,2458,876, -1,2459,882,1,1958, -988,16,0,538,1, -2462,889,1,1657,894, -1,2464,899,1,199, -989,16,0,538,1, -459,990,16,0,538, -1,462,991,16,0, -538,1,217,992,16, -0,538,1,2227,908, -1,1225,993,16,0, -538,1,1479,994,16, -0,538,1,1731,995, -16,0,538,1,1989, -916,1,1990,996,16, -0,538,1,236,997, -16,0,538,1,1756, -998,16,0,538,1, -5,999,19,181,1, -5,1000,5,100,1, -256,1001,16,0,534, -1,1261,1002,16,0, -534,1,509,1003,16, -0,534,1,1515,1004, -16,0,534,1,2021, -718,1,1775,1005,16, -0,534,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,277,1006, -16,0,534,1,2035, -752,1,2037,757,1, -2039,762,1,32,1007, -16,0,534,1,2041, -768,1,2293,1008,16, -0,534,1,2043,774, -1,2045,779,1,40, -1009,16,0,185,1, -41,1010,16,0,534, -1,1297,1011,16,0, -534,1,43,1012,16, -0,534,1,44,1013, -16,0,185,1,1803, -787,1,1804,1014,16, -0,534,1,299,1015, -16,0,534,1,47, -1016,16,0,179,1, -52,1017,16,0,534, -1,2318,1018,16,0, -534,1,63,1019,16, -0,200,1,66,1020, -16,0,198,1,2075, -1021,16,0,534,1, -1574,799,1,71,1022, -16,0,534,1,76, -1023,16,0,534,1, -1834,1024,16,0,534, -1,2337,1025,16,0, -534,1,79,1026,16, -0,534,1,1335,1027, -16,0,534,1,322, -1028,16,0,534,1, -85,1029,16,0,534, -1,89,1030,16,0, -534,1,346,1031,16, -0,534,1,97,1032, -16,0,534,1,2106, -1033,16,0,534,1, -102,1034,16,0,534, -1,1860,821,1,2364, -827,1,1114,1035,16, -0,179,1,112,1036, -16,0,534,1,1117, -1037,16,0,534,1, -1873,835,1,1876,1038, -16,0,534,1,124, -1039,16,0,534,1, -2136,842,1,381,1040, -16,0,534,1,525, -1041,16,0,534,1, -137,1042,16,0,534, -1,1901,1043,16,0, -534,1,2658,1044,16, -0,534,1,1153,1045, -16,0,534,1,151, -1046,16,0,534,1, -1407,1047,16,0,534, -1,1659,1048,16,0, -534,1,2413,1049,16, -0,534,1,406,1050, -16,0,534,1,1371, -1051,16,0,534,1, -2105,814,1,166,1052, -16,0,534,1,1622, -1053,16,0,534,1, -1931,861,1,1933,1054, -16,0,534,1,431, -1055,16,0,534,1, -1585,1056,16,0,534, -1,182,1057,16,0, -534,1,1189,1058,16, -0,534,1,1443,1059, -16,0,534,1,1695, -1060,16,0,534,1, -2198,1061,16,0,534, -1,447,1062,16,0, -534,1,2458,876,1, -2459,882,1,1958,1063, -16,0,534,1,2462, -889,1,1657,894,1, -2464,899,1,199,1064, -16,0,534,1,459, -1065,16,0,534,1, -462,1066,16,0,534, -1,217,1067,16,0, -534,1,2227,908,1, -1225,1068,16,0,534, -1,1479,1069,16,0, -534,1,1731,1070,16, -0,534,1,1989,916, -1,1990,1071,16,0, -534,1,236,1072,16, -0,534,1,1756,1073, -16,0,534,1,6, -1074,19,277,1,6, -1075,5,2,1,1114, -1076,16,0,275,1, -40,1077,16,0,523, -1,7,1078,19,243, -1,7,1079,5,2, -1,1114,1080,16,0, -241,1,40,1081,16, -0,459,1,8,1082, -19,207,1,8,1083, -5,2,1,1114,1084, -16,0,205,1,40, -1085,16,0,439,1, -9,1086,19,213,1, -9,1087,5,2,1, -1114,1088,16,0,211, -1,40,1089,16,0, -384,1,10,1090,19, -164,1,10,1091,5, -2,1,1114,1092,16, -0,162,1,40,1093, -16,0,324,1,11, -1094,19,192,1,11, -1095,5,146,1,1260, -1096,17,1097,15,1098, +1,240,1,3,1, +6,1,5,1045,22, +1,75,1,1990,1046, +16,0,735,1,236, +1047,16,0,735,1, +1756,1048,16,0,735, +1,4,1049,19,200, +1,4,1050,5,100, +1,256,1051,16,0, +624,1,1261,1052,16, +0,624,1,509,1053, +16,0,624,1,1515, +1054,16,0,624,1, +2021,843,1,1775,1055, +16,0,624,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2033,871,1,277, +1056,16,0,624,1, +2035,877,1,2037,882, +1,2039,887,1,32, +1057,16,0,624,1, +2041,893,1,2293,1058, +16,0,624,1,2043, +899,1,2045,904,1, +40,1059,16,0,202, +1,41,1060,16,0, +624,1,1297,1061,16, +0,624,1,43,1062, +16,0,624,1,44, +1063,16,0,202,1, +1803,912,1,1804,1064, +16,0,624,1,299, +1065,16,0,624,1, +47,1066,16,0,198, +1,52,1067,16,0, +624,1,2318,1068,16, +0,624,1,63,1069, +16,0,224,1,66, +1070,16,0,222,1, +2075,1071,16,0,624, +1,1574,924,1,71, +1072,16,0,624,1, +76,1073,16,0,624, +1,1834,1074,16,0, +624,1,2337,1075,16, +0,624,1,79,1076, +16,0,624,1,1335, +1077,16,0,624,1, +322,1078,16,0,624, +1,85,1079,16,0, +624,1,89,1080,16, +0,624,1,346,1081, +16,0,624,1,97, +1082,16,0,624,1, +2106,1083,16,0,624, +1,102,1084,16,0, +624,1,1860,946,1, +2364,952,1,1114,1085, +16,0,198,1,112, +1086,16,0,624,1, +1117,1087,16,0,624, +1,2786,1088,16,0, +624,1,1873,961,1, +1876,1089,16,0,624, +1,124,1090,16,0, +624,1,2136,968,1, +381,1091,16,0,624, +1,525,1092,16,0, +624,1,137,1093,16, +0,624,1,1901,1094, +16,0,624,1,1153, +1095,16,0,624,1, +151,1096,16,0,624, +1,1407,1097,16,0, +624,1,1659,1098,16, +0,624,1,2413,1099, +16,0,624,1,406, +1100,16,0,624,1, +1371,1101,16,0,624, +1,2105,939,1,166, +1102,16,0,624,1, +1622,1103,16,0,624, +1,1931,986,1,1933, +1104,16,0,624,1, +431,1105,16,0,624, +1,1585,1106,16,0, +624,1,182,1107,16, +0,624,1,1189,1108, +16,0,624,1,1443, +1109,16,0,624,1, +1695,1110,16,0,624, +1,2198,1111,16,0, +624,1,447,1112,16, +0,624,1,2458,1001, +1,2459,1007,1,1958, +1113,16,0,624,1, +2462,1014,1,1657,1019, +1,2464,1024,1,199, +1114,16,0,624,1, +459,1115,16,0,624, +1,462,1116,16,0, +624,1,217,1117,16, +0,624,1,2227,1033, +1,1225,1118,16,0, +624,1,1479,1119,16, +0,624,1,1731,1120, +16,0,624,1,1989, +1041,1,1990,1121,16, +0,624,1,236,1122, +16,0,624,1,1756, +1123,16,0,624,1, +5,1124,19,197,1, +5,1125,5,100,1, +256,1126,16,0,620, +1,1261,1127,16,0, +620,1,509,1128,16, +0,620,1,1515,1129, +16,0,620,1,2021, +843,1,1775,1130,16, +0,620,1,2029,850, +1,2030,856,1,2031, +861,1,2032,866,1, +2033,871,1,277,1131, +16,0,620,1,2035, +877,1,2037,882,1, +2039,887,1,32,1132, +16,0,620,1,2041, +893,1,2293,1133,16, +0,620,1,2043,899, +1,2045,904,1,40, +1134,16,0,201,1, +41,1135,16,0,620, +1,1297,1136,16,0, +620,1,43,1137,16, +0,620,1,44,1138, +16,0,201,1,1803, +912,1,1804,1139,16, +0,620,1,299,1140, +16,0,620,1,47, +1141,16,0,195,1, +52,1142,16,0,620, +1,2318,1143,16,0, +620,1,63,1144,16, +0,223,1,66,1145, +16,0,221,1,2075, +1146,16,0,620,1, +1574,924,1,71,1147, +16,0,620,1,76, +1148,16,0,620,1, +1834,1149,16,0,620, +1,2337,1150,16,0, +620,1,79,1151,16, +0,620,1,1335,1152, +16,0,620,1,322, +1153,16,0,620,1, +85,1154,16,0,620, +1,89,1155,16,0, +620,1,346,1156,16, +0,620,1,97,1157, +16,0,620,1,2106, +1158,16,0,620,1, +102,1159,16,0,620, +1,1860,946,1,2364, +952,1,1114,1160,16, +0,195,1,112,1161, +16,0,620,1,1117, +1162,16,0,620,1, +2786,1163,16,0,620, +1,1873,961,1,1876, +1164,16,0,620,1, +124,1165,16,0,620, +1,2136,968,1,381, +1166,16,0,620,1, +525,1167,16,0,620, +1,137,1168,16,0, +620,1,1901,1169,16, +0,620,1,1153,1170, +16,0,620,1,151, +1171,16,0,620,1, +1407,1172,16,0,620, +1,1659,1173,16,0, +620,1,2413,1174,16, +0,620,1,406,1175, +16,0,620,1,1371, +1176,16,0,620,1, +2105,939,1,166,1177, +16,0,620,1,1622, +1178,16,0,620,1, +1931,986,1,1933,1179, +16,0,620,1,431, +1180,16,0,620,1, +1585,1181,16,0,620, +1,182,1182,16,0, +620,1,1189,1183,16, +0,620,1,1443,1184, +16,0,620,1,1695, +1185,16,0,620,1, +2198,1186,16,0,620, +1,447,1187,16,0, +620,1,2458,1001,1, +2459,1007,1,1958,1188, +16,0,620,1,2462, +1014,1,1657,1019,1, +2464,1024,1,199,1189, +16,0,620,1,459, +1190,16,0,620,1, +462,1191,16,0,620, +1,217,1192,16,0, +620,1,2227,1033,1, +1225,1193,16,0,620, +1,1479,1194,16,0, +620,1,1731,1195,16, +0,620,1,1989,1041, +1,1990,1196,16,0, +620,1,236,1197,16, +0,620,1,1756,1198, +16,0,620,1,6, +1199,19,310,1,6, +1200,5,2,1,1114, +1201,16,0,308,1, +40,1202,16,0,609, +1,7,1203,19,267, +1,7,1204,5,2, +1,1114,1205,16,0, +265,1,40,1206,16, +0,544,1,8,1207, +19,230,1,8,1208, +5,2,1,1114,1209, +16,0,228,1,40, +1210,16,0,501,1, +9,1211,19,236,1, +9,1212,5,2,1, +1114,1213,16,0,234, +1,40,1214,16,0, +430,1,10,1215,19, +180,1,10,1216,5, +2,1,1114,1217,16, +0,178,1,40,1218, +16,0,367,1,11, +1219,19,151,1,11, +1220,5,146,1,1260, +1221,17,1222,15,1223, 4,34,37,0,83, 0,105,0,109,0, 112,0,108,0,101, @@ -4085,7 +4877,7 @@ public yyLSLSyntax 0,110,0,109,0, 101,0,110,0,116, 0,1,-1,1,5, -1099,20,1100,4,38, +1224,20,1225,4,38, 83,0,105,0,109, 0,112,0,108,0, 101,0,65,0,115, @@ -4093,11 +4885,11 @@ public yyLSLSyntax 103,0,110,0,109, 0,101,0,110,0, 116,0,95,0,50, -0,49,0,1,220, +0,49,0,1,276, 1,3,1,6,1, -5,1101,22,1,80, -1,1011,1102,17,1103, -15,1104,4,44,37, +5,1226,22,1,111, +1,1011,1227,17,1228, +15,1229,4,44,37, 0,80,0,97,0, 114,0,101,0,110, 0,116,0,104,0, @@ -4107,7 +4899,7 @@ public yyLSLSyntax 0,101,0,115,0, 115,0,105,0,111, 0,110,0,1,-1, -1,5,1105,20,1106, +1,5,1230,20,1231, 4,46,80,0,97, 0,114,0,101,0, 110,0,116,0,104, @@ -4117,12 +4909,12 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,50,0,1,267, +0,50,0,1,323, 1,3,1,4,1, -3,1107,22,1,127, -1,1514,1108,17,1109, -15,1098,1,-1,1, -5,1110,20,1111,4, +3,1232,22,1,158, +1,1514,1233,17,1234, +15,1223,1,-1,1, +5,1235,20,1236,4, 38,83,0,105,0, 109,0,112,0,108, 0,101,0,65,0, @@ -4131,26 +4923,26 @@ public yyLSLSyntax 109,0,101,0,110, 0,116,0,95,0, 49,0,52,0,1, -213,1,3,1,4, -1,3,1112,22,1, -73,1,9,1113,17, -1114,15,1115,4,24, +269,1,3,1,4, +1,3,1237,22,1, +104,1,9,1238,17, +1239,15,1240,4,24, 37,0,68,0,101, 0,99,0,108,0, 97,0,114,0,97, 0,116,0,105,0, 111,0,110,0,1, --1,1,5,1116,20, -1117,4,26,68,0, +-1,1,5,1241,20, +1242,4,26,68,0, 101,0,99,0,108, 0,97,0,114,0, 97,0,116,0,105, 0,111,0,110,0, 95,0,49,0,1, -161,1,3,1,3, -1,2,1118,22,1, -21,1,262,1119,17, -1120,15,1121,4,34, +213,1,3,1,3, +1,2,1243,22,1, +48,1,262,1244,17, +1245,15,1246,4,34, 37,0,66,0,105, 0,110,0,97,0, 114,0,121,0,69, @@ -4158,8 +4950,8 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,1, --1,1,5,1122,20, -1123,4,36,66,0, +-1,1,5,1247,20, +1248,4,36,66,0, 105,0,110,0,97, 0,114,0,121,0, 69,0,120,0,112, @@ -4167,11 +4959,11 @@ public yyLSLSyntax 115,0,115,0,105, 0,111,0,110,0, 95,0,53,0,1, -249,1,3,1,4, -1,3,1124,22,1, -109,1,1267,1125,17, -1126,15,1098,1,-1, -1,5,1127,20,1128, +305,1,3,1,4, +1,3,1249,22,1, +140,1,1267,1250,17, +1251,15,1223,1,-1, +1,5,1252,20,1253, 4,36,83,0,105, 0,109,0,112,0, 108,0,101,0,65, @@ -4179,13 +4971,13 @@ public yyLSLSyntax 105,0,103,0,110, 0,109,0,101,0, 110,0,116,0,95, -0,56,0,1,207, +0,56,0,1,263, 1,3,1,6,1, -5,1129,22,1,67, -1,2021,718,1,1521, -1130,17,1131,15,1098, -1,-1,1,5,1132, -20,1133,4,36,83, +5,1254,22,1,98, +1,2021,843,1,1521, +1255,17,1256,15,1223, +1,-1,1,5,1257, +20,1258,4,36,83, 0,105,0,109,0, 112,0,108,0,101, 0,65,0,115,0, @@ -4193,26 +4985,26 @@ public yyLSLSyntax 0,110,0,109,0, 101,0,110,0,116, 0,95,0,49,0, -1,200,1,3,1, -4,1,3,1134,22, -1,60,1,2024,1135, -17,1136,15,1137,4, +1,256,1,3,1, +4,1,3,1259,22, +1,91,1,2024,1260, +17,1261,15,1262,4, 24,37,0,83,0, 116,0,97,0,116, 0,101,0,67,0, 104,0,97,0,110, 0,103,0,101,0, -1,-1,1,5,1138, -20,1139,4,26,83, +1,-1,1,5,1263, +20,1264,4,26,83, 0,116,0,97,0, 116,0,101,0,67, 0,104,0,97,0, 110,0,103,0,101, 0,95,0,49,0, -1,182,1,3,1, -3,1,2,1140,22, -1,42,1,1775,1141, -17,1142,15,1143,4, +1,238,1,3,1, +3,1,2,1265,22, +1,73,1,1775,1266, +17,1267,15,1268,4, 30,37,0,69,0, 109,0,112,0,116, 0,121,0,83,0, @@ -4220,34 +5012,34 @@ public yyLSLSyntax 0,101,0,109,0, 101,0,110,0,116, 0,1,-1,1,5, -1144,20,1145,4,32, +1269,20,1270,4,32, 69,0,109,0,112, 0,116,0,121,0, 83,0,116,0,97, 0,116,0,101,0, 109,0,101,0,110, 0,116,0,95,0, -49,0,1,166,1, +49,0,1,222,1, 3,1,1,1,0, -1146,22,1,26,1, -19,1147,17,1114,1, -2,1118,1,2028,1148, -17,1149,15,1150,4, +1271,22,1,57,1, +19,1272,17,1239,1, +2,1243,1,2028,1273, +17,1274,15,1275,4, 20,37,0,74,0, 117,0,109,0,112, 0,76,0,97,0, 98,0,101,0,108, 0,1,-1,1,5, -1151,20,1152,4,22, +1276,20,1277,4,22, 74,0,117,0,109, 0,112,0,76,0, 97,0,98,0,101, 0,108,0,95,0, -49,0,1,180,1, +49,0,1,236,1, 3,1,3,1,2, -1153,22,1,40,1, -2029,725,1,2281,1154, -17,1155,15,1156,4, +1278,22,1,71,1, +2029,850,1,2281,1279, +17,1280,15,1281,4, 34,37,0,70,0, 111,0,114,0,76, 0,111,0,111,0, @@ -4255,8 +5047,8 @@ public yyLSLSyntax 0,97,0,116,0, 101,0,109,0,101, 0,110,0,116,0, -1,-1,1,5,1157, -20,1158,4,36,70, +1,-1,1,5,1282, +20,1283,4,36,70, 0,111,0,114,0, 76,0,111,0,111, 0,112,0,83,0, @@ -4264,142 +5056,95 @@ public yyLSLSyntax 0,101,0,109,0, 101,0,110,0,116, 0,95,0,50,0, -1,195,1,3,1, -2,1,1,1159,22, -1,55,1,2031,736, -1,2032,741,1,2033, -746,1,2034,1160,16, -0,572,1,2035,752, -1,2036,1161,16,0, -524,1,2037,757,1, -2038,1162,16,0,528, -1,2039,762,1,32, -1163,17,1142,1,0, -1146,1,2041,768,1, -2042,1164,16,0,646, -1,2043,774,1,2044, -1165,16,0,584,1, -2045,779,1,2299,1166, -16,0,226,1,1296, -1167,17,1168,15,1098, -1,-1,1,5,1169, -20,1170,4,38,83, -0,105,0,109,0, -112,0,108,0,101, -0,65,0,115,0, -115,0,105,0,103, -0,110,0,109,0, -101,0,110,0,116, -0,95,0,50,0, -48,0,1,219,1, -3,1,6,1,5, -1171,22,1,79,1, -283,1172,17,1173,15, -1121,1,-1,1,5, -1174,20,1175,4,36, -66,0,105,0,110, -0,97,0,114,0, -121,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,52, -0,1,248,1,3, -1,4,1,3,1176, -22,1,108,1,40, -1177,17,1178,15,1179, -4,32,37,0,73, -0,100,0,101,0, -110,0,116,0,69, -0,120,0,112,0, -114,0,101,0,115, +1,251,1,3,1, +2,1,1,1284,22, +1,86,1,2031,861, +1,2785,1285,16,0, +519,1,2033,871,1, +2034,1286,16,0,691, +1,2035,877,1,2036, +1287,16,0,610,1, +2037,882,1,2038,1288, +16,0,614,1,2792, +1289,16,0,149,1, +32,1290,17,1267,1, +0,1271,1,2032,866, +1,2042,1291,16,0, +757,1,2043,899,1, +2044,1292,16,0,704, +1,2045,904,1,2299, +1293,16,0,252,1, +1296,1294,17,1295,15, +1223,1,-1,1,5, +1296,20,1297,4,38, +83,0,105,0,109, +0,112,0,108,0, +101,0,65,0,115, 0,115,0,105,0, -111,0,110,0,1, --1,1,5,1180,20, -1181,4,34,73,0, -100,0,101,0,110, -0,116,0,69,0, +103,0,110,0,109, +0,101,0,110,0, +116,0,95,0,50, +0,48,0,1,275, +1,3,1,6,1, +5,1298,22,1,110, +1,283,1299,17,1300, +15,1246,1,-1,1, +5,1301,20,1302,4, +36,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, 120,0,112,0,114, 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -49,0,1,234,1, -3,1,2,1,1, -1182,22,1,94,1, -44,1183,17,1178,1, -1,1182,1,1803,787, -1,47,1184,17,1185, -15,1186,4,38,37, -0,73,0,100,0, -101,0,110,0,116, -0,68,0,111,0, -116,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,1,-1,1, -5,1187,20,1188,4, -40,73,0,100,0, -101,0,110,0,116, -0,68,0,111,0, -116,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,49, -0,1,235,1,3, -1,4,1,3,1189, -22,1,95,1,48, -1190,17,1191,15,1192, -4,58,37,0,73, -0,110,0,99,0, -114,0,101,0,109, -0,101,0,110,0, -116,0,68,0,101, -0,99,0,114,0, -101,0,109,0,101, -0,110,0,116,0, -69,0,120,0,112, -0,114,0,101,0, -115,0,115,0,105, -0,111,0,110,0, -1,-1,1,5,1193, -20,1194,4,60,73, -0,110,0,99,0, -114,0,101,0,109, -0,101,0,110,0, -116,0,68,0,101, -0,99,0,114,0, -101,0,109,0,101, +52,0,1,304,1, +3,1,4,1,3, +1303,22,1,139,1, +40,1304,17,1305,15, +1306,4,32,37,0, +73,0,100,0,101, 0,110,0,116,0, 69,0,120,0,112, 0,114,0,101,0, 115,0,115,0,105, 0,111,0,110,0, -95,0,52,0,1, -239,1,3,1,5, -1,4,1195,22,1, -99,1,49,1196,17, -1197,15,1192,1,-1, -1,5,1198,20,1199, -4,60,73,0,110, -0,99,0,114,0, -101,0,109,0,101, -0,110,0,116,0, -68,0,101,0,99, -0,114,0,101,0, -109,0,101,0,110, +1,-1,1,5,1307, +20,1308,4,34,73, +0,100,0,101,0, +110,0,116,0,69, +0,120,0,112,0, +114,0,101,0,115, +0,115,0,105,0, +111,0,110,0,95, +0,49,0,1,290, +1,3,1,2,1, +1,1309,22,1,125, +1,44,1310,17,1305, +1,1,1309,1,1803, +912,1,47,1311,17, +1312,15,1313,4,38, +37,0,73,0,100, +0,101,0,110,0, +116,0,68,0,111, +0,116,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,1,-1, +1,5,1314,20,1315, +4,40,73,0,100, +0,101,0,110,0, +116,0,68,0,111, 0,116,0,69,0, 120,0,112,0,114, 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -51,0,1,238,1, -3,1,5,1,4, -1200,22,1,98,1, -50,1201,17,1202,15, -1192,1,-1,1,5, -1203,20,1204,4,60, +49,0,1,291,1, +3,1,4,1,3, +1316,22,1,126,1, +48,1317,17,1318,15, +1319,4,58,37,0, 73,0,110,0,99, 0,114,0,101,0, 109,0,101,0,110, @@ -4411,13 +5156,26 @@ public yyLSLSyntax 112,0,114,0,101, 0,115,0,115,0, 105,0,111,0,110, -0,95,0,50,0, -1,237,1,3,1, -3,1,2,1205,22, -1,97,1,51,1206, -17,1207,15,1192,1, --1,1,5,1208,20, -1209,4,60,73,0, +0,1,-1,1,5, +1320,20,1321,4,60, +73,0,110,0,99, +0,114,0,101,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,114, +0,101,0,109,0, +101,0,110,0,116, +0,69,0,120,0, +112,0,114,0,101, +0,115,0,115,0, +105,0,111,0,110, +0,95,0,52,0, +1,295,1,3,1, +5,1,4,1322,22, +1,130,1,49,1323, +17,1324,15,1319,1, +-1,1,5,1325,20, +1326,4,60,73,0, 110,0,99,0,114, 0,101,0,109,0, 101,0,110,0,116, @@ -4429,80 +5187,88 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,49,0,1,236, -1,3,1,3,1, -2,1210,22,1,96, -1,305,1211,17,1212, -15,1121,1,-1,1, -5,1213,20,1214,4, -36,66,0,105,0, -110,0,97,0,114, -0,121,0,69,0, -120,0,112,0,114, -0,101,0,115,0, -115,0,105,0,111, -0,110,0,95,0, -51,0,1,247,1, -3,1,4,1,3, -1215,22,1,107,1, -525,1216,17,1217,15, -1218,4,34,37,0, -82,0,111,0,116, -0,97,0,116,0, -105,0,111,0,110, -0,67,0,111,0, -110,0,115,0,116, -0,97,0,110,0, -116,0,1,-1,1, -5,1219,20,1220,4, -36,82,0,111,0, -116,0,97,0,116, -0,105,0,111,0, -110,0,67,0,111, -0,110,0,115,0, -116,0,97,0,110, -0,116,0,95,0, -49,0,1,232,1, -3,1,10,1,9, -1221,22,1,92,1, -63,1222,17,1223,15, -1224,4,38,37,0, -84,0,121,0,112, -0,101,0,99,0, -97,0,115,0,116, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,1,-1,1,5, -1225,20,1226,4,40, -84,0,121,0,112, +0,51,0,1,294, +1,3,1,5,1, +4,1327,22,1,129, +1,50,1328,17,1329, +15,1319,1,-1,1, +5,1330,20,1331,4, +60,73,0,110,0, +99,0,114,0,101, +0,109,0,101,0, +110,0,116,0,68, 0,101,0,99,0, -97,0,115,0,116, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,95,0,50,0, -1,269,1,3,1, -5,1,4,1227,22, -1,129,1,66,1228, -17,1229,15,1224,1, --1,1,5,1230,20, -1231,4,40,84,0, -121,0,112,0,101, -0,99,0,97,0, -115,0,116,0,69, +114,0,101,0,109, +0,101,0,110,0, +116,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,95,0,50, +0,1,293,1,3, +1,3,1,2,1332, +22,1,128,1,51, +1333,17,1334,15,1319, +1,-1,1,5,1335, +20,1336,4,60,73, +0,110,0,99,0, +114,0,101,0,109, +0,101,0,110,0, +116,0,68,0,101, +0,99,0,114,0, +101,0,109,0,101, +0,110,0,116,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +95,0,49,0,1, +292,1,3,1,3, +1,2,1337,22,1, +127,1,305,1338,17, +1339,15,1246,1,-1, +1,5,1340,20,1341, +4,36,66,0,105, +0,110,0,97,0, +114,0,121,0,69, 0,120,0,112,0, 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,51,0,1,270, -1,3,1,7,1, -6,1232,22,1,130, -1,67,1233,17,1234, -15,1224,1,-1,1, -5,1235,20,1236,4, +0,51,0,1,303, +1,3,1,4,1, +3,1342,22,1,138, +1,525,1343,17,1344, +15,1345,4,34,37, +0,82,0,111,0, +116,0,97,0,116, +0,105,0,111,0, +110,0,67,0,111, +0,110,0,115,0, +116,0,97,0,110, +0,116,0,1,-1, +1,5,1346,20,1347, +4,36,82,0,111, +0,116,0,97,0, +116,0,105,0,111, +0,110,0,67,0, +111,0,110,0,115, +0,116,0,97,0, +110,0,116,0,95, +0,49,0,1,288, +1,3,1,10,1, +9,1348,22,1,123, +1,63,1349,17,1350, +15,1351,4,38,37, +0,84,0,121,0, +112,0,101,0,99, +0,97,0,115,0, +116,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,1,-1,1, +5,1352,20,1353,4, 40,84,0,121,0, 112,0,101,0,99, 0,97,0,115,0, @@ -4510,13 +5276,13 @@ public yyLSLSyntax 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,95,0,55, -0,1,274,1,3, -1,8,1,7,1237, -22,1,134,1,68, -1238,17,1239,15,1224, -1,-1,1,5,1240, -20,1241,4,40,84, +110,0,95,0,50, +0,1,325,1,3, +1,5,1,4,1354, +22,1,160,1,66, +1355,17,1356,15,1351, +1,-1,1,5,1357, +20,1358,4,40,84, 0,121,0,112,0, 101,0,99,0,97, 0,115,0,116,0, @@ -4524,12 +5290,12 @@ public yyLSLSyntax 0,114,0,101,0, 115,0,115,0,105, 0,111,0,110,0, -95,0,53,0,1, -272,1,3,1,8, -1,7,1242,22,1, -132,1,69,1243,17, -1244,15,1224,1,-1, -1,5,1245,20,1246, +95,0,51,0,1, +326,1,3,1,7, +1,6,1359,22,1, +161,1,67,1360,17, +1361,15,1351,1,-1, +1,5,1362,20,1363, 4,40,84,0,121, 0,112,0,101,0, 99,0,97,0,115, @@ -4538,12 +5304,12 @@ public yyLSLSyntax 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -54,0,1,273,1, -3,1,6,1,5, -1247,22,1,133,1, -70,1248,17,1249,15, -1224,1,-1,1,5, -1250,20,1251,4,40, +55,0,1,330,1, +3,1,8,1,7, +1364,22,1,165,1, +68,1365,17,1366,15, +1351,1,-1,1,5, +1367,20,1368,4,40, 84,0,121,0,112, 0,101,0,99,0, 97,0,115,0,116, @@ -4551,13 +5317,13 @@ public yyLSLSyntax 112,0,114,0,101, 0,115,0,115,0, 105,0,111,0,110, -0,95,0,52,0, -1,271,1,3,1, -6,1,5,1252,22, -1,131,1,74,1253, -17,1254,15,1224,1, --1,1,5,1255,20, -1256,4,40,84,0, +0,95,0,53,0, +1,328,1,3,1, +8,1,7,1369,22, +1,163,1,69,1370, +17,1371,15,1351,1, +-1,1,5,1372,20, +1373,4,40,84,0, 121,0,112,0,101, 0,99,0,97,0, 115,0,116,0,69, @@ -4565,251 +5331,234 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,57,0,1,276, -1,3,1,7,1, -6,1257,22,1,136, -1,1013,1258,17,1259, -15,1104,1,-1,1, -5,1260,20,1261,4, -46,80,0,97,0, -114,0,101,0,110, -0,116,0,104,0, -101,0,115,0,105, -0,115,0,69,0, -120,0,112,0,114, -0,101,0,115,0, -115,0,105,0,111, -0,110,0,95,0, -49,0,1,266,1, -3,1,4,1,3, -1262,22,1,126,1, -1332,1263,17,1264,15, -1098,1,-1,1,5, -1265,20,1266,4,38, -83,0,105,0,109, -0,112,0,108,0, -101,0,65,0,115, -0,115,0,105,0, -103,0,110,0,109, -0,101,0,110,0, -116,0,95,0,49, -0,57,0,1,218, +0,54,0,1,329, 1,3,1,6,1, -5,1267,22,1,78, -1,2337,1268,17,1142, -1,0,1146,1,1585, -1269,17,1270,15,1271, -4,32,37,0,82, -0,101,0,116,0, -117,0,114,0,110, -0,83,0,116,0, -97,0,116,0,101, -0,109,0,101,0, -110,0,116,0,1, --1,1,5,1272,20, -1273,4,34,82,0, -101,0,116,0,117, -0,114,0,110,0, -83,0,116,0,97, -0,116,0,101,0, -109,0,101,0,110, -0,116,0,95,0, -50,0,1,225,1, -3,1,2,1,1, -1274,22,1,85,1, -2023,1275,17,1276,15, -1137,1,-1,1,5, -1277,20,1278,4,26, -83,0,116,0,97, -0,116,0,101,0, -67,0,104,0,97, -0,110,0,103,0, -101,0,95,0,50, -0,1,183,1,3, -1,3,1,2,1279, -22,1,43,1,2136, -842,1,82,1280,17, -1281,15,1282,4,32, -37,0,85,0,110, -0,97,0,114,0, -121,0,69,0,120, +5,1374,22,1,164, +1,70,1375,17,1376, +15,1351,1,-1,1, +5,1377,20,1378,4, +40,84,0,121,0, +112,0,101,0,99, +0,97,0,115,0, +116,0,69,0,120, 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,1,-1,1, -5,1283,20,1284,4, -34,85,0,110,0, -97,0,114,0,121, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,95,0,51,0, -1,265,1,3,1, -3,1,2,1285,22, -1,125,1,2026,1286, -17,1287,15,1288,4, -28,37,0,74,0, -117,0,109,0,112, -0,83,0,116,0, -97,0,116,0,101, -0,109,0,101,0, -110,0,116,0,1, --1,1,5,1289,20, -1290,4,30,74,0, -117,0,109,0,112, +110,0,95,0,52, +0,1,327,1,3, +1,6,1,5,1379, +22,1,162,1,74, +1380,17,1381,15,1351, +1,-1,1,5,1382, +20,1383,4,40,84, +0,121,0,112,0, +101,0,99,0,97, +0,115,0,116,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +95,0,57,0,1, +332,1,3,1,7, +1,6,1384,22,1, +167,1,1013,1385,17, +1386,15,1229,1,-1, +1,5,1387,20,1388, +4,46,80,0,97, +0,114,0,101,0, +110,0,116,0,104, +0,101,0,115,0, +105,0,115,0,69, +0,120,0,112,0, +114,0,101,0,115, +0,115,0,105,0, +111,0,110,0,95, +0,49,0,1,322, +1,3,1,4,1, +3,1389,22,1,157, +1,1332,1390,17,1391, +15,1223,1,-1,1, +5,1392,20,1393,4, +38,83,0,105,0, +109,0,112,0,108, +0,101,0,65,0, +115,0,115,0,105, +0,103,0,110,0, +109,0,101,0,110, +0,116,0,95,0, +49,0,57,0,1, +274,1,3,1,6, +1,5,1394,22,1, +109,1,2337,1395,17, +1267,1,0,1271,1, +1585,1396,17,1397,15, +1398,4,32,37,0, +82,0,101,0,116, +0,117,0,114,0, +110,0,83,0,116, +0,97,0,116,0, +101,0,109,0,101, +0,110,0,116,0, +1,-1,1,5,1399, +20,1400,4,34,82, +0,101,0,116,0, +117,0,114,0,110, 0,83,0,116,0, 97,0,116,0,101, 0,109,0,101,0, 110,0,116,0,95, -0,49,0,1,181, -1,3,1,3,1, -2,1291,22,1,41, -1,1591,1292,17,1293, -15,1271,1,-1,1, -5,1294,20,1295,4, -34,82,0,101,0, -116,0,117,0,114, -0,110,0,83,0, -116,0,97,0,116, -0,101,0,109,0, -101,0,110,0,116, -0,95,0,49,0, -1,224,1,3,1, -3,1,2,1296,22, -1,84,1,1341,1297, -17,1298,15,1098,1, --1,1,5,1299,20, -1300,4,36,83,0, -105,0,109,0,112, -0,108,0,101,0, -65,0,115,0,115, -0,105,0,103,0, -110,0,109,0,101, -0,110,0,116,0, -95,0,54,0,1, -205,1,3,1,4, -1,3,1301,22,1, -65,1,2030,731,1, -328,1302,17,1303,15, -1121,1,-1,1,5, -1304,20,1305,4,36, -66,0,105,0,110, -0,97,0,114,0, -121,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,50, -0,1,246,1,3, -1,4,1,3,1306, -22,1,106,1,1303, -1307,17,1308,15,1098, -1,-1,1,5,1309, -20,1310,4,36,83, -0,105,0,109,0, -112,0,108,0,101, -0,65,0,115,0, -115,0,105,0,103, -0,110,0,109,0, -101,0,110,0,116, -0,95,0,55,0, -1,206,1,3,1, -6,1,5,1311,22, -1,66,1,1096,1312, -17,1313,15,1314,4, -26,37,0,70,0, -117,0,110,0,99, -0,116,0,105,0, -111,0,110,0,67, -0,97,0,108,0, -108,0,1,-1,1, -5,1315,20,1316,4, -28,70,0,117,0, -110,0,99,0,116, -0,105,0,111,0, -110,0,67,0,97, -0,108,0,108,0, -95,0,49,0,1, -277,1,3,1,5, -1,4,1317,22,1, -137,1,93,1318,17, -1319,15,1282,1,-1, -1,5,1320,20,1321, +0,50,0,1,281, +1,3,1,2,1, +1,1401,22,1,116, +1,2023,1402,17,1403, +15,1262,1,-1,1, +5,1404,20,1405,4, +26,83,0,116,0, +97,0,116,0,101, +0,67,0,104,0, +97,0,110,0,103, +0,101,0,95,0, +50,0,1,239,1, +3,1,3,1,2, +1406,22,1,74,1, +2136,968,1,82,1407, +17,1408,15,1409,4, +32,37,0,85,0, +110,0,97,0,114, +0,121,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,1,-1, +1,5,1410,20,1411, 4,34,85,0,110, 0,97,0,114,0, 121,0,69,0,120, 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,95,0,50, -0,1,264,1,3, -1,3,1,2,1322, -22,1,124,1,1550, -1323,17,1324,15,1098, -1,-1,1,5,1325, -20,1326,4,38,83, +110,0,95,0,51, +0,1,321,1,3, +1,3,1,2,1412, +22,1,156,1,2026, +1413,17,1414,15,1415, +4,28,37,0,74, +0,117,0,109,0, +112,0,83,0,116, +0,97,0,116,0, +101,0,109,0,101, +0,110,0,116,0, +1,-1,1,5,1416, +20,1417,4,30,74, +0,117,0,109,0, +112,0,83,0,116, +0,97,0,116,0, +101,0,109,0,101, +0,110,0,116,0, +95,0,49,0,1, +237,1,3,1,3, +1,2,1418,22,1, +72,1,1591,1419,17, +1420,15,1398,1,-1, +1,5,1421,20,1422, +4,34,82,0,101, +0,116,0,117,0, +114,0,110,0,83, +0,116,0,97,0, +116,0,101,0,109, +0,101,0,110,0, +116,0,95,0,49, +0,1,280,1,3, +1,3,1,2,1423, +22,1,115,1,1341, +1424,17,1425,15,1223, +1,-1,1,5,1426, +20,1427,4,36,83, 0,105,0,109,0, 112,0,108,0,101, 0,65,0,115,0, 115,0,105,0,103, 0,110,0,109,0, 101,0,110,0,116, -0,95,0,49,0, -51,0,1,212,1, +0,95,0,54,0, +1,261,1,3,1, +4,1,3,1428,22, +1,96,1,2030,856, +1,328,1429,17,1430, +15,1246,1,-1,1, +5,1431,20,1432,4, +36,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,95,0, +50,0,1,302,1, 3,1,4,1,3, -1327,22,1,72,1, -2040,1328,16,0,532, -1,2106,1329,17,1142, -1,0,1146,1,1555, -1330,16,0,599,1, -827,1331,17,1332,15, -1121,1,-1,1,5, -1333,20,1334,4,38, -66,0,105,0,110, -0,97,0,114,0, -121,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,49, -0,53,0,1,259, -1,3,1,4,1, -3,1335,22,1,119, -1,1859,1336,16,0, -304,1,1860,821,1, -1804,1337,17,1142,1, -0,1146,1,107,1338, -17,1339,15,1282,1, --1,1,5,1340,20, -1341,4,34,85,0, +1433,22,1,137,1, +1303,1434,17,1435,15, +1223,1,-1,1,5, +1436,20,1437,4,36, +83,0,105,0,109, +0,112,0,108,0, +101,0,65,0,115, +0,115,0,105,0, +103,0,110,0,109, +0,101,0,110,0, +116,0,95,0,55, +0,1,262,1,3, +1,6,1,5,1438, +22,1,97,1,1096, +1439,17,1440,15,1441, +4,26,37,0,70, +0,117,0,110,0, +99,0,116,0,105, +0,111,0,110,0, +67,0,97,0,108, +0,108,0,1,-1, +1,5,1442,20,1443, +4,28,70,0,117, +0,110,0,99,0, +116,0,105,0,111, +0,110,0,67,0, +97,0,108,0,108, +0,95,0,49,0, +1,333,1,3,1, +5,1,4,1444,22, +1,168,1,93,1445, +17,1446,15,1409,1, +-1,1,5,1447,20, +1448,4,34,85,0, 110,0,97,0,114, 0,121,0,69,0, 120,0,112,0,114, 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -49,0,1,263,1, +50,0,1,320,1, 3,1,3,1,2, -1342,22,1,123,1, -1114,1343,17,1185,1, -3,1189,1,1048,1344, -17,1345,15,1121,1, --1,1,5,1346,20, -1347,4,38,66,0, -105,0,110,0,97, -0,114,0,121,0, -69,0,120,0,112, -0,114,0,101,0, -115,0,115,0,105, -0,111,0,110,0, -95,0,49,0,56, -0,1,262,1,3, -1,4,1,3,1348, -22,1,122,1,352, -1349,17,1350,15,1121, -1,-1,1,5,1351, -20,1352,4,36,66, +1449,22,1,155,1, +1550,1450,17,1451,15, +1223,1,-1,1,5, +1452,20,1453,4,38, +83,0,105,0,109, +0,112,0,108,0, +101,0,65,0,115, +0,115,0,105,0, +103,0,110,0,109, +0,101,0,110,0, +116,0,95,0,49, +0,51,0,1,268, +1,3,1,4,1, +3,1454,22,1,103, +1,2039,887,1,2040, +1455,16,0,618,1, +2041,893,1,1555,1456, +16,0,722,1,827, +1457,17,1458,15,1246, +1,-1,1,5,1459, +20,1460,4,38,66, 0,105,0,110,0, 97,0,114,0,121, 0,69,0,120,0, @@ -4817,13 +5566,29 @@ public yyLSLSyntax 0,115,0,115,0, 105,0,111,0,110, 0,95,0,49,0, -1,245,1,3,1, -4,1,3,1353,22, -1,105,1,1872,1354, -16,0,314,1,1873, -835,1,118,1355,17, -1356,15,1121,1,-1, -1,5,1357,20,1358, +53,0,1,315,1, +3,1,4,1,3, +1461,22,1,150,1, +1859,1462,16,0,344, +1,1860,946,1,1804, +1463,17,1267,1,0, +1271,1,107,1464,17, +1465,15,1409,1,-1, +1,5,1466,20,1467, +4,34,85,0,110, +0,97,0,114,0, +121,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,95,0,49, +0,1,319,1,3, +1,3,1,2,1468, +22,1,154,1,1114, +1469,17,1312,1,3, +1316,1,1048,1470,17, +1471,15,1246,1,-1, +1,5,1472,20,1473, 4,38,66,0,105, 0,110,0,97,0, 114,0,121,0,69, @@ -4831,63 +5596,126 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,49,0,52,0, -1,258,1,3,1, -4,1,3,1359,22, -1,118,1,1123,1360, -17,1361,15,1098,1, --1,1,5,1362,20, -1363,4,38,83,0, -105,0,109,0,112, -0,108,0,101,0, -65,0,115,0,115, -0,105,0,103,0, -110,0,109,0,101, -0,110,0,116,0, -95,0,49,0,50, -0,1,211,1,3, -1,6,1,5,1364, -22,1,71,1,371, -1365,17,1366,15,1367, -4,46,37,0,70, -0,117,0,110,0, -99,0,116,0,105, +0,49,0,56,0, +1,318,1,3,1, +4,1,3,1474,22, +1,153,1,352,1475, +17,1476,15,1246,1, +-1,1,5,1477,20, +1478,4,36,66,0, +105,0,110,0,97, +0,114,0,121,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, 0,111,0,110,0, -67,0,97,0,108, -0,108,0,69,0, +95,0,49,0,1, +301,1,3,1,4, +1,3,1479,22,1, +136,1,1872,1480,16, +0,354,1,1873,961, +1,118,1481,17,1482, +15,1246,1,-1,1, +5,1483,20,1484,4, +38,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, 120,0,112,0,114, 0,101,0,115,0, 115,0,105,0,111, -0,110,0,1,-1, -1,5,1368,20,1369, -4,48,70,0,117, -0,110,0,99,0, -116,0,105,0,111, -0,110,0,67,0, -97,0,108,0,108, -0,69,0,120,0, -112,0,114,0,101, +0,110,0,95,0, +49,0,52,0,1, +314,1,3,1,4, +1,3,1485,22,1, +149,1,1123,1486,17, +1487,15,1223,1,-1, +1,5,1488,20,1489, +4,38,83,0,105, +0,109,0,112,0, +108,0,101,0,65, 0,115,0,115,0, -105,0,111,0,110, -0,95,0,49,0, -1,244,1,3,1, -2,1,1,1370,22, -1,104,1,1377,1371, -17,1372,15,1098,1, --1,1,5,1373,20, -1374,4,36,83,0, -105,0,109,0,112, -0,108,0,101,0, -65,0,115,0,115, -0,105,0,103,0, -110,0,109,0,101, +105,0,103,0,110, +0,109,0,101,0, +110,0,116,0,95, +0,49,0,50,0, +1,267,1,3,1, +6,1,5,1490,22, +1,102,1,371,1491, +17,1492,15,1493,4, +46,37,0,70,0, +117,0,110,0,99, +0,116,0,105,0, +111,0,110,0,67, +0,97,0,108,0, +108,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,1,-1,1, +5,1494,20,1495,4, +48,70,0,117,0, +110,0,99,0,116, +0,105,0,111,0, +110,0,67,0,97, +0,108,0,108,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +95,0,49,0,1, +300,1,3,1,2, +1,1,1496,22,1, +135,1,1377,1497,17, +1498,15,1223,1,-1, +1,5,1499,20,1500, +4,36,83,0,105, +0,109,0,112,0, +108,0,101,0,65, +0,115,0,115,0, +105,0,103,0,110, +0,109,0,101,0, +110,0,116,0,95, +0,53,0,1,260, +1,3,1,4,1, +3,1501,22,1,95, +1,375,1502,17,1503, +15,1319,1,-1,1, +5,1504,20,1505,4, +60,73,0,110,0, +99,0,114,0,101, +0,109,0,101,0, +110,0,116,0,68, +0,101,0,99,0, +114,0,101,0,109, +0,101,0,110,0, +116,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,95,0,56, +0,1,299,1,3, +1,5,1,4,1506, +22,1,134,1,377, +1507,17,1508,15,1319, +1,-1,1,5,1509, +20,1510,4,60,73, +0,110,0,99,0, +114,0,101,0,109, +0,101,0,110,0, +116,0,68,0,101, +0,99,0,114,0, +101,0,109,0,101, 0,110,0,116,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, 95,0,53,0,1, -204,1,3,1,4, -1,3,1375,22,1, -64,1,375,1376,17, -1377,15,1192,1,-1, -1,5,1378,20,1379, +296,1,3,1,3, +1,2,1511,22,1, +131,1,379,1512,17, +1513,15,1319,1,-1, +1,5,1514,20,1515, 4,60,73,0,110, 0,99,0,114,0, 101,0,109,0,101, @@ -4900,30 +5728,64 @@ public yyLSLSyntax 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -56,0,1,243,1, +55,0,1,298,1, 3,1,5,1,4, -1380,22,1,103,1, -377,1381,17,1382,15, -1192,1,-1,1,5, -1383,20,1384,4,60, -73,0,110,0,99, -0,114,0,101,0, -109,0,101,0,110, -0,116,0,68,0, -101,0,99,0,114, -0,101,0,109,0, -101,0,110,0,116, +1516,22,1,133,1, +380,1517,17,1518,15, +1519,4,38,37,0, +67,0,111,0,110, +0,115,0,116,0, +97,0,110,0,116, 0,69,0,120,0, 112,0,114,0,101, 0,115,0,115,0, 105,0,111,0,110, -0,95,0,53,0, -1,240,1,3,1, -3,1,2,1385,22, -1,100,1,379,1386, -17,1387,15,1192,1, --1,1,5,1388,20, -1389,4,60,73,0, +0,1,-1,1,5, +1520,20,1521,4,40, +67,0,111,0,110, +0,115,0,116,0, +97,0,110,0,116, +0,69,0,120,0, +112,0,114,0,101, +0,115,0,115,0, +105,0,111,0,110, +0,95,0,49,0, +1,289,1,3,1, +2,1,1,1522,22, +1,124,1,883,1523, +17,1524,15,1246,1, +-1,1,5,1525,20, +1526,4,38,66,0, +105,0,110,0,97, +0,114,0,121,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +95,0,49,0,54, +0,1,316,1,3, +1,4,1,3,1527, +22,1,151,1,1628, +1528,17,1529,15,1530, +4,22,37,0,65, +0,115,0,115,0, +105,0,103,0,110, +0,109,0,101,0, +110,0,116,0,1, +-1,1,5,1531,20, +1532,4,24,65,0, +115,0,115,0,105, +0,103,0,110,0, +109,0,101,0,110, +0,116,0,95,0, +49,0,1,254,1, +3,1,4,1,3, +1533,22,1,89,1, +2075,1534,17,1267,1, +0,1271,1,373,1535, +17,1536,15,1319,1, +-1,1,5,1537,20, +1538,4,60,73,0, 110,0,99,0,114, 0,101,0,109,0, 101,0,110,0,116, @@ -4935,81 +5797,25 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,55,0,1,242, -1,3,1,5,1, -4,1390,22,1,102, -1,380,1391,17,1392, -15,1393,4,38,37, -0,67,0,111,0, -110,0,115,0,116, -0,97,0,110,0, -116,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,1,-1,1, -5,1394,20,1395,4, -40,67,0,111,0, -110,0,115,0,116, -0,97,0,110,0, -116,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,49, -0,1,233,1,3, -1,2,1,1,1396, -22,1,93,1,883, -1397,17,1398,15,1121, -1,-1,1,5,1399, -20,1400,4,38,66, -0,105,0,110,0, -97,0,114,0,121, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,95,0,49,0, -54,0,1,260,1, -3,1,4,1,3, -1401,22,1,120,1, -1628,1402,17,1403,15, -1404,4,22,37,0, -65,0,115,0,115, -0,105,0,103,0, -110,0,109,0,101, -0,110,0,116,0, -1,-1,1,5,1405, -20,1406,4,24,65, -0,115,0,115,0, -105,0,103,0,110, -0,109,0,101,0, -110,0,116,0,95, -0,49,0,1,198, -1,3,1,4,1, -3,1407,22,1,58, -1,2075,1408,17,1142, -1,0,1146,1,373, -1409,17,1410,15,1192, -1,-1,1,5,1411, -20,1412,4,60,73, -0,110,0,99,0, -114,0,101,0,109, -0,101,0,110,0, -116,0,68,0,101, -0,99,0,114,0, -101,0,109,0,101, -0,110,0,116,0, -69,0,120,0,112, -0,114,0,101,0, -115,0,115,0,105, -0,111,0,110,0, -95,0,54,0,1, -241,1,3,1,3, -1,2,1413,22,1, -101,1,130,1414,17, -1415,15,1121,1,-1, -1,5,1416,20,1417, +0,54,0,1,297, +1,3,1,3,1, +2,1539,22,1,132, +1,130,1540,17,1541, +15,1246,1,-1,1, +5,1542,20,1543,4, +38,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,95,0, +49,0,51,0,1, +313,1,3,1,4, +1,3,1544,22,1, +148,1,143,1545,17, +1546,15,1246,1,-1, +1,5,1547,20,1548, 4,38,66,0,105, 0,110,0,97,0, 114,0,121,0,69, @@ -5017,42 +5823,96 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,49,0,51,0, -1,257,1,3,1, -4,1,3,1418,22, -1,117,1,143,1419, -17,1420,15,1121,1, --1,1,5,1421,20, -1422,4,38,66,0, +0,49,0,50,0, +1,312,1,3,1, +4,1,3,1549,22, +1,147,1,1901,1550, +17,1267,1,0,1271, +1,1152,1551,17,1552, +15,1223,1,-1,1, +5,1553,20,1554,4, +38,83,0,105,0, +109,0,112,0,108, +0,101,0,65,0, +115,0,115,0,105, +0,103,0,110,0, +109,0,101,0,110, +0,116,0,95,0, +50,0,52,0,1, +279,1,3,1,6, +1,5,1555,22,1, +114,1,1406,1556,17, +1557,15,1223,1,-1, +1,5,1558,20,1559, +4,38,83,0,105, +0,109,0,112,0, +108,0,101,0,65, +0,115,0,115,0, +105,0,103,0,110, +0,109,0,101,0, +110,0,116,0,95, +0,49,0,55,0, +1,272,1,3,1, +4,1,3,1560,22, +1,107,1,1659,1561, +16,0,298,1,2413, +1562,17,1267,1,0, +1271,1,1159,1563,17, +1564,15,1223,1,-1, +1,5,1565,20,1566, +4,38,83,0,105, +0,109,0,112,0, +108,0,101,0,65, +0,115,0,115,0, +105,0,103,0,110, +0,109,0,101,0, +110,0,116,0,95, +0,49,0,49,0, +1,266,1,3,1, +6,1,5,1567,22, +1,101,1,157,1568, +17,1569,15,1246,1, +-1,1,5,1570,20, +1571,4,38,66,0, 105,0,110,0,97, 0,114,0,121,0, 69,0,120,0,112, 0,114,0,101,0, 115,0,115,0,105, 0,111,0,110,0, -95,0,49,0,50, -0,1,256,1,3, -1,4,1,3,1423, -22,1,116,1,1901, -1424,17,1142,1,0, -1146,1,2657,1425,16, -0,608,1,1152,1426, -17,1427,15,1098,1, --1,1,5,1428,20, -1429,4,38,83,0, +95,0,49,0,49, +0,1,311,1,3, +1,4,1,3,1572, +22,1,146,1,1413, +1573,17,1574,15,1223, +1,-1,1,5,1575, +20,1576,4,36,83, +0,105,0,109,0, +112,0,108,0,101, +0,65,0,115,0, +115,0,105,0,103, +0,110,0,109,0, +101,0,110,0,116, +0,95,0,52,0, +1,259,1,3,1, +4,1,3,1577,22, +1,94,1,1370,1578, +17,1579,15,1223,1, +-1,1,5,1580,20, +1581,4,38,83,0, 105,0,109,0,112, 0,108,0,101,0, 65,0,115,0,115, 0,105,0,103,0, 110,0,109,0,101, 0,110,0,116,0, -95,0,50,0,52, -0,1,223,1,3, -1,6,1,5,1430, -22,1,83,1,1406, -1431,17,1432,15,1098, -1,-1,1,5,1433, -20,1434,4,38,83, +95,0,49,0,56, +0,1,273,1,3, +1,4,1,3,1582, +22,1,108,1,1478, +1583,17,1584,15,1223, +1,-1,1,5,1585, +20,1586,4,38,83, 0,105,0,109,0, 112,0,108,0,101, 0,65,0,115,0, @@ -5060,15 +5920,67 @@ public yyLSLSyntax 0,110,0,109,0, 101,0,110,0,116, 0,95,0,49,0, -55,0,1,216,1, +53,0,1,270,1, +3,1,4,1,3, +1587,22,1,105,1, +2106,1588,17,1267,1, +0,1271,1,1620,1589, +17,1590,15,1530,1, +-1,1,5,1591,20, +1592,4,24,65,0, +115,0,115,0,105, +0,103,0,110,0, +109,0,101,0,110, +0,116,0,95,0, +50,0,1,255,1, +3,1,2,1,1, +1593,22,1,90,1, +1621,1594,16,0,791, +1,1574,924,1,172, +1595,17,1596,15,1246, +1,-1,1,5,1597, +20,1598,4,38,66, +0,105,0,110,0, +97,0,114,0,121, +0,69,0,120,0, +112,0,114,0,101, +0,115,0,115,0, +105,0,111,0,110, +0,95,0,49,0, +48,0,1,310,1, 3,1,4,1,3, -1435,22,1,76,1, -1659,1436,16,0,269, -1,2413,1437,17,1142, -1,0,1146,1,1159, -1438,17,1439,15,1098, -1,-1,1,5,1440, -20,1441,4,38,83, +1599,22,1,145,1, +1931,986,1,1665,1600, +17,1601,15,1281,1, +-1,1,5,1602,20, +1603,4,36,70,0, +111,0,114,0,76, +0,111,0,111,0, +112,0,83,0,116, +0,97,0,116,0, +101,0,109,0,101, +0,110,0,116,0, +95,0,49,0,1, +250,1,3,1,2, +1,1,1604,22,1, +85,1,2364,952,1, +2105,939,1,1188,1605, +17,1606,15,1223,1, +-1,1,5,1607,20, +1608,4,38,83,0, +105,0,109,0,112, +0,108,0,101,0, +65,0,115,0,115, +0,105,0,103,0, +110,0,109,0,101, +0,110,0,116,0, +95,0,50,0,51, +0,1,278,1,3, +1,6,1,5,1609, +22,1,113,1,1442, +1610,17,1611,15,1223, +1,-1,1,5,1612, +20,1613,4,38,83, 0,105,0,109,0, 112,0,108,0,101, 0,65,0,115,0, @@ -5076,38 +5988,28 @@ public yyLSLSyntax 0,110,0,109,0, 101,0,110,0,116, 0,95,0,49,0, -49,0,1,210,1, -3,1,6,1,5, -1442,22,1,70,1, -157,1443,17,1444,15, -1121,1,-1,1,5, -1445,20,1446,4,38, -66,0,105,0,110, -0,97,0,114,0, -121,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,49, -0,49,0,1,255, -1,3,1,4,1, -3,1447,22,1,115, -1,1413,1448,17,1449, -15,1098,1,-1,1, -5,1450,20,1451,4, -36,83,0,105,0, -109,0,112,0,108, -0,101,0,65,0, -115,0,115,0,105, -0,103,0,110,0, -109,0,101,0,110, -0,116,0,95,0, -52,0,1,203,1, +54,0,1,271,1, 3,1,4,1,3, -1452,22,1,63,1, -1370,1453,17,1454,15, -1098,1,-1,1,5, -1455,20,1456,4,38, +1614,22,1,106,1, +1694,1615,16,0,215, +1,942,1616,17,1617, +15,1246,1,-1,1, +5,1618,20,1619,4, +38,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,95,0, +49,0,55,0,1, +317,1,3,1,4, +1,3,1620,22,1, +152,1,2198,1621,17, +1267,1,0,1271,1, +1195,1622,17,1623,15, +1223,1,-1,1,5, +1624,20,1625,4,38, 83,0,105,0,109, 0,112,0,108,0, 101,0,65,0,115, @@ -5115,314 +6017,204 @@ public yyLSLSyntax 103,0,110,0,109, 0,101,0,110,0, 116,0,95,0,49, -0,56,0,1,217, -1,3,1,4,1, -3,1457,22,1,77, -1,1478,1458,17,1459, -15,1098,1,-1,1, -5,1460,20,1461,4, -38,83,0,105,0, +0,48,0,1,265, +1,3,1,6,1, +5,1626,22,1,100, +1,1449,1627,17,1628, +15,1223,1,-1,1, +5,1629,20,1630,4, +36,83,0,105,0, 109,0,112,0,108, 0,101,0,65,0, 115,0,115,0,105, 0,103,0,110,0, 109,0,101,0,110, 0,116,0,95,0, -49,0,53,0,1, -214,1,3,1,4, -1,3,1462,22,1, -74,1,1620,1463,17, -1464,15,1404,1,-1, -1,5,1465,20,1466, -4,24,65,0,115, -0,115,0,105,0, -103,0,110,0,109, +51,0,1,258,1, +3,1,4,1,3, +1631,22,1,93,1, +1701,1632,17,1633,15, +1281,1,-1,1,5, +1634,20,1635,4,36, +70,0,111,0,114, +0,76,0,111,0, +111,0,112,0,83, +0,116,0,97,0, +116,0,101,0,109, 0,101,0,110,0, -116,0,95,0,50, -0,1,199,1,3, -1,2,1,1,1467, -22,1,59,1,1621, -1468,16,0,668,1, -1574,799,1,172,1469, -17,1470,15,1121,1, --1,1,5,1471,20, -1472,4,38,66,0, -105,0,110,0,97, -0,114,0,121,0, -69,0,120,0,112, -0,114,0,101,0, -115,0,115,0,105, -0,111,0,110,0, -95,0,49,0,48, -0,1,254,1,3, -1,4,1,3,1473, -22,1,114,1,1931, -861,1,1665,1474,17, -1475,15,1156,1,-1, -1,5,1476,20,1477, -4,36,70,0,111, -0,114,0,76,0, -111,0,111,0,112, -0,83,0,116,0, -97,0,116,0,101, -0,109,0,101,0, -110,0,116,0,95, -0,49,0,1,194, -1,3,1,2,1, -1,1478,22,1,54, -1,2364,827,1,2105, -814,1,1188,1479,17, -1480,15,1098,1,-1, -1,5,1481,20,1482, -4,38,83,0,105, -0,109,0,112,0, -108,0,101,0,65, -0,115,0,115,0, -105,0,103,0,110, -0,109,0,101,0, +116,0,95,0,51, +0,1,252,1,3, +1,4,1,3,1636, +22,1,87,1,447, +1637,17,1638,15,1639, +4,30,37,0,86, +0,101,0,99,0, +116,0,111,0,114, +0,67,0,111,0, +110,0,115,0,116, +0,97,0,110,0, +116,0,1,-1,1, +5,1640,20,1641,4, +32,86,0,101,0, +99,0,116,0,111, +0,114,0,67,0, +111,0,110,0,115, +0,116,0,97,0, 110,0,116,0,95, -0,50,0,51,0, -1,222,1,3,1, -6,1,5,1483,22, -1,82,1,1442,1484, -17,1485,15,1098,1, --1,1,5,1486,20, -1487,4,38,83,0, -105,0,109,0,112, -0,108,0,101,0, -65,0,115,0,115, -0,105,0,103,0, -110,0,109,0,101, -0,110,0,116,0, -95,0,49,0,54, -0,1,215,1,3, -1,4,1,3,1488, -22,1,75,1,1694, -1489,16,0,190,1, -942,1490,17,1491,15, -1121,1,-1,1,5, -1492,20,1493,4,38, +0,49,0,1,287, +1,3,1,8,1, +7,1642,22,1,122, +1,2458,1001,1,2459, +1007,1,1958,1643,17, +1267,1,0,1271,1, +188,1644,17,1645,15, +1246,1,-1,1,5, +1646,20,1647,4,36, 66,0,105,0,110, 0,97,0,114,0, 121,0,69,0,120, 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,95,0,49, -0,55,0,1,261, -1,3,1,4,1, -3,1494,22,1,121, -1,2198,1495,17,1142, -1,0,1146,1,1195, -1496,17,1497,15,1098, -1,-1,1,5,1498, -20,1499,4,38,83, -0,105,0,109,0, -112,0,108,0,101, -0,65,0,115,0, -115,0,105,0,103, -0,110,0,109,0, -101,0,110,0,116, -0,95,0,49,0, -48,0,1,209,1, -3,1,6,1,5, -1500,22,1,69,1, -1449,1501,17,1502,15, -1098,1,-1,1,5, -1503,20,1504,4,36, +110,0,95,0,57, +0,1,309,1,3, +1,4,1,3,1648, +22,1,144,1,2462, +1014,1,1657,1019,1, +2464,1024,1,205,1649, +17,1650,15,1246,1, +-1,1,5,1651,20, +1652,4,36,66,0, +105,0,110,0,97, +0,114,0,121,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +95,0,56,0,1, +308,1,3,1,4, +1,3,1653,22,1, +143,1,2227,1033,1, +1224,1654,17,1655,15, +1223,1,-1,1,5, +1656,20,1657,4,38, 83,0,105,0,109, 0,112,0,108,0, 101,0,65,0,115, 0,115,0,105,0, 103,0,110,0,109, 0,101,0,110,0, -116,0,95,0,51, -0,1,202,1,3, -1,4,1,3,1505, -22,1,62,1,1701, -1506,17,1507,15,1156, -1,-1,1,5,1508, -20,1509,4,36,70, -0,111,0,114,0, -76,0,111,0,111, -0,112,0,83,0, -116,0,97,0,116, -0,101,0,109,0, -101,0,110,0,116, -0,95,0,51,0, -1,196,1,3,1, -4,1,3,1510,22, -1,56,1,447,1511, -17,1512,15,1513,4, -30,37,0,86,0, -101,0,99,0,116, -0,111,0,114,0, -67,0,111,0,110, -0,115,0,116,0, -97,0,110,0,116, -0,1,-1,1,5, -1514,20,1515,4,32, -86,0,101,0,99, -0,116,0,111,0, -114,0,67,0,111, -0,110,0,115,0, -116,0,97,0,110, -0,116,0,95,0, -49,0,1,231,1, -3,1,8,1,7, -1516,22,1,91,1, -2458,876,1,2459,882, -1,1958,1517,17,1142, -1,0,1146,1,188, -1518,17,1519,15,1121, -1,-1,1,5,1520, -20,1521,4,36,66, -0,105,0,110,0, -97,0,114,0,121, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,95,0,57,0, -1,253,1,3,1, -4,1,3,1522,22, -1,113,1,2462,889, -1,1657,894,1,2464, -899,1,205,1523,17, -1524,15,1121,1,-1, -1,5,1525,20,1526, -4,36,66,0,105, -0,110,0,97,0, -114,0,121,0,69, -0,120,0,112,0, -114,0,101,0,115, -0,115,0,105,0, -111,0,110,0,95, -0,56,0,1,252, -1,3,1,4,1, -3,1527,22,1,112, -1,2227,908,1,1224, -1528,17,1529,15,1098, -1,-1,1,5,1530, -20,1531,4,38,83, -0,105,0,109,0, -112,0,108,0,101, -0,65,0,115,0, -115,0,105,0,103, -0,110,0,109,0, -101,0,110,0,116, -0,95,0,50,0, -50,0,1,221,1, -3,1,6,1,5, -1532,22,1,81,1, -223,1533,17,1534,15, -1121,1,-1,1,5, -1535,20,1536,4,36, -66,0,105,0,110, -0,97,0,114,0, -121,0,69,0,120, -0,112,0,114,0, -101,0,115,0,115, -0,105,0,111,0, -110,0,95,0,55, -0,1,251,1,3, -1,4,1,3,1537, -22,1,111,1,1730, -1538,17,1539,15,1156, -1,-1,1,5,1540, -20,1541,4,36,70, -0,111,0,114,0, -76,0,111,0,111, -0,112,0,83,0, -116,0,97,0,116, -0,101,0,109,0, -101,0,110,0,116, -0,95,0,52,0, -1,197,1,3,1, -4,1,3,1542,22, -1,57,1,476,1543, -17,1544,15,1545,4, -18,37,0,67,0, -111,0,110,0,115, -0,116,0,97,0, -110,0,116,0,1, --1,1,5,1546,20, -1547,4,20,67,0, -111,0,110,0,115, -0,116,0,97,0, -110,0,116,0,95, -0,52,0,1,229, -1,3,1,2,1, -1,1548,22,1,89, -1,477,1549,17,1550, -15,1545,1,-1,1, -5,1551,20,1552,4, -20,67,0,111,0, -110,0,115,0,116, -0,97,0,110,0, -116,0,95,0,51, -0,1,228,1,3, -1,2,1,1,1553, -22,1,88,1,1231, -1554,17,1555,15,1098, -1,-1,1,5,1556, -20,1557,4,36,83, -0,105,0,109,0, -112,0,108,0,101, -0,65,0,115,0, -115,0,105,0,103, -0,110,0,109,0, -101,0,110,0,116, -0,95,0,57,0, -1,208,1,3,1, -6,1,5,1558,22, -1,68,1,479,1559, -17,1560,15,1545,1, --1,1,5,1561,20, -1562,4,20,67,0, -111,0,110,0,115, +116,0,95,0,50, +0,50,0,1,277, +1,3,1,6,1, +5,1658,22,1,112, +1,223,1659,17,1660, +15,1246,1,-1,1, +5,1661,20,1662,4, +36,66,0,105,0, +110,0,97,0,114, +0,121,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,95,0, +55,0,1,307,1, +3,1,4,1,3, +1663,22,1,142,1, +1730,1664,17,1665,15, +1281,1,-1,1,5, +1666,20,1667,4,36, +70,0,111,0,114, +0,76,0,111,0, +111,0,112,0,83, 0,116,0,97,0, -110,0,116,0,95, -0,49,0,1,226, -1,3,1,2,1, -1,1563,22,1,86, -1,480,1564,17,1565, -15,1566,4,26,37, -0,76,0,105,0, -115,0,116,0,67, +116,0,101,0,109, +0,101,0,110,0, +116,0,95,0,52, +0,1,253,1,3, +1,4,1,3,1668, +22,1,88,1,476, +1669,17,1670,15,1671, +4,18,37,0,67, 0,111,0,110,0, 115,0,116,0,97, 0,110,0,116,0, -1,-1,1,5,1567, -20,1568,4,28,76, -0,105,0,115,0, -116,0,67,0,111, +1,-1,1,5,1672, +20,1673,4,20,67, +0,111,0,110,0, +115,0,116,0,97, +0,110,0,116,0, +95,0,52,0,1, +285,1,3,1,2, +1,1,1674,22,1, +120,1,477,1675,17, +1676,15,1671,1,-1, +1,5,1677,20,1678, +4,20,67,0,111, 0,110,0,115,0, 116,0,97,0,110, 0,116,0,95,0, -49,0,1,230,1, -3,1,4,1,3, -1569,22,1,90,1, -1485,1570,17,1571,15, -1098,1,-1,1,5, -1572,20,1573,4,36, +51,0,1,284,1, +3,1,2,1,1, +1679,22,1,119,1, +1231,1680,17,1681,15, +1223,1,-1,1,5, +1682,20,1683,4,36, 83,0,105,0,109, 0,112,0,108,0, 101,0,65,0,115, 0,115,0,105,0, 103,0,110,0,109, 0,101,0,110,0, -116,0,95,0,50, -0,1,201,1,3, -1,4,1,3,1574, -22,1,61,1,1737, -1575,16,0,271,1, -1989,916,1,1990,1576, -17,1142,1,0,1146, -1,2664,1577,16,0, -667,1,242,1578,17, -1579,15,1121,1,-1, -1,5,1580,20,1581, +116,0,95,0,57, +0,1,264,1,3, +1,6,1,5,1684, +22,1,99,1,479, +1685,17,1686,15,1671, +1,-1,1,5,1687, +20,1688,4,20,67, +0,111,0,110,0, +115,0,116,0,97, +0,110,0,116,0, +95,0,49,0,1, +282,1,3,1,2, +1,1,1689,22,1, +117,1,480,1690,17, +1691,15,1692,4,26, +37,0,76,0,105, +0,115,0,116,0, +67,0,111,0,110, +0,115,0,116,0, +97,0,110,0,116, +0,1,-1,1,5, +1693,20,1694,4,28, +76,0,105,0,115, +0,116,0,67,0, +111,0,110,0,115, +0,116,0,97,0, +110,0,116,0,95, +0,49,0,1,286, +1,3,1,4,1, +3,1695,22,1,121, +1,1485,1696,17,1697, +15,1223,1,-1,1, +5,1698,20,1699,4, +36,83,0,105,0, +109,0,112,0,108, +0,101,0,65,0, +115,0,115,0,105, +0,103,0,110,0, +109,0,101,0,110, +0,116,0,95,0, +50,0,1,257,1, +3,1,4,1,3, +1700,22,1,92,1, +1737,1701,16,0,303, +1,1989,1041,1,1990, +1702,17,1267,1,0, +1271,1,242,1703,17, +1704,15,1246,1,-1, +1,5,1705,20,1706, 4,36,66,0,105, 0,110,0,97,0, 114,0,121,0,69, @@ -5430,22 +6222,22 @@ public yyLSLSyntax 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,95, -0,54,0,1,250, +0,54,0,1,306, 1,3,1,4,1, -3,1582,22,1,110, -1,478,1583,17,1584, -15,1545,1,-1,1, -5,1585,20,1586,4, +3,1707,22,1,141, +1,478,1708,17,1709, +15,1671,1,-1,1, +5,1710,20,1711,4, 20,67,0,111,0, 110,0,115,0,116, 0,97,0,110,0, 116,0,95,0,50, -0,1,227,1,3, -1,2,1,1,1587, -22,1,87,1,1001, -1588,17,1589,15,1224, -1,-1,1,5,1590, -20,1591,4,40,84, +0,1,283,1,3, +1,2,1,1,1712, +22,1,118,1,1001, +1713,17,1714,15,1351, +1,-1,1,5,1715, +20,1716,4,40,84, 0,121,0,112,0, 101,0,99,0,97, 0,115,0,116,0, @@ -5454,11 +6246,11 @@ public yyLSLSyntax 115,0,115,0,105, 0,111,0,110,0, 95,0,56,0,1, -275,1,3,1,5, -1,4,1592,22,1, -135,1,1002,1593,17, -1594,15,1224,1,-1, -1,5,1595,20,1596, +331,1,3,1,5, +1,4,1717,22,1, +166,1,1002,1718,17, +1719,15,1351,1,-1, +1,5,1720,20,1721, 4,40,84,0,121, 0,112,0,101,0, 99,0,97,0,115, @@ -5467,116 +6259,445 @@ public yyLSLSyntax 0,101,0,115,0, 115,0,105,0,111, 0,110,0,95,0, -49,0,1,268,1, +49,0,1,324,1, 3,1,5,1,4, -1597,22,1,128,1, -12,1598,19,157,1, -12,1599,5,43,1, -1901,1600,16,0,155, -1,2075,1601,16,0, -155,1,1860,821,1, -1803,787,1,1804,1602, -16,0,155,1,2517, -1603,16,0,155,1, -2413,1604,16,0,155, -1,2198,1605,16,0, -155,1,1873,835,1, -1657,894,1,1989,916, -1,1990,1606,16,0, -155,1,31,1607,16, -0,155,1,32,1608, -16,0,155,1,2105, -814,1,2106,1609,16, -0,155,1,2653,1610, -16,0,155,1,2227, -908,1,2337,1611,16, -0,155,1,2560,1612, -16,0,467,1,2021, -718,1,2458,876,1, -2459,882,1,2462,889, -1,2136,842,1,2464, -899,1,2029,725,1, -2030,731,1,2031,736, -1,2032,741,1,2469, -1613,16,0,454,1, -2035,752,1,2364,827, -1,2039,762,1,1931, -861,1,2041,768,1, -2043,774,1,2045,779, -1,1775,1614,16,0, -155,1,2033,746,1, -2037,757,1,1574,799, -1,1958,1615,16,0, -155,1,13,1616,19, -448,1,13,1617,5, -34,1,1860,821,1, -1803,787,1,2519,1618, -17,1619,15,1620,4, -22,37,0,83,0, +1722,22,1,159,1, +12,1723,19,166,1, +12,1724,5,50,1, +1901,1725,16,0,164, +1,2075,1726,16,0, +164,1,1860,946,1, +1803,912,1,1804,1727, +16,0,164,1,2519, +1728,16,0,164,1, +2549,1729,16,0,164, +1,2413,1730,16,0, +164,1,2198,1731,16, +0,164,1,1873,961, +1,1657,1019,1,2534, +1732,16,0,164,1, +1990,1733,16,0,164, +1,31,1734,16,0, +164,1,32,1735,16, +0,164,1,2105,939, +1,2106,1736,16,0, +164,1,2573,1737,16, +0,164,1,2658,1738, +16,0,284,1,2578, +1739,16,0,164,1, +2227,1033,1,2337,1740, +16,0,164,1,2557, +1741,16,0,164,1, +2781,1742,16,0,164, +1,2565,1743,16,0, +164,1,2021,843,1, +2458,1001,1,2459,1007, +1,2462,1014,1,2136, +968,1,2464,1024,1, +2029,850,1,2030,856, +1,2031,861,1,2032, +866,1,2469,1744,16, +0,536,1,2035,877, +1,2364,952,1,2039, +887,1,1931,986,1, +2041,893,1,2043,899, +1,2045,904,1,2593, +1745,16,0,164,1, +1775,1746,16,0,164, +1,1989,1041,1,2033, +871,1,2037,882,1, +1574,924,1,1958,1747, +16,0,164,1,13, +1748,19,213,1,13, +1749,5,55,1,2536, +1750,17,1751,15,1752, +4,46,37,0,73, +0,110,0,116,0, +86,0,101,0,99, +0,86,0,101,0, +99,0,65,0,114, +0,103,0,83,0, 116,0,97,0,116, 0,101,0,69,0, 118,0,101,0,110, 0,116,0,1,-1, -1,5,1621,20,1622, -4,24,83,0,116, -0,97,0,116,0, -101,0,69,0,118, -0,101,0,110,0, -116,0,95,0,49, -0,1,158,1,3, -1,6,1,5,1623, -22,1,17,1,2521, -1624,16,0,460,1, -2413,1625,16,0,446, -1,1873,835,1,1657, -894,1,1989,916,1, -32,1626,16,0,449, -1,2105,814,1,2364, -827,1,2227,908,1, -1574,799,1,2557,1627, -17,1628,15,1629,4, +1,5,1753,20,1754, +4,48,73,0,110, +0,116,0,86,0, +101,0,99,0,86, +0,101,0,99,0, +65,0,114,0,103, +0,83,0,116,0, +97,0,116,0,101, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,49,0, +1,203,1,3,1, +6,1,5,1755,22, +1,37,1,2643,1756, +17,1757,15,1758,4, 20,37,0,83,0, 116,0,97,0,116, 0,101,0,66,0, 111,0,100,0,121, 0,1,-1,1,5, -1630,20,1631,4,22, +1759,20,1760,4,24, 83,0,116,0,97, 0,116,0,101,0, 66,0,111,0,100, 0,121,0,95,0, -50,0,1,157,1, -3,1,3,1,2, -1632,22,1,16,1, -2559,1633,17,1634,15, -1629,1,-1,1,5, -1635,20,1636,4,22, +49,0,50,0,1, +192,1,3,1,3, +1,2,1761,22,1, +26,1,2647,1762,17, +1763,15,1758,1,-1, +1,5,1764,20,1765, +4,22,83,0,116, +0,97,0,116,0, +101,0,66,0,111, +0,100,0,121,0, +95,0,52,0,1, +184,1,3,1,3, +1,2,1766,22,1, +18,1,1860,946,1, +1803,912,1,2521,1767, +17,1768,15,1769,4, +46,37,0,75,0, +101,0,121,0,73, +0,110,0,116,0, +73,0,110,0,116, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, +0,101,0,110,0, +116,0,1,-1,1, +5,1770,20,1771,4, +48,75,0,101,0, +121,0,73,0,110, +0,116,0,73,0, +110,0,116,0,65, +0,114,0,103,0, 83,0,116,0,97, 0,116,0,101,0, -66,0,111,0,100, -0,121,0,95,0, -49,0,1,156,1, -3,1,2,1,1, -1637,22,1,15,1, -2021,718,1,2458,876, -1,2459,882,1,2462, -889,1,2136,842,1, -2464,899,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,2035,752, -1,2037,757,1,2039, -762,1,1931,861,1, -2041,768,1,2043,774, -1,2045,779,1,2597, -1638,16,0,639,1, -14,1639,19,144,1, -14,1640,5,105,1, -2515,1641,16,0,142, -1,1011,1102,1,1514, -1108,1,9,1113,1, -10,1642,17,1643,15, -1644,4,48,37,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,49,0,1, +204,1,3,1,6, +1,5,1772,22,1, +38,1,2413,1773,16, +0,521,1,2657,1774, +17,1775,15,1758,1, +-1,1,5,1776,20, +1777,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,49,0, +1,181,1,3,1, +2,1,1,1778,22, +1,15,1,1873,961, +1,1657,1019,1,2641, +1779,17,1780,15,1758, +1,-1,1,5,1781, +20,1782,4,24,83, +0,116,0,97,0, +116,0,101,0,66, +0,111,0,100,0, +121,0,95,0,49, +0,54,0,1,196, +1,3,1,3,1, +2,1783,22,1,30, +1,2642,1784,17,1785, +15,1758,1,-1,1, +5,1786,20,1787,4, +24,83,0,116,0, +97,0,116,0,101, +0,66,0,111,0, +100,0,121,0,95, +0,49,0,52,0, +1,194,1,3,1, +3,1,2,1788,22, +1,28,1,1989,1041, +1,2644,1789,17,1790, +15,1758,1,-1,1, +5,1791,20,1792,4, +24,83,0,116,0, +97,0,116,0,101, +0,66,0,111,0, +100,0,121,0,95, +0,49,0,48,0, +1,190,1,3,1, +3,1,2,1793,22, +1,24,1,2645,1794, +17,1795,15,1758,1, +-1,1,5,1796,20, +1797,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,56,0, +1,188,1,3,1, +3,1,2,1798,22, +1,22,1,2646,1799, +17,1800,15,1758,1, +-1,1,5,1801,20, +1802,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,54,0, +1,186,1,3,1, +3,1,2,1803,22, +1,20,1,2037,882, +1,32,1804,16,0, +526,1,2567,1805,17, +1806,15,1807,4,34, +37,0,73,0,110, +0,116,0,65,0, +114,0,103,0,83, +0,116,0,97,0, +116,0,101,0,69, +0,118,0,101,0, +110,0,116,0,1, +-1,1,5,1808,20, +1809,4,36,73,0, +110,0,116,0,65, +0,114,0,103,0, +83,0,116,0,97, +0,116,0,101,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,49,0,1, +200,1,3,1,6, +1,5,1810,22,1, +34,1,2650,1811,17, +1812,15,1758,1,-1, +1,5,1813,20,1814, +4,24,83,0,116, +0,97,0,116,0, +101,0,66,0,111, +0,100,0,121,0, +95,0,49,0,53, +0,1,195,1,3, +1,2,1,1,1815, +22,1,29,1,2651, +1816,17,1817,15,1758, +1,-1,1,5,1818, +20,1819,4,24,83, +0,116,0,97,0, +116,0,101,0,66, +0,111,0,100,0, +121,0,95,0,49, +0,51,0,1,193, +1,3,1,2,1, +1,1820,22,1,27, +1,2652,1821,17,1822, +15,1758,1,-1,1, +5,1823,20,1824,4, +24,83,0,116,0, +97,0,116,0,101, +0,66,0,111,0, +100,0,121,0,95, +0,49,0,49,0, +1,191,1,3,1, +2,1,1,1825,22, +1,25,1,2653,1826, +17,1827,15,1758,1, +-1,1,5,1828,20, +1829,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,57,0, +1,189,1,3,1, +2,1,1,1830,22, +1,23,1,2654,1831, +17,1832,15,1758,1, +-1,1,5,1833,20, +1834,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,55,0, +1,187,1,3,1, +2,1,1,1835,22, +1,21,1,2655,1836, +17,1837,15,1758,1, +-1,1,5,1838,20, +1839,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,53,0, +1,185,1,3,1, +2,1,1,1840,22, +1,19,1,2656,1841, +17,1842,15,1758,1, +-1,1,5,1843,20, +1844,4,22,83,0, +116,0,97,0,116, +0,101,0,66,0, +111,0,100,0,121, +0,95,0,51,0, +1,183,1,3,1, +2,1,1,1845,22, +1,17,1,2575,1846, +17,1847,15,1848,4, +34,37,0,75,0, +101,0,121,0,65, +0,114,0,103,0, +83,0,116,0,97, +0,116,0,101,0, +69,0,118,0,101, +0,110,0,116,0, +1,-1,1,5,1849, +20,1850,4,36,75, +0,101,0,121,0, +65,0,114,0,103, +0,83,0,116,0, +97,0,116,0,101, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,49,0, +1,199,1,3,1, +6,1,5,1851,22, +1,33,1,2551,1852, +17,1853,15,1854,4, +46,37,0,73,0, +110,0,116,0,82, +0,111,0,116,0, +82,0,111,0,116, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, +0,101,0,110,0, +116,0,1,-1,1, +5,1855,20,1856,4, +48,73,0,110,0, +116,0,82,0,111, +0,116,0,82,0, +111,0,116,0,65, +0,114,0,103,0, +83,0,116,0,97, +0,116,0,101,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,49,0,1, +202,1,3,1,6, +1,5,1857,22,1, +36,1,2580,1858,17, +1859,15,1860,4,36, +37,0,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,83,0,116,0, +97,0,116,0,101, +0,69,0,118,0, +101,0,110,0,116, +0,1,-1,1,5, +1861,20,1862,4,38, +86,0,111,0,105, +0,100,0,65,0, +114,0,103,0,83, +0,116,0,97,0, +116,0,101,0,69, +0,118,0,101,0, +110,0,116,0,95, +0,49,0,1,198, +1,3,1,5,1, +4,1863,22,1,32, +1,2227,1033,1,1574, +924,1,2559,1864,17, +1865,15,1866,4,40, +37,0,86,0,101, +0,99,0,116,0, +111,0,114,0,65, +0,114,0,103,0, +83,0,116,0,97, +0,116,0,101,0, +69,0,118,0,101, +0,110,0,116,0, +1,-1,1,5,1867, +20,1868,4,42,86, +0,101,0,99,0, +116,0,111,0,114, +0,65,0,114,0, +103,0,83,0,116, +0,97,0,116,0, +101,0,69,0,118, +0,101,0,110,0, +116,0,95,0,49, +0,1,201,1,3, +1,6,1,5,1869, +22,1,35,1,2021, +843,1,2458,1001,1, +2459,1007,1,2462,1014, +1,2136,968,1,2464, +1024,1,2029,850,1, +2030,856,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2364,952,1,2039,887, +1,1931,986,1,2041, +893,1,2043,899,1, +2045,904,1,2703,1870, +16,0,211,1,2595, +1871,17,1872,15,1873, +4,22,37,0,83, +0,116,0,97,0, +116,0,101,0,69, +0,118,0,101,0, +110,0,116,0,1, +-1,1,5,1874,20, +1875,4,24,83,0, +116,0,97,0,116, +0,101,0,69,0, +118,0,101,0,110, +0,116,0,95,0, +49,0,1,197,1, +3,1,6,1,5, +1876,22,1,31,1, +2597,1877,16,0,761, +1,2648,1878,17,1879, +15,1758,1,-1,1, +5,1880,20,1881,4, +22,83,0,116,0, +97,0,116,0,101, +0,66,0,111,0, +100,0,121,0,95, +0,50,0,1,182, +1,3,1,3,1, +2,1882,22,1,16, +1,2105,939,1,14, +1883,19,144,1,14, +1884,5,115,1,2510, +1885,16,0,706,1, +2513,1886,17,1887,15, +1888,4,30,37,0, +73,0,110,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,1,-1, +1,5,1889,20,1890, +4,32,73,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +95,0,49,0,1, +215,1,3,1,3, +1,2,1891,22,1, +50,1,2514,1892,16, +0,360,1,1260,1221, +1,1011,1227,1,1514, +1233,1,9,1238,1, +10,1893,17,1894,15, +1895,4,48,37,0, 65,0,114,0,103, 0,117,0,109,0, 101,0,110,0,116, @@ -5588,2885 +6709,3266 @@ public yyLSLSyntax 105,0,115,0,116, 0,1,-1,1,5, 140,1,0,1,0, -1645,22,1,18,1, -262,1119,1,1267,1125, -1,481,1646,17,1647, -15,1648,4,26,37, +1896,22,1,39,1, +262,1244,1,1267,1250, +1,2525,1897,16,0, +507,1,1773,1898,16, +0,148,1,2779,1899, +16,0,142,1,19, +1272,1,20,1900,16, +0,142,1,2281,1279, +1,525,1343,1,30, +1901,17,1902,15,1895, +1,-1,1,5,1903, +20,1904,4,50,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,76,0,105, +0,115,0,116,0, +95,0,50,0,1, +206,1,3,1,4, +1,3,1905,22,1, +41,1,283,1299,1, +2543,1906,17,1907,15, +1908,4,30,37,0, +82,0,111,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,1,-1, +1,5,1909,20,1910, +4,32,82,0,111, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +95,0,49,0,1, +217,1,3,1,3, +1,2,1911,22,1, +52,1,2544,1912,16, +0,528,1,40,1304, +1,41,1913,17,1914, +15,1915,4,26,37, 0,65,0,114,0, 103,0,117,0,109, 0,101,0,110,0, 116,0,76,0,105, 0,115,0,116,0, -1,-1,1,5,1649, -20,1650,4,28,65, +1,-1,1,5,724, +1,0,1,0,1916, +22,1,169,1,42, +1917,17,1918,15,1919, +4,38,37,0,69, +0,120,0,112,0, +114,0,101,0,115, +0,115,0,105,0, +111,0,110,0,65, 0,114,0,103,0, 117,0,109,0,101, 0,110,0,116,0, -76,0,105,0,115, -0,116,0,95,0, -49,0,1,278,1, -3,1,2,1,1, -1651,22,1,139,1, -1521,1130,1,1773,1652, -16,0,148,1,19, -1147,1,20,1653,16, -0,142,1,2281,1154, -1,525,1216,1,30, -1654,17,1655,15,1644, -1,-1,1,5,1656, -20,1657,4,50,65, +1,-1,1,5,1920, +20,1921,4,40,69, +0,120,0,112,0, +114,0,101,0,115, +0,115,0,105,0, +111,0,110,0,65, 0,114,0,103,0, 117,0,109,0,101, 0,110,0,116,0, +95,0,49,0,1, +336,1,3,1,2, +1,1,1922,22,1, +172,1,44,1310,1, +47,1311,1,48,1317, +1,49,1323,1,50, +1328,1,51,1333,1, +305,1338,1,63,1349, +1,1521,1255,1,66, +1355,1,67,1360,1, +1478,1583,1,69,1370, +1,70,1375,1,68, +1365,1,74,1380,1, +1013,1385,1,2335,1923, +16,0,148,1,1332, +1390,1,1048,1470,1, +2591,1924,16,0,142, +1,82,1407,1,1296, +1294,1,1341,1424,1, +328,1429,1,1303,1434, +1,1096,1439,1,93, +1445,1,1550,1450,1, +2770,1925,17,1926,15, +1895,1,-1,1,5, +140,1,0,1,0, +1896,1,2528,1927,17, +1928,15,1929,4,30, +37,0,86,0,101, +0,99,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +1,-1,1,5,1930, +20,1931,4,32,86, +0,101,0,99,0, 68,0,101,0,99, 0,108,0,97,0, 114,0,97,0,116, 0,105,0,111,0, -110,0,76,0,105, +110,0,95,0,49, +0,1,216,1,3, +1,3,1,2,1932, +22,1,51,1,2529, +1933,16,0,515,1, +352,1475,1,107,1464, +1,1114,1469,1,2540, +1934,16,0,524,1, +1370,1578,1,118,1481, +1,1123,1486,1,371, +1491,1,1377,1497,1, +375,1502,1,377,1507, +1,827,1457,1,380, +1517,1,883,1523,1, +373,1535,1,130,1540, +1,379,1512,1,143, +1545,1,1152,1551,1, +387,1935,16,0,656, +1,1406,1556,1,2582, +1936,17,1937,15,1895, +1,-1,1,5,140, +1,0,1,0,1896, +1,1159,1563,1,157, +1568,1,1413,1573,1, +1665,1600,1,412,1938, +16,0,695,1,1094, +1939,16,0,726,1, +172,1595,1,1188,1605, +1,437,1940,16,0, +765,1,1442,1610,1, +1694,1941,16,0,148, +1,942,1616,1,1195, +1622,1,1449,1627,1, +1701,1632,1,447,1637, +1,188,1644,1,205, +1649,1,2467,1942,17, +1943,15,1895,1,-1, +1,5,1944,20,1945, +4,50,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,95,0, +49,0,1,205,1, +3,1,2,1,1, +1946,22,1,40,1, +461,1947,16,0,726, +1,464,1948,17,1949, +15,1915,1,-1,1, +5,1950,20,1951,4, +28,65,0,114,0, +103,0,117,0,109, +0,101,0,110,0, +116,0,76,0,105, 0,115,0,116,0, 95,0,50,0,1, -160,1,3,1,4, -1,3,1658,22,1, -20,1,283,1172,1, -40,1177,1,41,1659, -17,1660,15,1648,1, --1,1,5,601,1, -0,1,0,1661,22, -1,138,1,42,1662, -17,1663,15,1664,4, -38,37,0,69,0, -120,0,112,0,114, -0,101,0,115,0, -115,0,105,0,111, -0,110,0,65,0, -114,0,103,0,117, -0,109,0,101,0, -110,0,116,0,1, --1,1,5,1665,20, -1666,4,40,69,0, -120,0,112,0,114, -0,101,0,115,0, -115,0,105,0,111, -0,110,0,65,0, -114,0,103,0,117, -0,109,0,101,0, -110,0,116,0,95, -0,49,0,1,280, -1,3,1,2,1, -1,1667,22,1,141, -1,44,1183,1,1260, -1096,1,47,1184,1, -48,1190,1,49,1196, -1,50,1201,1,51, -1206,1,305,1211,1, -63,1222,1,66,1228, -1,67,1233,1,1478, -1458,1,69,1243,1, -70,1248,1,68,1238, -1,74,1253,1,1013, -1258,1,2335,1668,16, -0,148,1,1332,1263, -1,1048,1344,1,82, -1280,1,1296,1167,1, -1341,1297,1,328,1302, -1,1303,1307,1,1096, -1312,1,93,1318,1, -1550,1323,1,352,1349, -1,107,1338,1,1114, -1343,1,1370,1453,1, -118,1355,1,1123,1360, -1,371,1365,1,1377, -1371,1,375,1376,1, -377,1381,1,379,1386, -1,380,1391,1,883, -1397,1,2642,1669,17, -1670,15,1644,1,-1, -1,5,140,1,0, -1,0,1645,1,373, -1409,1,130,1414,1, -2651,1671,16,0,142, -1,143,1419,1,1152, -1426,1,387,1672,16, -0,555,1,1406,1431, -1,1159,1438,1,157, -1443,1,1413,1448,1, -1665,1474,1,412,1673, -16,0,576,1,1094, -1674,16,0,603,1, -172,1469,1,827,1331, -1,1188,1479,1,437, -1675,16,0,650,1, -1442,1484,1,1694,1676, -16,0,148,1,942, -1490,1,1195,1496,1, -1449,1501,1,1701,1506, -1,447,1511,1,188, -1518,1,205,1523,1, -2467,1677,17,1678,15, -1644,1,-1,1,5, -1679,20,1680,4,50, -65,0,114,0,103, -0,117,0,109,0, -101,0,110,0,116, -0,68,0,101,0, -99,0,108,0,97, -0,114,0,97,0, -116,0,105,0,111, -0,110,0,76,0, +335,1,3,1,4, +1,3,1952,22,1, +171,1,1224,1654,1, +223,1659,1,1730,1664, +1,476,1669,1,477, +1675,1,1231,1680,1, +479,1685,1,480,1690, +1,1485,1696,1,459, +1953,17,1954,15,1915, +1,-1,1,5,724, +1,0,1,0,1916, +1,242,1703,1,478, +1708,1,481,1955,17, +1956,15,1915,1,-1, +1,5,1957,20,1958, +4,28,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,76,0, 105,0,115,0,116, 0,95,0,49,0, -1,159,1,3,1, -2,1,1,1681,22, -1,19,1,461,1682, -16,0,603,1,464, -1683,17,1684,15,1648, -1,-1,1,5,1685, -20,1686,4,28,65, +1,334,1,3,1, +2,1,1,1959,22, +1,170,1,1001,1713, +1,1002,1718,1,2509, +1960,17,1961,15,1962, +4,30,37,0,75, +0,101,0,121,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,1,-1,1, +5,1963,20,1964,4, +32,75,0,101,0, +121,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,95, +0,49,0,1,214, +1,3,1,3,1, +2,1965,22,1,49, +1,15,1966,19,336, +1,15,1967,5,6, +1,2785,1968,16,0, +334,1,1114,1969,16, +0,339,1,1621,1970, +16,0,764,1,40, +1971,16,0,649,1, +19,1272,1,9,1238, +1,16,1972,19,136, +1,16,1973,5,147, +1,256,1974,16,0, +203,1,1261,1975,16, +0,203,1,509,1976, +16,0,203,1,2769, +1977,16,0,790,1, +9,1978,16,0,134, +1,2522,1979,16,0, +505,1,2021,843,1, +1775,1980,16,0,203, +1,2029,850,1,2030, +856,1,2031,861,1, +2032,866,1,2786,1981, +16,0,203,1,277, +1982,16,0,203,1, +2537,1983,16,0,522, +1,2037,882,1,2039, +887,1,32,1984,16, +0,203,1,2041,893, +1,2293,1985,16,0, +203,1,2043,899,1, +2045,904,1,40,1986, +16,0,182,1,41, +1987,16,0,203,1, +1297,1988,16,0,203, +1,43,1989,16,0, +203,1,44,1990,16, +0,182,1,1803,912, +1,1804,1991,16,0, +203,1,299,1992,16, +0,203,1,2480,1993, +17,1994,15,1995,4, +24,37,0,73,0, +110,0,116,0,65, +0,114,0,103,0, +69,0,118,0,101, +0,110,0,116,0, +1,-1,1,5,1996, +20,1997,4,26,73, +0,110,0,116,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,55,0, +1,369,1,3,1, +2,1,1,1998,22, +1,205,1,2560,1999, +16,0,549,1,52, +2000,16,0,203,1, +2484,2001,17,2002,15, +1995,1,-1,1,5, +2003,20,2004,4,26, +73,0,110,0,116, +0,65,0,114,0, +103,0,69,0,118, +0,101,0,110,0, +116,0,95,0,51, +0,1,365,1,3, +1,2,1,1,2005, +22,1,201,1,1515, +2006,16,0,203,1, +2318,2007,16,0,203, +1,2491,2008,17,2009, +15,2010,4,26,37, +0,86,0,111,0, +105,0,100,0,65, 0,114,0,103,0, -117,0,109,0,101, +69,0,118,0,101, 0,110,0,116,0, -76,0,105,0,115, +1,-1,1,5,2011, +20,2012,4,28,86, +0,111,0,105,0, +100,0,65,0,114, +0,103,0,69,0, +118,0,101,0,110, 0,116,0,95,0, -50,0,1,279,1, -3,1,4,1,3, -1687,22,1,140,1, -1224,1528,1,223,1533, -1,1730,1538,1,476, -1543,1,477,1549,1, -1231,1554,1,479,1559, -1,480,1564,1,1485, -1570,1,459,1688,17, -1689,15,1648,1,-1, -1,5,601,1,0, -1,0,1661,1,242, -1578,1,478,1583,1, -2506,1690,17,1691,15, -1644,1,-1,1,5, -140,1,0,1,0, -1645,1,1001,1588,1, -1002,1593,1,15,1692, -19,257,1,15,1693, -5,6,1,1114,1694, -16,0,299,1,1621, -1695,16,0,649,1, -2657,1696,16,0,255, -1,40,1697,16,0, -552,1,19,1147,1, -9,1113,1,16,1698, -19,136,1,16,1699, -5,139,1,256,1700, -16,0,187,1,1261, -1701,16,0,187,1, -509,1702,16,0,187, -1,9,1703,16,0, -134,1,2021,718,1, -1775,1704,16,0,187, -1,2029,725,1,2030, -731,1,2031,736,1, -2032,741,1,2033,746, -1,277,1705,16,0, -187,1,2035,752,1, -2037,757,1,2039,762, -1,32,1706,16,0, -187,1,2041,768,1, -2293,1707,16,0,187, -1,2043,774,1,2045, -779,1,40,1708,16, -0,166,1,41,1709, -16,0,187,1,1297, -1710,16,0,187,1, -43,1711,16,0,187, -1,44,1712,16,0, -166,1,1803,787,1, -1804,1713,16,0,187, -1,299,1714,16,0, -187,1,2480,1715,17, -1716,15,1717,4,12, -37,0,69,0,118, -0,101,0,110,0, -116,0,1,-1,1, -5,1718,20,1719,4, -16,69,0,118,0, -101,0,110,0,116, -0,95,0,50,0, -53,0,1,312,1, +54,0,1,358,1, 3,1,2,1,1, -1720,22,1,173,1, -52,1721,16,0,187, -1,2484,1722,17,1723, -15,1717,1,-1,1, -5,1724,20,1725,4, -16,69,0,118,0, +2013,22,1,194,1, +62,2014,16,0,225, +1,63,2015,16,0, +182,1,2495,2016,17, +2017,15,2010,1,-1, +1,5,2018,20,2019, +4,28,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,69,0,118,0, 101,0,110,0,116, 0,95,0,50,0, -49,0,1,308,1, -3,1,2,1,1, -1726,22,1,169,1, -1515,1727,16,0,187, -1,2318,1728,16,0, -187,1,2491,1729,17, -1730,15,1717,1,-1, -1,5,1731,20,1732, -4,16,69,0,118, +1,354,1,3,1, +2,1,1,2020,22, +1,190,1,2576,2021, +16,0,579,1,2075, +2022,16,0,203,1, +1574,924,1,1479,2023, +16,0,203,1,71, +2024,16,0,203,1, +1658,2025,16,0,795, +1,1833,2026,16,0, +326,1,1834,2027,16, +0,203,1,2337,2028, +16,0,203,1,79, +2029,16,0,203,1, +1335,2030,16,0,203, +1,322,2031,16,0, +203,1,76,2032,16, +0,203,1,85,2033, +16,0,203,1,89, +2034,16,0,203,1, +2033,871,1,2035,877, +1,346,2035,16,0, +203,1,97,2036,16, +0,203,1,2106,2037, +16,0,203,1,102, +2038,16,0,203,1, +1860,946,1,2458,1001, +1,2364,952,1,1990, +2039,16,0,203,1, +112,2040,16,0,203, +1,1117,2041,16,0, +203,1,1873,961,1, +1875,2042,16,0,446, +1,1876,2043,16,0, +203,1,2552,2044,16, +0,540,1,124,2045, +16,0,203,1,2478, +2046,17,2047,15,1995, +1,-1,1,5,2048, +20,2049,4,26,73, +0,110,0,116,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,57,0, +1,371,1,3,1, +2,1,1,2050,22, +1,207,1,2136,968, +1,381,2051,16,0, +203,1,525,2052,16, +0,203,1,137,2053, +16,0,203,1,2568, +2054,16,0,683,1, +1901,2055,16,0,203, +1,1153,2056,16,0, +203,1,151,2057,16, +0,203,1,1407,2058, +16,0,203,1,2581, +2059,16,0,779,1, +2413,2060,16,0,203, +1,406,2061,16,0, +203,1,1371,2062,16, +0,203,1,2105,939, +1,166,2063,16,0, +203,1,1622,2064,16, +0,203,1,1931,986, +1,1932,2065,16,0, +539,1,1933,2066,16, +0,203,1,431,2067, +16,0,203,1,1585, +2068,16,0,203,1, +182,2069,16,0,203, +1,1189,2070,16,0, +203,1,1443,2071,16, +0,203,1,1695,2072, +16,0,203,1,2198, +2073,16,0,203,1, +447,2074,16,0,203, +1,199,2075,16,0, +203,1,2459,1007,1, +1958,2076,16,0,203, +1,2462,1014,1,1657, +1019,1,2464,1024,1, +1659,2077,16,0,203, +1,459,2078,16,0, +203,1,462,2079,16, +0,203,1,2471,2080, +17,2081,15,2082,4, +36,37,0,75,0, +101,0,121,0,73, +0,110,0,116,0, +73,0,110,0,116, +0,65,0,114,0, +103,0,69,0,118, 0,101,0,110,0, -116,0,95,0,49, -0,52,0,1,301, -1,3,1,2,1, -1,1733,22,1,162, -1,62,1734,16,0, -202,1,63,1735,16, -0,166,1,2495,1736, -17,1737,15,1717,1, --1,1,5,1738,20, -1739,4,16,69,0, -118,0,101,0,110, -0,116,0,95,0, -49,0,48,0,1, -297,1,3,1,2, -1,1,1740,22,1, -158,1,2075,1741,16, -0,187,1,1574,799, -1,1479,1742,16,0, -187,1,71,1743,16, -0,187,1,1658,1744, -16,0,672,1,1833, -1745,16,0,288,1, -1834,1746,16,0,187, -1,2337,1747,16,0, -187,1,79,1748,16, -0,187,1,1335,1749, -16,0,187,1,322, -1750,16,0,187,1, -76,1751,16,0,187, -1,85,1752,16,0, -187,1,89,1753,16, -0,187,1,346,1754, -16,0,187,1,97, -1755,16,0,187,1, -2106,1756,16,0,187, -1,102,1757,16,0, -187,1,1860,821,1, -2458,876,1,2364,827, -1,1990,1758,16,0, -187,1,112,1759,16, -0,187,1,1117,1760, -16,0,187,1,1873, -835,1,1875,1761,16, -0,400,1,1876,1762, -16,0,187,1,124, -1763,16,0,187,1, -2478,1764,17,1765,15, -1717,1,-1,1,5, -1766,20,1767,4,16, +116,0,1,-1,1, +5,2083,20,2084,4, +38,75,0,101,0, +121,0,73,0,110, +0,116,0,73,0, +110,0,116,0,65, +0,114,0,103,0, 69,0,118,0,101, 0,110,0,116,0, -95,0,50,0,55, -0,1,314,1,3, -1,2,1,1,1768, -22,1,175,1,2136, -842,1,381,1769,16, -0,187,1,2641,1770, -16,0,642,1,137, -1771,16,0,187,1, -1901,1772,16,0,187, -1,2658,1773,16,0, -187,1,1153,1774,16, -0,187,1,151,1775, -16,0,187,1,1407, -1776,16,0,187,1, -1659,1777,16,0,187, -1,2413,1778,16,0, -187,1,406,1779,16, -0,187,1,1371,1780, -16,0,187,1,2105, -814,1,166,1781,16, -0,187,1,525,1782, -16,0,187,1,1622, -1783,16,0,187,1, -1931,861,1,1932,1784, -16,0,456,1,1933, -1785,16,0,187,1, -431,1786,16,0,187, -1,1585,1787,16,0, -187,1,182,1788,16, -0,187,1,1189,1789, -16,0,187,1,1443, -1790,16,0,187,1, -1695,1791,16,0,187, -1,2198,1792,16,0, -187,1,447,1793,16, -0,187,1,199,1794, -16,0,187,1,2459, -882,1,1958,1795,16, -0,187,1,2462,889, -1,1657,894,1,2464, -899,1,459,1796,16, -0,187,1,462,1797, -16,0,187,1,2471, -1798,17,1799,15,1717, -1,-1,1,5,1800, -20,1801,4,16,69, +95,0,49,0,1, +378,1,3,1,2, +1,1,2085,22,1, +214,1,2472,2086,17, +2087,15,2088,4,36, +37,0,73,0,110, +0,116,0,86,0, +101,0,99,0,86, +0,101,0,99,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,1,-1,1,5, +2089,20,2090,4,38, +73,0,110,0,116, +0,86,0,101,0, +99,0,86,0,101, +0,99,0,65,0, +114,0,103,0,69, 0,118,0,101,0, 110,0,116,0,95, -0,51,0,52,0, -1,321,1,3,1, -2,1,1,1802,22, -1,182,1,2472,1803, -17,1804,15,1717,1, --1,1,5,1805,20, -1806,4,16,69,0, -118,0,101,0,110, -0,116,0,95,0, -51,0,51,0,1, -320,1,3,1,2, -1,1,1807,22,1, -181,1,2473,1808,17, -1809,15,1717,1,-1, -1,5,1810,20,1811, -4,16,69,0,118, -0,101,0,110,0, -116,0,95,0,51, -0,50,0,1,319, +0,49,0,1,377, 1,3,1,2,1, -1,1812,22,1,180, -1,2474,1813,17,1814, -15,1717,1,-1,1, -5,1815,20,1816,4, -16,69,0,118,0, -101,0,110,0,116, -0,95,0,51,0, -49,0,1,318,1, -3,1,2,1,1, -1817,22,1,179,1, -2475,1818,17,1819,15, -1717,1,-1,1,5, -1820,20,1821,4,16, +1,2091,22,1,213, +1,2473,2092,17,2093, +15,2094,4,36,37, +0,73,0,110,0, +116,0,82,0,111, +0,116,0,82,0, +111,0,116,0,65, +0,114,0,103,0, 69,0,118,0,101, 0,110,0,116,0, -95,0,51,0,48, -0,1,317,1,3, -1,2,1,1,1822, -22,1,178,1,2476, -1823,17,1824,15,1717, -1,-1,1,5,1825, -20,1826,4,16,69, -0,118,0,101,0, -110,0,116,0,95, -0,50,0,57,0, -1,316,1,3,1, -2,1,1,1827,22, -1,177,1,2477,1828, -17,1829,15,1717,1, --1,1,5,1830,20, -1831,4,16,69,0, +1,-1,1,5,2095, +20,2096,4,38,73, +0,110,0,116,0, +82,0,111,0,116, +0,82,0,111,0, +116,0,65,0,114, +0,103,0,69,0, 118,0,101,0,110, 0,116,0,95,0, -50,0,56,0,1, -315,1,3,1,2, -1,1,1832,22,1, -176,1,2227,908,1, -2479,1833,17,1834,15, -1717,1,-1,1,5, -1835,20,1836,4,16, +49,0,1,376,1, +3,1,2,1,1, +2097,22,1,212,1, +2474,2098,17,2099,15, +2100,4,30,37,0, +86,0,101,0,99, +0,116,0,111,0, +114,0,65,0,114, +0,103,0,69,0, +118,0,101,0,110, +0,116,0,1,-1, +1,5,2101,20,2102, +4,32,86,0,101, +0,99,0,116,0, +111,0,114,0,65, +0,114,0,103,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,51,0,1, +375,1,3,1,2, +1,1,2103,22,1, +211,1,2475,2104,17, +2105,15,2100,1,-1, +1,5,2106,20,2107, +4,32,86,0,101, +0,99,0,116,0, +111,0,114,0,65, +0,114,0,103,0, 69,0,118,0,101, 0,110,0,116,0, -95,0,50,0,54, -0,1,313,1,3, -1,2,1,1,1837, -22,1,174,1,1225, -1838,16,0,187,1, -2481,1839,17,1840,15, -1717,1,-1,1,5, -1841,20,1842,4,16, +95,0,50,0,1, +374,1,3,1,2, +1,1,2108,22,1, +210,1,2476,2109,17, +2110,15,2100,1,-1, +1,5,2111,20,2112, +4,32,86,0,101, +0,99,0,116,0, +111,0,114,0,65, +0,114,0,103,0, 69,0,118,0,101, 0,110,0,116,0, -95,0,50,0,52, -0,1,311,1,3, -1,2,1,1,1843, -22,1,172,1,2482, -1844,17,1845,15,1717, -1,-1,1,5,1846, -20,1847,4,16,69, +95,0,49,0,1, +373,1,3,1,2, +1,1,2113,22,1, +209,1,2477,2114,17, +2115,15,1995,1,-1, +1,5,2116,20,2117, +4,28,73,0,110, +0,116,0,65,0, +114,0,103,0,69, 0,118,0,101,0, 110,0,116,0,95, -0,50,0,51,0, -1,310,1,3,1, -2,1,1,1848,22, -1,171,1,2483,1849, -17,1850,15,1717,1, --1,1,5,1851,20, -1852,4,16,69,0, +0,49,0,48,0, +1,372,1,3,1, +2,1,1,2118,22, +1,208,1,2227,1033, +1,2479,2119,17,2120, +15,1995,1,-1,1, +5,2121,20,2122,4, +26,73,0,110,0, +116,0,65,0,114, +0,103,0,69,0, 118,0,101,0,110, 0,116,0,95,0, -50,0,50,0,1, -309,1,3,1,2, -1,1,1853,22,1, -170,1,1731,1854,16, -0,187,1,2485,1855, -17,1856,15,1717,1, --1,1,5,1857,20, -1858,4,16,69,0, +56,0,1,370,1, +3,1,2,1,1, +2123,22,1,206,1, +1225,2124,16,0,203, +1,2481,2125,17,2126, +15,1995,1,-1,1, +5,2127,20,2128,4, +26,73,0,110,0, +116,0,65,0,114, +0,103,0,69,0, 118,0,101,0,110, 0,116,0,95,0, -50,0,48,0,1, -307,1,3,1,2, -1,1,1859,22,1, -168,1,2486,1860,17, -1861,15,1717,1,-1, -1,5,1862,20,1863, -4,16,69,0,118, +54,0,1,368,1, +3,1,2,1,1, +2129,22,1,204,1, +2482,2130,17,2131,15, +1995,1,-1,1,5, +2132,20,2133,4,26, +73,0,110,0,116, +0,65,0,114,0, +103,0,69,0,118, 0,101,0,110,0, -116,0,95,0,49, -0,57,0,1,306, +116,0,95,0,53, +0,1,367,1,3, +1,2,1,1,2134, +22,1,203,1,2483, +2135,17,2136,15,1995, +1,-1,1,5,2137, +20,2138,4,26,73, +0,110,0,116,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,52,0, +1,366,1,3,1, +2,1,1,2139,22, +1,202,1,1731,2140, +16,0,203,1,2485, +2141,17,2142,15,1995, +1,-1,1,5,2143, +20,2144,4,26,73, +0,110,0,116,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,50,0, +1,364,1,3,1, +2,1,1,2145,22, +1,200,1,2486,2146, +17,2147,15,1995,1, +-1,1,5,2148,20, +2149,4,26,73,0, +110,0,116,0,65, +0,114,0,103,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,49,0,1, +363,1,3,1,2, +1,1,2150,22,1, +199,1,2487,2151,17, +2152,15,2153,4,24, +37,0,75,0,101, +0,121,0,65,0, +114,0,103,0,69, +0,118,0,101,0, +110,0,116,0,1, +-1,1,5,2154,20, +2155,4,26,75,0, +101,0,121,0,65, +0,114,0,103,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,50,0,1, +362,1,3,1,2, +1,1,2156,22,1, +198,1,2488,2157,17, +2158,15,2153,1,-1, +1,5,2159,20,2160, +4,26,75,0,101, +0,121,0,65,0, +114,0,103,0,69, +0,118,0,101,0, +110,0,116,0,95, +0,49,0,1,361, 1,3,1,2,1, -1,1864,22,1,167, -1,2487,1865,17,1866, -15,1717,1,-1,1, -5,1867,20,1868,4, -16,69,0,118,0, +1,2161,22,1,197, +1,2489,2162,17,2163, +15,2010,1,-1,1, +5,2164,20,2165,4, +28,86,0,111,0, +105,0,100,0,65, +0,114,0,103,0, +69,0,118,0,101, +0,110,0,116,0, +95,0,56,0,1, +360,1,3,1,2, +1,1,2166,22,1, +196,1,2490,2167,17, +2168,15,2010,1,-1, +1,5,2169,20,2170, +4,28,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,69,0,118,0, 101,0,110,0,116, -0,95,0,49,0, -56,0,1,305,1, -3,1,2,1,1, -1869,22,1,166,1, -2488,1870,17,1871,15, -1717,1,-1,1,5, -1872,20,1873,4,16, +0,95,0,55,0, +1,359,1,3,1, +2,1,1,2171,22, +1,195,1,1989,1041, +1,2492,2172,17,2173, +15,2010,1,-1,1, +5,2174,20,2175,4, +28,86,0,111,0, +105,0,100,0,65, +0,114,0,103,0, 69,0,118,0,101, 0,110,0,116,0, -95,0,49,0,55, -0,1,304,1,3, -1,2,1,1,1874, -22,1,165,1,2489, -1875,17,1876,15,1717, -1,-1,1,5,1877, -20,1878,4,16,69, +95,0,53,0,1, +357,1,3,1,2, +1,1,2176,22,1, +193,1,2493,2177,17, +2178,15,2010,1,-1, +1,5,2179,20,2180, +4,28,86,0,111, +0,105,0,100,0, +65,0,114,0,103, +0,69,0,118,0, +101,0,110,0,116, +0,95,0,52,0, +1,356,1,3,1, +2,1,1,2181,22, +1,192,1,2494,2182, +17,2183,15,2010,1, +-1,1,5,2184,20, +2185,4,28,86,0, +111,0,105,0,100, +0,65,0,114,0, +103,0,69,0,118, +0,101,0,110,0, +116,0,95,0,51, +0,1,355,1,3, +1,2,1,1,2186, +22,1,191,1,236, +2187,16,0,203,1, +2496,2188,17,2189,15, +2010,1,-1,1,5, +2190,20,2191,4,28, +86,0,111,0,105, +0,100,0,65,0, +114,0,103,0,69, 0,118,0,101,0, 110,0,116,0,95, -0,49,0,54,0, -1,303,1,3,1, -2,1,1,1879,22, -1,164,1,2490,1880, -17,1881,15,1717,1, --1,1,5,1882,20, -1883,4,16,69,0, -118,0,101,0,110, -0,116,0,95,0, -49,0,53,0,1, -302,1,3,1,2, -1,1,1884,22,1, -163,1,1989,916,1, -2492,1885,17,1886,15, -1717,1,-1,1,5, -1887,20,1888,4,16, +0,49,0,1,353, +1,3,1,2,1, +1,2192,22,1,189, +1,2497,2193,17,2194, +15,2195,4,12,37, +0,69,0,118,0, +101,0,110,0,116, +0,1,-1,1,5, +2196,20,2197,4,14, 69,0,118,0,101, 0,110,0,116,0, -95,0,49,0,51, -0,1,300,1,3, -1,2,1,1,1889, -22,1,161,1,2493, -1890,17,1891,15,1717, -1,-1,1,5,1892, -20,1893,4,16,69, +95,0,57,0,1, +352,1,3,1,2, +1,1,2198,22,1, +188,1,2498,2199,17, +2200,15,2195,1,-1, +1,5,2201,20,2202, +4,14,69,0,118, +0,101,0,110,0, +116,0,95,0,56, +0,1,351,1,3, +1,2,1,1,2203, +22,1,187,1,2499, +2204,17,2205,15,2195, +1,-1,1,5,2206, +20,2207,4,14,69, 0,118,0,101,0, 110,0,116,0,95, -0,49,0,50,0, -1,299,1,3,1, -2,1,1,1894,22, -1,160,1,2494,1895, -17,1896,15,1717,1, --1,1,5,1897,20, -1898,4,16,69,0, -118,0,101,0,110, -0,116,0,95,0, -49,0,49,0,1, -298,1,3,1,2, -1,1,1899,22,1, -159,1,236,1900,16, -0,187,1,2496,1901, -17,1902,15,1717,1, --1,1,5,1903,20, -1904,4,14,69,0, +0,55,0,1,350, +1,3,1,2,1, +1,2208,22,1,186, +1,2500,2209,17,2210, +15,2195,1,-1,1, +5,2211,20,2212,4, +14,69,0,118,0, +101,0,110,0,116, +0,95,0,54,0, +1,349,1,3,1, +2,1,1,2213,22, +1,185,1,2501,2214, +17,2215,15,2195,1, +-1,1,5,2216,20, +2217,4,14,69,0, 118,0,101,0,110, 0,116,0,95,0, -57,0,1,296,1, +53,0,1,348,1, 3,1,2,1,1, -1905,22,1,157,1, -2497,1906,17,1907,15, -1717,1,-1,1,5, -1908,20,1909,4,14, +2218,22,1,184,1, +2502,2219,17,2220,15, +2195,1,-1,1,5, +2221,20,2222,4,14, 69,0,118,0,101, 0,110,0,116,0, -95,0,56,0,1, -295,1,3,1,2, -1,1,1910,22,1, -156,1,2498,1911,17, -1912,15,1717,1,-1, -1,5,1913,20,1914, +95,0,52,0,1, +347,1,3,1,2, +1,1,2223,22,1, +183,1,2503,2224,17, +2225,15,2195,1,-1, +1,5,2226,20,2227, 4,14,69,0,118, 0,101,0,110,0, -116,0,95,0,55, -0,1,294,1,3, -1,2,1,1,1915, -22,1,155,1,2499, -1916,17,1917,15,1717, -1,-1,1,5,1918, -20,1919,4,14,69, +116,0,95,0,51, +0,1,346,1,3, +1,2,1,1,2228, +22,1,182,1,2504, +2229,17,2230,15,2195, +1,-1,1,5,2231, +20,2232,4,14,69, 0,118,0,101,0, 110,0,116,0,95, -0,54,0,1,293, +0,50,0,1,345, 1,3,1,2,1, -1,1920,22,1,154, -1,2500,1921,17,1922, -15,1717,1,-1,1, -5,1923,20,1924,4, +1,2233,22,1,181, +1,2505,2234,17,2235, +15,2195,1,-1,1, +5,2236,20,2237,4, 14,69,0,118,0, 101,0,110,0,116, -0,95,0,53,0, -1,292,1,3,1, -2,1,1,1925,22, -1,153,1,2501,1926, -17,1927,15,1717,1, --1,1,5,1928,20, -1929,4,14,69,0, -118,0,101,0,110, -0,116,0,95,0, -52,0,1,291,1, -3,1,2,1,1, -1930,22,1,152,1, -2502,1931,17,1932,15, -1717,1,-1,1,5, -1933,20,1934,4,14, -69,0,118,0,101, -0,110,0,116,0, -95,0,51,0,1, -290,1,3,1,2, -1,1,1935,22,1, -151,1,2503,1936,17, -1937,15,1717,1,-1, -1,5,1938,20,1939, -4,14,69,0,118, -0,101,0,110,0, -116,0,95,0,50, -0,1,289,1,3, -1,2,1,1,1940, -22,1,150,1,2504, -1941,17,1942,15,1717, -1,-1,1,5,1943, -20,1944,4,14,69, -0,118,0,101,0, -110,0,116,0,95, -0,49,0,1,288, -1,3,1,2,1, -1,1945,22,1,149, -1,2505,1946,16,0, -433,1,217,1947,16, -0,187,1,1756,1948, -16,0,187,1,17, -1949,19,154,1,17, -1950,5,117,1,1, -1951,17,1952,15,1953, -4,18,37,0,84, -0,121,0,112,0, -101,0,110,0,97, -0,109,0,101,0, -1,-1,1,5,1954, -20,1955,4,20,84, -0,121,0,112,0, -101,0,110,0,97, -0,109,0,101,0, -95,0,55,0,1, -287,1,3,1,2, -1,1,1956,22,1, -148,1,2,1957,17, -1958,15,1953,1,-1, -1,5,1959,20,1960, -4,20,84,0,121, -0,112,0,101,0, -110,0,97,0,109, -0,101,0,95,0, -54,0,1,286,1, -3,1,2,1,1, -1961,22,1,147,1, -3,1962,17,1963,15, -1953,1,-1,1,5, -1964,20,1965,4,20, -84,0,121,0,112, +0,95,0,49,0, +1,344,1,3,1, +2,1,1,2238,22, +1,180,1,2506,2239, +16,0,482,1,217, +2240,16,0,203,1, +1756,2241,16,0,203, +1,17,2242,19,163, +1,17,2243,5,134, +1,1,2244,17,2245, +15,2246,4,18,37, +0,84,0,121,0, +112,0,101,0,110, +0,97,0,109,0, +101,0,1,-1,1, +5,2247,20,2248,4, +20,84,0,121,0, +112,0,101,0,110, +0,97,0,109,0, +101,0,95,0,55, +0,1,343,1,3, +1,2,1,1,2249, +22,1,179,1,2, +2250,17,2251,15,2246, +1,-1,1,5,2252, +20,2253,4,20,84, +0,121,0,112,0, +101,0,110,0,97, +0,109,0,101,0, +95,0,54,0,1, +342,1,3,1,2, +1,1,2254,22,1, +178,1,3,2255,17, +2256,15,2246,1,-1, +1,5,2257,20,2258, +4,20,84,0,121, +0,112,0,101,0, +110,0,97,0,109, +0,101,0,95,0, +53,0,1,341,1, +3,1,2,1,1, +2259,22,1,177,1, +4,2260,17,2261,15, +2246,1,-1,1,5, +2262,20,2263,4,20, +84,0,121,0,112, +0,101,0,110,0, +97,0,109,0,101, +0,95,0,52,0, +1,340,1,3,1, +2,1,1,2264,22, +1,176,1,5,2265, +17,2266,15,2246,1, +-1,1,5,2267,20, +2268,4,20,84,0, +121,0,112,0,101, +0,110,0,97,0, +109,0,101,0,95, +0,51,0,1,339, +1,3,1,2,1, +1,2269,22,1,175, +1,6,2270,17,2271, +15,2246,1,-1,1, +5,2272,20,2273,4, +20,84,0,121,0, +112,0,101,0,110, +0,97,0,109,0, +101,0,95,0,50, +0,1,338,1,3, +1,2,1,1,2274, +22,1,174,1,7, +2275,17,2276,15,2246, +1,-1,1,5,2277, +20,2278,4,20,84, +0,121,0,112,0, +101,0,110,0,97, +0,109,0,101,0, +95,0,49,0,1, +337,1,3,1,2, +1,1,2279,22,1, +173,1,2518,2280,16, +0,499,1,9,1238, +1,10,1893,1,262, +1244,1,1267,1250,1, +1521,1255,1,1773,2281, +16,0,261,1,2528, +1927,1,19,1272,1, +20,2282,16,0,161, +1,2532,2283,17,2284, +15,2285,4,66,37, +0,73,0,110,0, +116,0,86,0,101, +0,99,0,86,0, +101,0,99,0,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,76,0,105, +0,115,0,116,0, +1,-1,1,5,2286, +20,2287,4,68,73, +0,110,0,116,0, +86,0,101,0,99, +0,86,0,101,0, +99,0,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,95,0, +49,0,1,211,1, +3,1,6,1,5, +2288,22,1,46,1, +2533,2289,16,0,518, +1,30,1901,1,283, +1299,1,2543,1906,1, +2547,2290,17,2291,15, +2292,4,66,37,0, +73,0,110,0,116, +0,82,0,111,0, +116,0,82,0,111, +0,116,0,65,0, +114,0,103,0,117, +0,109,0,101,0, +110,0,116,0,68, +0,101,0,99,0, +108,0,97,0,114, +0,97,0,116,0, +105,0,111,0,110, +0,76,0,105,0, +115,0,116,0,1, +-1,1,5,2293,20, +2294,4,68,73,0, +110,0,116,0,82, +0,111,0,116,0, +82,0,111,0,116, +0,65,0,114,0, +103,0,117,0,109, +0,101,0,110,0, +116,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,76, +0,105,0,115,0, +116,0,95,0,49, +0,1,210,1,3, +1,6,1,5,2295, +22,1,45,1,2548, +2296,16,0,650,1, +1010,2297,16,0,716, +1,40,1304,1,41, +1913,1,42,1917,1, +44,1310,1,2555,2298, +17,2299,15,2300,4, +60,37,0,86,0, +101,0,99,0,116, +0,111,0,114,0, +65,0,114,0,103, +0,117,0,109,0, +101,0,110,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,76,0, +105,0,115,0,116, +0,1,-1,1,5, +2301,20,2302,4,62, +86,0,101,0,99, +0,116,0,111,0, +114,0,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,95,0, +49,0,1,209,1, +3,1,2,1,1, +2303,22,1,44,1, +1260,1221,1,47,1311, +1,48,1317,1,49, +1323,1,50,1328,1, +51,1333,1,2563,2304, +17,2305,15,2306,4, +54,37,0,73,0, +110,0,116,0,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,76,0,105, +0,115,0,116,0, +1,-1,1,5,2307, +20,2308,4,56,73, +0,110,0,116,0, +65,0,114,0,103, +0,117,0,109,0, +101,0,110,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,76,0, +105,0,115,0,116, +0,95,0,49,0, +1,208,1,3,1, +2,1,1,2309,22, +1,43,1,305,1338, +1,1514,1233,1,525, +1343,1,61,2310,16, +0,217,1,2572,2311, +16,0,689,1,63, +1349,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,2582,1936,1, +73,2312,16,0,227, +1,827,1457,1,1013, +1385,1,2335,2313,16, +0,263,1,1332,1390, +1,74,1380,1,2591, +2314,16,0,710,1, +82,1407,1,2513,1886, +1,1341,1424,1,2517, +2315,17,2316,15,2317, +4,66,37,0,75, +0,101,0,121,0, +73,0,110,0,116, +0,73,0,110,0, +116,0,65,0,114, +0,103,0,117,0, +109,0,101,0,110, +0,116,0,68,0, +101,0,99,0,108, +0,97,0,114,0, +97,0,116,0,105, +0,111,0,110,0, +76,0,105,0,115, +0,116,0,1,-1, +1,5,2318,20,2319, +4,68,75,0,101, +0,121,0,73,0, +110,0,116,0,73, +0,110,0,116,0, +65,0,114,0,103, +0,117,0,109,0, +101,0,110,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,76,0, +105,0,115,0,116, +0,95,0,49,0, +1,212,1,3,1, +6,1,5,2320,22, +1,47,1,328,1429, +1,1303,1434,1,1096, +1439,1,93,1445,1, +1550,1450,1,2281,1279, +1,2770,1925,1,352, +1475,1,2779,2321,16, +0,797,1,107,1464, +1,1114,1469,1,1048, +1470,1,1871,2322,16, +0,353,1,1370,1578, +1,1478,1583,1,118, +1481,1,1123,1486,1, +371,1491,1,1377,1497, +1,375,1502,1,1882, +2323,16,0,373,1, +377,1507,1,2556,2324, +16,0,661,1,379, +1512,1,380,1517,1, +130,1540,1,2074,2325, +16,0,652,1,373, +1535,1,2564,2326,16, +0,554,1,1011,1227, +1,1012,2327,16,0, +718,1,1840,2328,16, +0,343,1,143,1545, +1,1152,1551,1,2577, +2329,16,0,696,1, +1406,1556,1,1159,1563, +1,157,1568,1,1413, +1573,1,883,1523,1, +1094,2330,16,0,787, +1,1296,1294,1,172, +1595,1,1665,1600,1, +1939,2331,16,0,494, +1,1188,1605,1,1442, +1610,1,188,1644,1, +942,1616,1,1195,1622, +1,1449,1627,1,1701, +1632,1,447,1637,1, +205,1649,1,2467,1942, +1,464,1948,1,2197, +2332,16,0,782,1, +1224,1654,1,223,1659, +1,1730,1664,1,2571, +2333,17,2334,15,2335, +4,54,37,0,75, +0,101,0,121,0, +65,0,114,0,103, +0,117,0,109,0, +101,0,110,0,116, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,76,0, +105,0,115,0,116, +0,1,-1,1,5, +2336,20,2337,4,56, +75,0,101,0,121, +0,65,0,114,0, +103,0,117,0,109, 0,101,0,110,0, -97,0,109,0,101, -0,95,0,53,0, -1,285,1,3,1, -2,1,1,1966,22, -1,146,1,4,1967, -17,1968,15,1953,1, --1,1,5,1969,20, -1970,4,20,84,0, -121,0,112,0,101, -0,110,0,97,0, -109,0,101,0,95, -0,52,0,1,284, -1,3,1,2,1, -1,1971,22,1,145, -1,5,1972,17,1973, -15,1953,1,-1,1, -5,1974,20,1975,4, -20,84,0,121,0, -112,0,101,0,110, -0,97,0,109,0, -101,0,95,0,51, -0,1,283,1,3, -1,2,1,1,1976, -22,1,144,1,6, -1977,17,1978,15,1953, -1,-1,1,5,1979, -20,1980,4,20,84, -0,121,0,112,0, -101,0,110,0,97, -0,109,0,101,0, -95,0,50,0,1, -282,1,3,1,2, -1,1,1981,22,1, -143,1,7,1982,17, -1983,15,1953,1,-1, -1,5,1984,20,1985, -4,20,84,0,121, -0,112,0,101,0, -110,0,97,0,109, -0,101,0,95,0, -49,0,1,281,1, -3,1,2,1,1, -1986,22,1,142,1, -1514,1108,1,9,1113, -1,10,1642,1,262, -1119,1,1267,1125,1, -481,1646,1,1521,1130, -1,1773,1987,16,0, -234,1,19,1147,1, -20,1988,16,0,152, -1,2281,1154,1,525, -1216,1,30,1654,1, -283,1172,1,1010,1989, -16,0,593,1,40, -1177,1,41,1659,1, -42,1662,1,44,1183, -1,1260,1096,1,47, -1184,1,1303,1307,1, -49,1196,1,50,1201, -1,48,1190,1,305, -1211,1,51,1206,1, -61,1990,16,0,194, -1,63,1222,1,66, -1228,1,67,1233,1, -1478,1458,1,69,1243, -1,70,1248,1,68, -1238,1,73,1991,16, -0,204,1,74,1253, -1,1013,1258,1,2335, -1992,16,0,239,1, -328,1302,1,1048,1344, -1,82,1280,1,1840, -1993,16,0,303,1, -2515,1994,16,0,436, -1,1341,1297,1,1094, -1995,16,0,666,1, -1096,1312,1,93,1318, -1,1550,1323,1,352, -1349,1,1011,1102,1, -107,1338,1,1114,1343, -1,1871,1996,16,0, -313,1,1370,1453,1, -118,1355,1,1123,1360, -1,1332,1263,1,1377, -1371,1,375,1376,1, -1882,1997,16,0,327, -1,377,1381,1,827, -1331,1,380,1391,1, -130,1414,1,2074,1998, -16,0,554,1,371, -1365,1,373,1409,1, -1012,1999,16,0,595, -1,379,1386,1,143, -1419,1,1152,1426,1, -1406,1431,1,1159,1438, -1,157,1443,1,1413, -1448,1,883,1397,1, -1296,1167,1,172,1469, -1,1665,1474,1,1939, -2000,16,0,435,1, -1188,1479,1,1442,1484, -1,188,1518,1,942, -1490,1,1195,1496,1, -1449,1501,1,1701,1506, -1,447,1511,1,205, -1523,1,2467,1677,1, -464,1683,1,2642,1669, -1,2197,2001,16,0, -662,1,1224,1528,1, -223,1533,1,1730,1538, -1,2651,2002,16,0, -570,1,477,1549,1, -1231,1554,1,479,1559, -1,480,1564,1,1485, -1570,1,459,1688,1, -476,1543,1,242,1578, -1,478,1583,1,2506, -1690,1,1001,1588,1, -1002,1593,1,18,2003, -19,490,1,18,2004, -5,84,1,1011,1102, -1,1012,2005,16,0, -488,1,1013,1258,1, -262,1119,1,1267,2006, -16,0,488,1,515, -2007,16,0,488,1, -1521,2008,16,0,488, -1,525,1216,1,283, -1172,1,2299,2009,16, -0,488,1,42,2010, -16,0,488,1,40, -1177,1,44,1183,1, -47,1184,1,1303,2011, -16,0,488,1,1555, -2012,16,0,488,1, -50,1201,1,48,1190, -1,49,1196,1,51, -1206,1,63,1222,1, -305,1211,1,66,1228, -1,67,1233,1,68, -1238,1,69,1243,1, -70,1248,1,73,2013, -16,0,488,1,74, -1253,1,328,1302,1, -1048,2014,16,0,488, -1,82,2015,16,0, -488,1,1840,2016,16, -0,488,1,1591,2017, -16,0,488,1,1341, -2018,16,0,488,1, -1096,1312,1,93,1318, -1,352,1349,1,107, -2019,16,0,488,1, -1114,1343,1,118,2020, -16,0,488,1,1123, -2021,16,0,488,1, -371,1365,1,1628,2022, -16,0,488,1,375, -1376,1,1882,2023,16, -0,488,1,377,1381, -1,379,1386,1,380, -1391,1,883,2024,16, -0,488,1,373,1409, -1,130,2025,16,0, -488,1,143,2026,16, -0,488,1,387,2027, -16,0,488,1,2664, -2028,16,0,488,1, -1159,2029,16,0,488, -1,157,2030,16,0, -488,1,1413,2031,16, -0,488,1,1665,2032, -16,0,488,1,412, -2033,16,0,488,1, -1377,2034,16,0,488, -1,172,2035,16,0, -488,1,1939,2036,16, -0,488,1,437,2037, -16,0,488,1,188, -2038,16,0,488,1, -942,2039,16,0,488, -1,1195,2040,16,0, -488,1,1449,2041,16, -0,488,1,1701,2042, -16,0,488,1,447, -1511,1,205,2043,16, -0,488,1,827,2044, -16,0,488,1,223, -2045,16,0,488,1, -476,1543,1,477,1549, -1,1231,2046,16,0, -488,1,479,1559,1, -480,1564,1,1485,2047, -16,0,488,1,1737, -2048,16,0,488,1, -242,2049,16,0,488, -1,478,1583,1,1001, -1588,1,1002,1593,1, -19,2050,19,225,1, -19,2051,5,176,1, -256,2052,16,0,223, -1,1261,2053,16,0, -223,1,1011,1102,1, -1012,2054,16,0,455, -1,2458,876,1,262, -1119,1,1267,2055,16, -0,455,1,2021,718, -1,1521,2056,16,0, -455,1,1775,2057,16, -0,223,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,277,2058, -16,0,223,1,2035, -752,1,2037,757,1, -2039,762,1,32,2059, -16,0,223,1,2464, -899,1,2293,2060,16, -0,223,1,2043,774, -1,2045,779,1,2299, -2061,16,0,455,1, -41,2062,16,0,223, -1,42,2063,16,0, -455,1,40,1177,1, -44,1183,1,43,2064, -16,0,223,1,1804, -2065,16,0,223,1, -48,1190,1,49,1196, -1,47,1184,1,51, -1206,1,52,2066,16, -0,223,1,50,1201, -1,305,1211,1,1096, -1312,1,1515,2067,16, -0,223,1,2318,2068, -16,0,223,1,283, -1172,1,63,1222,1, -66,1228,1,67,1233, -1,68,1238,1,69, -1243,1,70,1248,1, -71,2069,16,0,223, -1,73,2070,16,0, -455,1,74,1253,1, -1013,1258,1,76,2071, -16,0,223,1,1834, -2072,16,0,223,1, -2337,2073,16,0,223, -1,79,2074,16,0, -223,1,1335,2075,16, -0,223,1,299,2076, -16,0,223,1,82, -2077,16,0,455,1, -1840,2078,16,0,455, -1,1297,2079,16,0, -223,1,85,2080,16, -0,223,1,1341,2081, -16,0,455,1,89, -2082,16,0,223,1, -1303,2083,16,0,455, -1,509,2084,16,0, -223,1,93,1318,1, -322,2085,16,0,223, -1,97,2086,16,0, -223,1,2041,768,1, -1555,2087,16,0,455, -1,827,2088,16,0, -455,1,102,2089,16, -0,223,1,1860,821, -1,1803,787,1,2364, -827,1,107,2090,16, -0,455,1,1114,1343, -1,112,2091,16,0, -223,1,1117,2092,16, -0,223,1,352,1349, -1,1873,835,1,118, -2093,16,0,455,1, -1123,2094,16,0,455, -1,371,1365,1,515, -2095,16,0,455,1, -1377,2096,16,0,455, -1,124,2097,16,0, -223,1,1882,2098,16, -0,455,1,377,1381, -1,379,1386,1,380, -1391,1,130,2099,16, -0,455,1,346,2100, -16,0,223,1,2075, -2101,16,0,223,1, -373,1409,1,387,2102, -16,0,455,1,137, -2103,16,0,223,1, -143,2104,16,0,455, -1,1901,2105,16,0, -223,1,1048,2106,16, -0,455,1,2658,2107, -16,0,223,1,1153, -2108,16,0,223,1, -375,1376,1,151,2109, -16,0,223,1,1407, -2110,16,0,223,1, -1659,2111,16,0,223, -1,2413,2112,16,0, -223,1,1159,2113,16, -0,455,1,381,2114, -16,0,223,1,157, -2115,16,0,455,1, -1413,2116,16,0,455, -1,883,2117,16,0, -455,1,1371,2118,16, -0,223,1,328,1302, -1,2105,814,1,2106, -2119,16,0,223,1, -166,2120,16,0,223, -1,525,2121,16,0, -223,1,1622,2122,16, -0,223,1,406,2123, -16,0,223,1,1574, -799,1,172,2124,16, -0,455,1,1931,861, -1,412,2125,16,0, -455,1,1933,2126,16, -0,223,1,1876,2127, -16,0,223,1,431, -2128,16,0,223,1, -1585,2129,16,0,223, -1,182,2130,16,0, -223,1,1628,2131,16, -0,455,1,1189,2132, -16,0,223,1,437, -2133,16,0,455,1, -1591,2134,16,0,455, -1,188,2135,16,0, -455,1,1695,2136,16, -0,223,1,2198,2137, -16,0,223,1,1195, -2138,16,0,455,1, -1449,2139,16,0,455, -1,1701,2140,16,0, -455,1,447,2141,16, -0,223,1,199,2142, -16,0,223,1,2459, -882,1,1958,2143,16, -0,223,1,2462,889, -1,1657,894,1,205, -2144,16,0,455,1, -459,2145,16,0,223, -1,462,2146,16,0, -223,1,1665,2147,16, -0,455,1,217,2148, -16,0,223,1,2227, -908,1,942,2149,16, -0,455,1,1225,2150, -16,0,223,1,223, -2151,16,0,455,1, -1479,2152,16,0,223, -1,1731,2153,16,0, -223,1,477,1549,1, -1231,2154,16,0,455, -1,479,1559,1,480, -1564,1,1485,2155,16, -0,455,1,1737,2156, -16,0,455,1,1989, -916,1,1990,2157,16, -0,223,1,1443,2158, -16,0,223,1,236, -2159,16,0,223,1, -2136,842,1,2664,2160, -16,0,455,1,476, -1543,1,242,2161,16, -0,455,1,478,1583, -1,1939,2162,16,0, -455,1,1001,1588,1, -1002,1593,1,1756,2163, -16,0,223,1,20, -2164,19,442,1,20, -2165,5,84,1,1011, -1102,1,1012,2166,16, -0,440,1,1013,1258, -1,262,1119,1,1267, -2167,16,0,440,1, -515,2168,16,0,440, -1,1521,2169,16,0, -440,1,525,1216,1, -283,1172,1,2299,2170, -16,0,440,1,42, -2171,16,0,440,1, -40,1177,1,44,1183, -1,47,1184,1,1303, -2172,16,0,440,1, -1555,2173,16,0,440, -1,50,1201,1,48, -1190,1,49,1196,1, -51,1206,1,63,1222, -1,305,1211,1,66, -1228,1,67,1233,1, -68,1238,1,69,1243, -1,70,1248,1,73, -2174,16,0,440,1, -74,1253,1,328,2175, -16,0,440,1,1048, -2176,16,0,440,1, -82,2177,16,0,440, -1,1840,2178,16,0, -440,1,1591,2179,16, -0,440,1,1341,2180, -16,0,440,1,1096, -1312,1,93,1318,1, -352,2181,16,0,440, -1,107,2182,16,0, -440,1,1114,1343,1, -118,2183,16,0,440, -1,1123,2184,16,0, -440,1,371,1365,1, -1628,2185,16,0,440, -1,375,1376,1,1882, -2186,16,0,440,1, -377,1381,1,379,1386, -1,380,1391,1,883, -2187,16,0,440,1, -373,1409,1,130,2188, -16,0,440,1,143, -2189,16,0,440,1, -387,2190,16,0,440, -1,2664,2191,16,0, -440,1,1159,2192,16, -0,440,1,157,2193, -16,0,440,1,1413, -2194,16,0,440,1, -1665,2195,16,0,440, -1,412,2196,16,0, -440,1,1377,2197,16, -0,440,1,172,2198, -16,0,440,1,1939, -2199,16,0,440,1, -437,2200,16,0,440, -1,188,2201,16,0, -440,1,942,2202,16, -0,440,1,1195,2203, -16,0,440,1,1449, -2204,16,0,440,1, -1701,2205,16,0,440, -1,447,1511,1,205, -2206,16,0,440,1, -827,2207,16,0,440, -1,223,2208,16,0, -440,1,476,1543,1, -477,1549,1,1231,2209, -16,0,440,1,479, -1559,1,480,1564,1, -1485,2210,16,0,440, -1,1737,2211,16,0, -440,1,242,2212,16, -0,440,1,478,1583, -1,1001,1588,1,1002, -1593,1,21,2213,19, -432,1,21,2214,5, -84,1,1011,1102,1, -1012,2215,16,0,430, -1,1013,1258,1,262, -1119,1,1267,2216,16, -0,430,1,515,2217, -16,0,430,1,1521, -2218,16,0,430,1, -525,1216,1,283,1172, -1,2299,2219,16,0, -430,1,42,2220,16, -0,430,1,40,1177, -1,44,1183,1,47, -1184,1,1303,2221,16, -0,430,1,1555,2222, -16,0,430,1,50, -1201,1,48,1190,1, -49,1196,1,51,1206, -1,63,1222,1,305, -1211,1,66,1228,1, -67,1233,1,68,1238, -1,69,1243,1,70, -1248,1,73,2223,16, -0,430,1,74,1253, -1,328,2224,16,0, -430,1,1048,2225,16, -0,430,1,82,2226, -16,0,430,1,1840, -2227,16,0,430,1, -1591,2228,16,0,430, -1,1341,2229,16,0, -430,1,1096,1312,1, -93,1318,1,352,2230, -16,0,430,1,107, -2231,16,0,430,1, -1114,1343,1,118,2232, -16,0,430,1,1123, -2233,16,0,430,1, -371,1365,1,1628,2234, -16,0,430,1,375, -1376,1,1882,2235,16, -0,430,1,377,1381, -1,379,1386,1,380, -1391,1,883,2236,16, -0,430,1,373,1409, -1,130,2237,16,0, -430,1,143,2238,16, -0,430,1,387,2239, -16,0,430,1,2664, -2240,16,0,430,1, -1159,2241,16,0,430, -1,157,2242,16,0, -430,1,1413,2243,16, -0,430,1,1665,2244, -16,0,430,1,412, -2245,16,0,430,1, -1377,2246,16,0,430, -1,172,2247,16,0, -430,1,1939,2248,16, -0,430,1,437,2249, -16,0,430,1,188, -2250,16,0,430,1, -942,2251,16,0,430, -1,1195,2252,16,0, -430,1,1449,2253,16, -0,430,1,1701,2254, -16,0,430,1,447, -1511,1,205,2255,16, -0,430,1,827,2256, -16,0,430,1,223, -2257,16,0,430,1, -476,1543,1,477,1549, -1,1231,2258,16,0, -430,1,479,1559,1, -480,1564,1,1485,2259, -16,0,430,1,1737, -2260,16,0,430,1, -242,2261,16,0,430, -1,478,1583,1,1001, -1588,1,1002,1593,1, -22,2262,19,383,1, -22,2263,5,84,1, -1011,1102,1,1012,2264, -16,0,381,1,1013, -1258,1,262,1119,1, -1267,2265,16,0,381, -1,515,2266,16,0, -381,1,1521,2267,16, -0,381,1,525,1216, -1,283,1172,1,2299, -2268,16,0,381,1, -42,2269,16,0,381, -1,40,1177,1,44, -1183,1,47,1184,1, -1303,2270,16,0,381, -1,1555,2271,16,0, -381,1,50,1201,1, -48,1190,1,49,1196, -1,51,1206,1,63, -1222,1,305,1211,1, -66,1228,1,67,1233, -1,68,1238,1,69, -1243,1,70,1248,1, -73,2272,16,0,381, -1,74,1253,1,328, -2273,16,0,381,1, -1048,2274,16,0,381, -1,82,2275,16,0, -381,1,1840,2276,16, -0,381,1,1591,2277, -16,0,381,1,1341, -2278,16,0,381,1, -1096,1312,1,93,1318, -1,352,2279,16,0, -381,1,107,2280,16, -0,381,1,1114,1343, -1,118,2281,16,0, -381,1,1123,2282,16, -0,381,1,371,1365, -1,1628,2283,16,0, -381,1,375,1376,1, -1882,2284,16,0,381, -1,377,1381,1,379, -1386,1,380,1391,1, -883,2285,16,0,381, -1,373,1409,1,130, -2286,16,0,381,1, -143,2287,16,0,381, -1,387,2288,16,0, -381,1,2664,2289,16, -0,381,1,1159,2290, -16,0,381,1,157, -2291,16,0,381,1, -1413,2292,16,0,381, -1,1665,2293,16,0, -381,1,412,2294,16, -0,381,1,1377,2295, -16,0,381,1,172, -2296,16,0,381,1, -1939,2297,16,0,381, -1,437,2298,16,0, -381,1,188,2299,16, -0,381,1,942,2300, -16,0,381,1,1195, -2301,16,0,381,1, -1449,2302,16,0,381, -1,1701,2303,16,0, -381,1,447,1511,1, -205,2304,16,0,381, -1,827,2305,16,0, -381,1,223,2306,16, -0,381,1,476,1543, -1,477,1549,1,1231, -2307,16,0,381,1, -479,1559,1,480,1564, -1,1485,2308,16,0, -381,1,1737,2309,16, -0,381,1,242,2310, -16,0,381,1,478, -1583,1,1001,1588,1, -1002,1593,1,23,2311, -19,504,1,23,2312, -5,38,1,1901,2313, -16,0,502,1,2075, -2314,16,0,502,1, -1860,821,1,1803,787, -1,1804,2315,16,0, -502,1,2413,2316,16, -0,502,1,2198,2317, -16,0,502,1,1873, -835,1,1657,894,1, -1989,916,1,1990,2318, -16,0,502,1,1775, -2319,16,0,502,1, -32,2320,16,0,502, -1,2105,814,1,2106, -2321,16,0,502,1, -2364,827,1,2227,908, -1,2337,2322,16,0, -502,1,2021,718,1, -2458,876,1,2459,882, -1,2462,889,1,2136, -842,1,2464,899,1, -2029,725,1,2030,731, -1,2031,736,1,2032, -741,1,2033,746,1, -2035,752,1,2037,757, -1,2039,762,1,1931, -861,1,2041,768,1, -2043,774,1,2045,779, -1,1574,799,1,1958, -2323,16,0,502,1, -24,2324,19,177,1, -24,2325,5,5,1, -44,2326,16,0,175, -1,377,2327,16,0, -540,1,40,2328,16, -0,674,1,63,2329, -16,0,196,1,373, -2330,16,0,536,1, -25,2331,19,291,1, -25,2332,5,177,1, -256,2333,16,0,545, -1,1261,2334,16,0, -545,1,1011,1102,1, -1012,2335,16,0,289, -1,2458,876,1,262, -1119,1,1267,2336,16, -0,289,1,2021,718, -1,1521,2337,16,0, -289,1,1775,2338,16, -0,545,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,277,2339, -16,0,545,1,2035, -752,1,2037,757,1, -2039,762,1,32,2340, -16,0,545,1,2464, -899,1,2293,2341,16, -0,545,1,2043,774, -1,2045,779,1,2299, -2342,16,0,289,1, -41,2343,16,0,545, -1,42,2344,16,0, -289,1,40,1177,1, -44,1183,1,43,2345, -16,0,545,1,1804, -2346,16,0,545,1, -48,1190,1,49,1196, -1,47,1184,1,51, -1206,1,52,2347,16, -0,545,1,50,1201, -1,305,1211,1,1096, -1312,1,1515,2348,16, -0,545,1,2318,2349, -16,0,545,1,62, -2350,16,0,545,1, -63,1222,1,66,1228, -1,67,1233,1,68, -1238,1,69,1243,1, -70,1248,1,71,2351, -16,0,545,1,283, -1172,1,73,2352,16, -0,289,1,74,1253, -1,1013,1258,1,76, -2353,16,0,545,1, -1834,2354,16,0,545, -1,2337,2355,16,0, -545,1,79,2356,16, -0,545,1,1335,2357, -16,0,545,1,299, -2358,16,0,545,1, -82,2359,16,0,289, -1,1840,2360,16,0, -289,1,1297,2361,16, -0,545,1,85,2362, -16,0,545,1,1341, -2363,16,0,289,1, -89,2364,16,0,545, -1,1303,2365,16,0, -289,1,509,2366,16, -0,545,1,93,1318, -1,322,2367,16,0, -545,1,97,2368,16, -0,545,1,2041,768, -1,1555,2369,16,0, -289,1,827,2370,16, -0,289,1,102,2371, -16,0,545,1,1860, -821,1,1803,787,1, -2364,827,1,107,2372, -16,0,289,1,1114, -1343,1,112,2373,16, -0,545,1,1117,2374, -16,0,545,1,352, -1349,1,1873,835,1, -118,1355,1,1123,2375, -16,0,289,1,371, -1365,1,515,2376,16, -0,289,1,1377,2377, -16,0,289,1,124, -2378,16,0,545,1, -1882,2379,16,0,289, -1,377,1381,1,379, -1386,1,380,1391,1, -130,1414,1,346,2380, -16,0,545,1,2075, -2381,16,0,545,1, -373,1409,1,387,2382, -16,0,289,1,137, -2383,16,0,545,1, -143,2384,16,0,289, -1,1901,2385,16,0, -545,1,1048,1344,1, -2658,2386,16,0,545, -1,1153,2387,16,0, -545,1,375,1376,1, -151,2388,16,0,545, -1,1407,2389,16,0, -545,1,1659,2390,16, -0,545,1,2413,2391, -16,0,545,1,1159, -2392,16,0,289,1, -381,2393,16,0,545, -1,157,2394,16,0, -289,1,1413,2395,16, -0,289,1,883,2396, -16,0,289,1,1371, -2397,16,0,545,1, -328,1302,1,2105,814, -1,2106,2398,16,0, -545,1,166,2399,16, -0,545,1,525,2400, -16,0,545,1,1622, -2401,16,0,545,1, -406,2402,16,0,545, -1,1574,799,1,172, -1469,1,1931,861,1, -412,2403,16,0,289, -1,1933,2404,16,0, -545,1,1876,2405,16, -0,545,1,431,2406, -16,0,545,1,1585, -2407,16,0,545,1, -182,2408,16,0,545, -1,1628,2409,16,0, -289,1,1189,2410,16, -0,545,1,437,2411, -16,0,289,1,1591, -2412,16,0,289,1, -188,1518,1,1695,2413, -16,0,545,1,2198, -2414,16,0,545,1, -1195,2415,16,0,289, -1,1449,2416,16,0, -289,1,1701,2417,16, -0,289,1,447,2418, -16,0,545,1,199, -2419,16,0,545,1, -2459,882,1,1958,2420, -16,0,545,1,2462, -889,1,1657,894,1, -205,2421,16,0,289, -1,459,2422,16,0, -545,1,462,2423,16, -0,545,1,1665,2424, -16,0,289,1,217, -2425,16,0,545,1, -2227,908,1,942,1490, -1,1225,2426,16,0, -545,1,223,2427,16, -0,289,1,1479,2428, -16,0,545,1,1731, -2429,16,0,545,1, -477,1549,1,1231,2430, -16,0,289,1,479, -1559,1,480,1564,1, -1485,2431,16,0,289, -1,1737,2432,16,0, -289,1,1989,916,1, -1990,2433,16,0,545, -1,1443,2434,16,0, -545,1,236,2435,16, -0,545,1,2136,842, -1,2664,2436,16,0, -289,1,476,1543,1, -242,2437,16,0,289, -1,478,1583,1,1939, -2438,16,0,289,1, -1001,1588,1,1002,1593, -1,1756,2439,16,0, -545,1,26,2440,19, -308,1,26,2441,5, -84,1,1011,1102,1, -1012,2442,16,0,306, -1,1013,1258,1,262, -1119,1,1267,2443,16, -0,306,1,515,2444, -16,0,660,1,1521, -2445,16,0,306,1, -525,1216,1,283,1172, -1,2299,2446,16,0, -306,1,42,2447,16, -0,306,1,40,1177, -1,44,1183,1,47, -1184,1,1303,2448,16, -0,306,1,1555,2449, -16,0,306,1,50, -1201,1,48,1190,1, -49,1196,1,51,1206, -1,63,1222,1,305, -1211,1,66,1228,1, -67,1233,1,68,1238, -1,69,1243,1,70, -1248,1,73,2450,16, -0,306,1,74,1253, -1,328,1302,1,1048, -1344,1,82,2451,16, -0,306,1,1840,2452, -16,0,306,1,1591, -2453,16,0,306,1, -1341,2454,16,0,306, -1,1096,1312,1,93, -1318,1,352,1349,1, -107,2455,16,0,306, -1,1114,1343,1,118, -1355,1,1123,2456,16, -0,306,1,371,1365, -1,1628,2457,16,0, -306,1,375,1376,1, -1882,2458,16,0,306, -1,377,1381,1,379, -1386,1,380,1391,1, -883,2459,16,0,306, -1,373,1409,1,130, -1414,1,143,2460,16, -0,306,1,387,2461, -16,0,306,1,2664, -2462,16,0,306,1, -1159,2463,16,0,306, -1,157,2464,16,0, -306,1,1413,2465,16, -0,306,1,1665,2466, -16,0,306,1,412, -2467,16,0,306,1, -1377,2468,16,0,306, -1,172,1469,1,1939, -2469,16,0,306,1, -437,2470,16,0,588, -1,188,1518,1,942, -1490,1,1195,2471,16, -0,306,1,1449,2472, -16,0,306,1,1701, -2473,16,0,306,1, -447,1511,1,205,2474, -16,0,306,1,827, -2475,16,0,306,1, -223,2476,16,0,306, -1,476,1543,1,477, -1549,1,1231,2477,16, -0,306,1,479,1559, -1,480,1564,1,1485, -2478,16,0,306,1, -1737,2479,16,0,306, -1,242,2480,16,0, -306,1,478,1583,1, -1001,1588,1,1002,1593, -1,27,2481,19,598, -1,27,2482,5,95, -1,256,2483,16,0, -596,1,1261,2484,16, -0,596,1,509,2485, -16,0,596,1,1515, -2486,16,0,596,1, -2021,718,1,1775,2487, -16,0,596,1,2029, -725,1,2030,731,1, -2031,736,1,2032,741, -1,2033,746,1,277, -2488,16,0,596,1, -2035,752,1,2037,757, -1,2039,762,1,32, -2489,16,0,596,1, -2041,768,1,2293,2490, -16,0,596,1,2043, -774,1,2045,779,1, -41,2491,16,0,596, -1,1297,2492,16,0, -596,1,43,2493,16, -0,596,1,1803,787, -1,1804,2494,16,0, -596,1,299,2495,16, -0,596,1,52,2496, -16,0,596,1,2318, -2497,16,0,596,1, -62,2498,16,0,596, -1,2075,2499,16,0, -596,1,1574,799,1, -71,2500,16,0,596, -1,76,2501,16,0, -596,1,1834,2502,16, -0,596,1,2337,2503, -16,0,596,1,79, -2504,16,0,596,1, -1335,2505,16,0,596, -1,322,2506,16,0, -596,1,85,2507,16, -0,596,1,89,2508, -16,0,596,1,346, -2509,16,0,596,1, -2105,814,1,2106,2510, -16,0,596,1,97, -2511,16,0,596,1, -1860,821,1,2364,827, -1,102,2512,16,0, -596,1,112,2513,16, -0,596,1,1117,2514, -16,0,596,1,1873, -835,1,1876,2515,16, -0,596,1,124,2516, -16,0,596,1,2136, -842,1,381,2517,16, -0,596,1,525,2518, -16,0,596,1,137, -2519,16,0,596,1, -1901,2520,16,0,596, -1,2658,2521,16,0, -596,1,1153,2522,16, -0,596,1,151,2523, -16,0,596,1,1407, -2524,16,0,596,1, -1659,2525,16,0,596, -1,2413,2526,16,0, -596,1,406,2527,16, -0,596,1,1371,2528, -16,0,596,1,166, -2529,16,0,596,1, -1622,2530,16,0,596, -1,1931,861,1,1933, -2531,16,0,596,1, -431,2532,16,0,596, -1,1585,2533,16,0, -596,1,182,2534,16, -0,596,1,1189,2535, -16,0,596,1,1443, -2536,16,0,596,1, -1695,2537,16,0,596, -1,2198,2538,16,0, -596,1,447,2539,16, -0,596,1,2458,876, -1,2459,882,1,1958, -2540,16,0,596,1, -2462,889,1,1657,894, -1,2464,899,1,199, -2541,16,0,596,1, -459,2542,16,0,596, -1,462,2543,16,0, -596,1,217,2544,16, -0,596,1,2227,908, -1,1225,2545,16,0, -596,1,1479,2546,16, -0,596,1,1731,2547, -16,0,596,1,1989, -916,1,1990,2548,16, -0,596,1,236,2549, -16,0,596,1,1756, -2550,16,0,596,1, -28,2551,19,629,1, -28,2552,5,60,1, -328,1302,1,223,1533, -1,1096,1312,1,118, -1355,1,883,1397,1, -525,1216,1,1001,1588, -1,130,1414,1,459, -1688,1,1114,1343,1, -352,1349,1,447,1511, -1,464,1683,1,1011, -1102,1,1013,1258,1, -242,1578,1,143,1419, -1,40,1177,1,41, -1659,1,42,1662,1, -479,1559,1,44,1183, -1,481,1646,1,373, -1409,1,47,1184,1, -157,1443,1,49,1196, -1,50,1201,1,48, -1190,1,379,1386,1, -380,1391,1,51,1206, -1,476,1543,1,371, -1365,1,478,1583,1, -1048,1344,1,375,1376, -1,172,1469,1,262, -1119,1,283,1172,1, -63,1222,1,67,1233, -1,68,1238,1,69, -1243,1,66,1228,1, -461,2553,16,0,627, -1,74,1253,1,377, -1381,1,1002,1593,1, -70,1248,1,188,1518, -1,82,1280,1,305, -1211,1,477,1549,1, -827,1331,1,93,1318, -1,480,1564,1,205, -1523,1,942,1490,1, -107,1338,1,29,2554, -19,280,1,29,2555, -5,84,1,1011,1102, -1,1012,2556,16,0, -278,1,1013,1258,1, -262,1119,1,1267,2557, -16,0,278,1,515, -2558,16,0,278,1, -1521,2559,16,0,278, -1,525,1216,1,283, -1172,1,2299,2560,16, -0,278,1,42,2561, -16,0,278,1,40, -1177,1,44,1183,1, -47,1184,1,1303,2562, -16,0,278,1,1555, -2563,16,0,278,1, -50,1201,1,48,1190, -1,49,1196,1,51, -1206,1,63,1222,1, -305,1211,1,66,1228, -1,67,1233,1,68, -1238,1,69,1243,1, -70,1248,1,73,2564, -16,0,278,1,74, -1253,1,328,1302,1, -1048,1344,1,82,2565, -16,0,278,1,1840, -2566,16,0,278,1, -1591,2567,16,0,278, -1,1341,2568,16,0, -278,1,1096,1312,1, -93,1318,1,352,1349, -1,107,2569,16,0, -278,1,1114,1343,1, -118,1355,1,1123,2570, -16,0,278,1,371, -1365,1,1628,2571,16, -0,278,1,375,1376, -1,1882,2572,16,0, -278,1,377,1381,1, -379,1386,1,380,1391, -1,883,2573,16,0, -278,1,373,1409,1, -130,1414,1,143,1419, -1,387,2574,16,0, -278,1,2664,2575,16, -0,278,1,1159,2576, -16,0,278,1,157, -1443,1,1413,2577,16, -0,278,1,1665,2578, -16,0,278,1,412, -2579,16,0,278,1, -1377,2580,16,0,278, -1,172,1469,1,1939, -2581,16,0,278,1, -437,2582,16,0,278, -1,188,1518,1,942, -1490,1,1195,2583,16, -0,278,1,1449,2584, -16,0,278,1,1701, -2585,16,0,278,1, -447,1511,1,205,2586, -16,0,278,1,827, -2587,16,0,278,1, -223,2588,16,0,278, -1,476,1543,1,477, -1549,1,1231,2589,16, -0,278,1,479,1559, -1,480,1564,1,1485, -2590,16,0,278,1, -1737,2591,16,0,278, -1,242,2592,16,0, -278,1,478,1583,1, -1001,1588,1,1002,1593, -1,30,2593,19,268, -1,30,2594,5,84, -1,1011,1102,1,1012, -2595,16,0,266,1, -1013,1258,1,262,1119, -1,1267,2596,16,0, -266,1,515,2597,16, -0,266,1,1521,2598, -16,0,266,1,525, -1216,1,283,1172,1, -2299,2599,16,0,266, -1,42,2600,16,0, -266,1,40,1177,1, -44,1183,1,47,1184, -1,1303,2601,16,0, -266,1,1555,2602,16, -0,266,1,50,1201, -1,48,1190,1,49, -1196,1,51,1206,1, -63,1222,1,305,1211, -1,66,1228,1,67, -1233,1,68,1238,1, -69,1243,1,70,1248, -1,73,2603,16,0, -266,1,74,1253,1, -328,1302,1,1048,1344, -1,82,2604,16,0, -266,1,1840,2605,16, -0,266,1,1591,2606, -16,0,266,1,1341, -2607,16,0,266,1, -1096,1312,1,93,1318, -1,352,1349,1,107, -2608,16,0,266,1, -1114,1343,1,118,1355, -1,1123,2609,16,0, -266,1,371,1365,1, -1628,2610,16,0,266, -1,375,1376,1,1882, -2611,16,0,266,1, -377,1381,1,379,1386, -1,380,1391,1,883, -2612,16,0,266,1, -373,1409,1,130,1414, -1,143,1419,1,387, -2613,16,0,266,1, -2664,2614,16,0,266, -1,1159,2615,16,0, -266,1,157,1443,1, -1413,2616,16,0,266, -1,1665,2617,16,0, -266,1,412,2618,16, -0,266,1,1377,2619, -16,0,266,1,172, -1469,1,1939,2620,16, -0,266,1,437,2621, -16,0,266,1,188, -1518,1,942,1490,1, -1195,2622,16,0,266, -1,1449,2623,16,0, -266,1,1701,2624,16, -0,266,1,447,1511, -1,205,2625,16,0, -266,1,827,2626,16, -0,266,1,223,2627, -16,0,266,1,476, -1543,1,477,1549,1, -1231,2628,16,0,266, -1,479,1559,1,480, -1564,1,1485,2629,16, -0,266,1,1737,2630, -16,0,266,1,242, -2631,16,0,266,1, -478,1583,1,1001,1588, -1,1002,1593,1,31, -2632,19,253,1,31, -2633,5,84,1,1011, -1102,1,1012,2634,16, -0,251,1,1013,1258, -1,262,1119,1,1267, -2635,16,0,251,1, -515,2636,16,0,251, -1,1521,2637,16,0, -251,1,525,1216,1, -283,1172,1,2299,2638, -16,0,251,1,42, -2639,16,0,251,1, -40,1177,1,44,1183, -1,47,1184,1,1303, -2640,16,0,251,1, -1555,2641,16,0,251, -1,50,1201,1,48, -1190,1,49,1196,1, -51,1206,1,63,1222, -1,305,1211,1,66, -1228,1,67,1233,1, -68,1238,1,69,1243, -1,70,1248,1,73, -2642,16,0,251,1, -74,1253,1,328,1302, -1,1048,1344,1,82, -2643,16,0,251,1, -1840,2644,16,0,251, -1,1591,2645,16,0, -251,1,1341,2646,16, -0,251,1,1096,1312, -1,93,1318,1,352, -1349,1,107,2647,16, -0,251,1,1114,1343, -1,118,1355,1,1123, -2648,16,0,251,1, -371,1365,1,1628,2649, -16,0,251,1,375, -1376,1,1882,2650,16, -0,251,1,377,1381, -1,379,1386,1,380, -1391,1,883,2651,16, -0,251,1,373,1409, -1,130,1414,1,143, -2652,16,0,251,1, -387,2653,16,0,251, -1,2664,2654,16,0, -251,1,1159,2655,16, -0,251,1,157,2656, -16,0,251,1,1413, -2657,16,0,251,1, -1665,2658,16,0,251, -1,412,2659,16,0, -251,1,1377,2660,16, -0,251,1,172,1469, -1,1939,2661,16,0, -251,1,437,2662,16, -0,251,1,188,1518, -1,942,1490,1,1195, -2663,16,0,251,1, -1449,2664,16,0,251, -1,1701,2665,16,0, -251,1,447,1511,1, -205,2666,16,0,251, -1,827,2667,16,0, -251,1,223,2668,16, -0,251,1,476,1543, -1,477,1549,1,1231, -2669,16,0,251,1, -479,1559,1,480,1564, -1,1485,2670,16,0, -251,1,1737,2671,16, -0,251,1,242,2672, -16,0,251,1,478, -1583,1,1001,1588,1, -1002,1593,1,32,2673, -19,246,1,32,2674, -5,84,1,1011,1102, -1,1012,2675,16,0, -244,1,1013,1258,1, -262,1119,1,1267,2676, -16,0,244,1,515, -2677,16,0,244,1, -1521,2678,16,0,244, -1,525,1216,1,283, -1172,1,2299,2679,16, -0,244,1,42,2680, -16,0,244,1,40, -1177,1,44,1183,1, -47,1184,1,1303,2681, -16,0,244,1,1555, -2682,16,0,244,1, -50,1201,1,48,1190, -1,49,1196,1,51, -1206,1,63,1222,1, -305,1211,1,66,1228, -1,67,1233,1,68, -1238,1,69,1243,1, -70,1248,1,73,2683, -16,0,244,1,74, -1253,1,328,1302,1, -1048,1344,1,82,2684, -16,0,244,1,1840, -2685,16,0,244,1, -1591,2686,16,0,244, -1,1341,2687,16,0, -244,1,1096,1312,1, -93,1318,1,352,1349, -1,107,2688,16,0, -244,1,1114,1343,1, -118,1355,1,1123,2689, -16,0,244,1,371, -1365,1,1628,2690,16, -0,244,1,375,1376, -1,1882,2691,16,0, -244,1,377,1381,1, -379,1386,1,380,1391, -1,883,2692,16,0, -244,1,373,1409,1, -130,1414,1,143,2693, -16,0,244,1,387, -2694,16,0,244,1, -2664,2695,16,0,244, -1,1159,2696,16,0, -244,1,157,2697,16, -0,244,1,1413,2698, -16,0,244,1,1665, -2699,16,0,244,1, -412,2700,16,0,244, -1,1377,2701,16,0, -244,1,172,1469,1, -1939,2702,16,0,244, -1,437,2703,16,0, -244,1,188,1518,1, -942,1490,1,1195,2704, -16,0,244,1,1449, -2705,16,0,244,1, -1701,2706,16,0,244, -1,447,1511,1,205, -2707,16,0,244,1, -827,2708,16,0,244, -1,223,2709,16,0, -244,1,476,1543,1, -477,1549,1,1231,2710, -16,0,244,1,479, -1559,1,480,1564,1, -1485,2711,16,0,244, -1,1737,2712,16,0, -244,1,242,2713,16, -0,244,1,478,1583, -1,1001,1588,1,1002, -1593,1,33,2714,19, -332,1,33,2715,5, -84,1,1011,1102,1, -1012,2716,16,0,330, -1,1013,1258,1,262, -1119,1,1267,2717,16, -0,330,1,515,2718, -16,0,330,1,1521, -2719,16,0,330,1, -525,1216,1,283,1172, -1,2299,2720,16,0, -330,1,42,2721,16, -0,330,1,40,1177, -1,44,1183,1,47, -1184,1,1303,2722,16, -0,330,1,1555,2723, -16,0,330,1,50, -1201,1,48,1190,1, -49,1196,1,51,1206, -1,63,1222,1,305, -1211,1,66,1228,1, -67,1233,1,68,1238, -1,69,1243,1,70, -1248,1,73,2724,16, -0,330,1,74,1253, -1,328,1302,1,1048, -1344,1,82,2725,16, -0,330,1,1840,2726, -16,0,330,1,1591, -2727,16,0,330,1, -1341,2728,16,0,330, -1,1096,1312,1,93, -1318,1,352,1349,1, -107,2729,16,0,330, -1,1114,1343,1,118, -1355,1,1123,2730,16, -0,330,1,371,1365, -1,1628,2731,16,0, -330,1,375,1376,1, -1882,2732,16,0,330, -1,377,1381,1,379, -1386,1,380,1391,1, -883,2733,16,0,330, -1,373,1409,1,130, -1414,1,143,1419,1, -387,2734,16,0,330, -1,2664,2735,16,0, -330,1,1159,2736,16, -0,330,1,157,1443, -1,1413,2737,16,0, -330,1,1665,2738,16, -0,330,1,412,2739, -16,0,330,1,1377, -2740,16,0,330,1, -172,1469,1,1939,2741, -16,0,330,1,437, -2742,16,0,330,1, -188,1518,1,942,1490, -1,1195,2743,16,0, -330,1,1449,2744,16, -0,330,1,1701,2745, -16,0,330,1,447, -1511,1,205,2746,16, -0,330,1,827,2747, -16,0,330,1,223, -2748,16,0,330,1, -476,1543,1,477,1549, -1,1231,2749,16,0, -330,1,479,1559,1, -480,1564,1,1485,2750, -16,0,330,1,1737, -2751,16,0,330,1, -242,1578,1,478,1583, -1,1001,1588,1,1002, -1593,1,34,2752,19, -322,1,34,2753,5, -84,1,1011,1102,1, -1012,2754,16,0,320, -1,1013,1258,1,262, -1119,1,1267,2755,16, -0,320,1,515,2756, -16,0,320,1,1521, -2757,16,0,320,1, -525,1216,1,283,1172, -1,2299,2758,16,0, -320,1,42,2759,16, -0,320,1,40,1177, -1,44,1183,1,47, -1184,1,1303,2760,16, -0,320,1,1555,2761, -16,0,320,1,50, -1201,1,48,1190,1, -49,1196,1,51,1206, -1,63,1222,1,305, -1211,1,66,1228,1, -67,1233,1,68,1238, -1,69,1243,1,70, -1248,1,73,2762,16, -0,320,1,74,1253, -1,328,1302,1,1048, -1344,1,82,2763,16, -0,320,1,1840,2764, -16,0,320,1,1591, -2765,16,0,320,1, -1341,2766,16,0,320, -1,1096,1312,1,93, -1318,1,352,1349,1, -107,2767,16,0,320, -1,1114,1343,1,118, -1355,1,1123,2768,16, -0,320,1,371,1365, -1,1628,2769,16,0, -320,1,375,1376,1, -1882,2770,16,0,320, -1,377,1381,1,379, -1386,1,380,1391,1, -883,2771,16,0,320, -1,373,1409,1,130, -1414,1,143,1419,1, -387,2772,16,0,320, -1,2664,2773,16,0, -320,1,1159,2774,16, -0,320,1,157,1443, -1,1413,2775,16,0, -320,1,1665,2776,16, -0,320,1,412,2777, -16,0,320,1,1377, -2778,16,0,320,1, -172,1469,1,1939,2779, -16,0,320,1,437, -2780,16,0,320,1, -188,1518,1,942,1490, -1,1195,2781,16,0, -320,1,1449,2782,16, -0,320,1,1701,2783, -16,0,320,1,447, -1511,1,205,1523,1, -827,2784,16,0,320, -1,223,1533,1,476, -1543,1,477,1549,1, -1231,2785,16,0,320, -1,479,1559,1,480, -1564,1,1485,2786,16, -0,320,1,1737,2787, -16,0,320,1,242, -1578,1,478,1583,1, -1001,1588,1,1002,1593, -1,35,2788,19,311, -1,35,2789,5,84, -1,1011,1102,1,1012, -2790,16,0,309,1, -1013,1258,1,262,1119, -1,1267,2791,16,0, -309,1,515,2792,16, -0,309,1,1521,2793, -16,0,309,1,525, -1216,1,283,1172,1, -2299,2794,16,0,309, -1,42,2795,16,0, -309,1,40,1177,1, -44,1183,1,47,1184, -1,1303,2796,16,0, -309,1,1555,2797,16, -0,309,1,50,1201, -1,48,1190,1,49, -1196,1,51,1206,1, -63,1222,1,305,1211, -1,66,1228,1,67, -1233,1,68,1238,1, -69,1243,1,70,1248, -1,73,2798,16,0, -309,1,74,1253,1, -328,1302,1,1048,1344, -1,82,2799,16,0, -309,1,1840,2800,16, -0,309,1,1591,2801, -16,0,309,1,1341, -2802,16,0,309,1, -1096,1312,1,93,1318, -1,352,1349,1,107, -2803,16,0,309,1, -1114,1343,1,118,1355, -1,1123,2804,16,0, -309,1,371,1365,1, -1628,2805,16,0,309, -1,375,1376,1,1882, -2806,16,0,309,1, -377,1381,1,379,1386, -1,380,1391,1,883, -2807,16,0,309,1, -373,1409,1,130,1414, -1,143,1419,1,387, -2808,16,0,309,1, -2664,2809,16,0,309, -1,1159,2810,16,0, -309,1,157,1443,1, -1413,2811,16,0,309, -1,1665,2812,16,0, -309,1,412,2813,16, -0,309,1,1377,2814, -16,0,309,1,172, -1469,1,1939,2815,16, -0,309,1,437,2816, -16,0,309,1,188, -1518,1,942,1490,1, -1195,2817,16,0,309, -1,1449,2818,16,0, -309,1,1701,2819,16, -0,309,1,447,1511, -1,205,1523,1,827, -2820,16,0,309,1, -223,2821,16,0,309, -1,476,1543,1,477, -1549,1,1231,2822,16, -0,309,1,479,1559, -1,480,1564,1,1485, -2823,16,0,309,1, -1737,2824,16,0,309, -1,242,1578,1,478, -1583,1,1001,1588,1, -1002,1593,1,36,2825, -19,216,1,36,2826, -5,94,1,256,2827, -16,0,214,1,1261, -2828,16,0,214,1, -509,2829,16,0,214, -1,1515,2830,16,0, -214,1,2021,718,1, -1775,2831,16,0,214, -1,2029,725,1,2030, -731,1,2031,736,1, -2032,741,1,2033,746, -1,277,2832,16,0, -214,1,2035,752,1, -2037,757,1,2039,762, -1,32,2833,16,0, -214,1,2041,768,1, -2293,2834,16,0,214, -1,2043,774,1,2045, -779,1,41,2835,16, -0,214,1,1297,2836, -16,0,214,1,43, -2837,16,0,214,1, -1803,787,1,1804,2838, -16,0,214,1,299, -2839,16,0,214,1, -52,2840,16,0,214, -1,2318,2841,16,0, -214,1,2075,2842,16, -0,214,1,1574,799, -1,71,2843,16,0, -214,1,76,2844,16, -0,214,1,1834,2845, -16,0,214,1,2337, -2846,16,0,214,1, -79,2847,16,0,214, -1,1335,2848,16,0, -214,1,322,2849,16, -0,214,1,85,2850, -16,0,214,1,89, -2851,16,0,214,1, -346,2852,16,0,214, -1,2105,814,1,2106, -2853,16,0,214,1, -97,2854,16,0,214, -1,1860,821,1,2364, -827,1,102,2855,16, -0,214,1,112,2856, -16,0,214,1,1117, -2857,16,0,214,1, -1873,835,1,1876,2858, -16,0,214,1,124, -2859,16,0,214,1, -2136,842,1,381,2860, -16,0,214,1,525, -2861,16,0,214,1, -137,2862,16,0,214, -1,1901,2863,16,0, -214,1,2658,2864,16, -0,214,1,1153,2865, -16,0,214,1,151, -2866,16,0,214,1, -1407,2867,16,0,214, -1,1659,2868,16,0, -214,1,2413,2869,16, -0,214,1,406,2870, -16,0,214,1,1371, -2871,16,0,214,1, -166,2872,16,0,214, -1,1622,2873,16,0, -214,1,1931,861,1, -1933,2874,16,0,214, -1,431,2875,16,0, -214,1,1585,2876,16, -0,214,1,182,2877, -16,0,214,1,1189, -2878,16,0,214,1, -1443,2879,16,0,214, -1,1695,2880,16,0, -214,1,2198,2881,16, -0,214,1,447,2882, -16,0,214,1,2458, -876,1,2459,882,1, -1958,2883,16,0,214, -1,2462,889,1,1657, -894,1,2464,899,1, -199,2884,16,0,214, -1,459,2885,16,0, -214,1,462,2886,16, -0,214,1,217,2887, -16,0,214,1,2227, -908,1,1225,2888,16, -0,214,1,1479,2889, -16,0,214,1,1731, -2890,16,0,214,1, -1989,916,1,1990,2891, -16,0,214,1,236, -2892,16,0,214,1, -1756,2893,16,0,214, -1,37,2894,19,233, -1,37,2895,5,94, -1,256,2896,16,0, -231,1,1261,2897,16, -0,231,1,509,2898, -16,0,231,1,1515, -2899,16,0,231,1, -2021,718,1,1775,2900, -16,0,231,1,2029, -725,1,2030,731,1, -2031,736,1,2032,741, -1,2033,746,1,277, -2901,16,0,231,1, -2035,752,1,2037,757, -1,2039,762,1,32, -2902,16,0,231,1, -2041,768,1,2293,2903, -16,0,231,1,2043, -774,1,2045,779,1, -41,2904,16,0,231, -1,1297,2905,16,0, -231,1,43,2906,16, -0,231,1,1803,787, -1,1804,2907,16,0, -231,1,299,2908,16, -0,231,1,52,2909, -16,0,231,1,2318, -2910,16,0,231,1, -2075,2911,16,0,231, -1,1574,799,1,71, -2912,16,0,231,1, -76,2913,16,0,231, -1,1834,2914,16,0, -231,1,2337,2915,16, -0,231,1,79,2916, -16,0,231,1,1335, -2917,16,0,231,1, -322,2918,16,0,231, -1,85,2919,16,0, -231,1,89,2920,16, -0,231,1,346,2921, -16,0,231,1,2105, -814,1,2106,2922,16, -0,231,1,97,2923, -16,0,231,1,1860, -821,1,2364,827,1, -102,2924,16,0,231, -1,112,2925,16,0, -231,1,1117,2926,16, -0,231,1,1873,835, -1,1876,2927,16,0, -231,1,124,2928,16, -0,231,1,2136,842, -1,381,2929,16,0, -231,1,525,2930,16, -0,231,1,137,2931, -16,0,231,1,1901, -2932,16,0,231,1, -2658,2933,16,0,231, -1,1153,2934,16,0, -231,1,151,2935,16, -0,231,1,1407,2936, -16,0,231,1,1659, -2937,16,0,231,1, -2413,2938,16,0,231, -1,406,2939,16,0, -231,1,1371,2940,16, -0,231,1,166,2941, -16,0,231,1,1622, -2942,16,0,231,1, -1931,861,1,1933,2943, -16,0,231,1,431, -2944,16,0,231,1, -1585,2945,16,0,231, -1,182,2946,16,0, -231,1,1189,2947,16, -0,231,1,1443,2948, -16,0,231,1,1695, -2949,16,0,231,1, -2198,2950,16,0,231, -1,447,2951,16,0, -231,1,2458,876,1, -2459,882,1,1958,2952, -16,0,231,1,2462, -889,1,1657,894,1, -2464,899,1,199,2953, -16,0,231,1,459, -2954,16,0,231,1, -462,2955,16,0,231, -1,217,2956,16,0, -231,1,2227,908,1, -1225,2957,16,0,231, -1,1479,2958,16,0, -231,1,1731,2959,16, -0,231,1,1989,916, -1,1990,2960,16,0, -231,1,236,2961,16, -0,231,1,1756,2962, -16,0,231,1,38, -2963,19,230,1,38, -2964,5,84,1,1011, -1102,1,1012,2965,16, -0,228,1,1013,1258, -1,262,1119,1,1267, -2966,16,0,228,1, -515,2967,16,0,228, -1,1521,2968,16,0, -228,1,525,1216,1, -283,1172,1,2299,2969, -16,0,228,1,42, -2970,16,0,228,1, -40,1177,1,44,1183, -1,47,1184,1,1303, -2971,16,0,228,1, -1555,2972,16,0,228, -1,50,1201,1,48, -1190,1,49,1196,1, -51,1206,1,63,1222, -1,305,1211,1,66, -1228,1,67,1233,1, -68,1238,1,69,1243, -1,70,1248,1,73, -2973,16,0,228,1, -74,1253,1,328,1302, -1,1048,1344,1,82, -2974,16,0,228,1, -1840,2975,16,0,228, -1,1591,2976,16,0, -228,1,1341,2977,16, -0,228,1,1096,1312, -1,93,1318,1,352, -1349,1,107,2978,16, -0,228,1,1114,1343, -1,118,1355,1,1123, -2979,16,0,228,1, -371,1365,1,1628,2980, -16,0,228,1,375, -1376,1,1882,2981,16, -0,228,1,377,1381, -1,379,1386,1,380, -1391,1,883,1397,1, -373,1409,1,130,1414, -1,143,1419,1,387, -2982,16,0,228,1, -2664,2983,16,0,228, -1,1159,2984,16,0, -228,1,157,1443,1, -1413,2985,16,0,228, -1,1665,2986,16,0, -228,1,412,2987,16, -0,228,1,1377,2988, -16,0,228,1,172, -1469,1,1939,2989,16, -0,228,1,437,2990, -16,0,228,1,188, -1518,1,942,1490,1, -1195,2991,16,0,228, -1,1449,2992,16,0, -228,1,1701,2993,16, -0,228,1,447,1511, -1,205,1523,1,827, -1331,1,223,1533,1, -476,1543,1,477,1549, -1,1231,2994,16,0, -228,1,479,1559,1, -480,1564,1,1485,2995, -16,0,228,1,1737, -2996,16,0,228,1, -242,1578,1,478,1583, -1,1001,1588,1,1002, -1593,1,39,2997,19, -222,1,39,2998,5, -84,1,1011,1102,1, -1012,2999,16,0,220, -1,1013,1258,1,262, -1119,1,1267,3000,16, -0,220,1,515,3001, -16,0,220,1,1521, -3002,16,0,220,1, -525,1216,1,283,1172, -1,2299,3003,16,0, -220,1,42,3004,16, -0,220,1,40,1177, -1,44,1183,1,47, -1184,1,1303,3005,16, -0,220,1,1555,3006, -16,0,220,1,50, -1201,1,48,1190,1, -49,1196,1,51,1206, -1,63,1222,1,305, -1211,1,66,1228,1, -67,1233,1,68,1238, -1,69,1243,1,70, -1248,1,73,3007,16, -0,220,1,74,1253, -1,328,1302,1,1048, -1344,1,82,3008,16, -0,220,1,1840,3009, -16,0,220,1,1591, -3010,16,0,220,1, -1341,3011,16,0,220, -1,1096,1312,1,93, -1318,1,352,1349,1, -107,3012,16,0,220, -1,1114,1343,1,118, -1355,1,1123,3013,16, -0,220,1,371,1365, -1,1628,3014,16,0, -220,1,375,1376,1, -1882,3015,16,0,220, -1,377,1381,1,379, -1386,1,380,1391,1, -883,1397,1,373,1409, -1,130,1414,1,143, -1419,1,387,3016,16, -0,220,1,2664,3017, -16,0,220,1,1159, -3018,16,0,220,1, -157,1443,1,1413,3019, -16,0,220,1,1665, -3020,16,0,220,1, -412,3021,16,0,220, -1,1377,3022,16,0, -220,1,172,1469,1, -1939,3023,16,0,220, -1,437,3024,16,0, -220,1,188,1518,1, -942,1490,1,1195,3025, -16,0,220,1,1449, -3026,16,0,220,1, -1701,3027,16,0,220, -1,447,1511,1,205, -1523,1,827,1331,1, -223,1533,1,476,1543, -1,477,1549,1,1231, -3028,16,0,220,1, -479,1559,1,480,1564, -1,1485,3029,16,0, -220,1,1737,3030,16, -0,220,1,242,1578, -1,478,1583,1,1001, -1588,1,1002,1593,1, -40,3031,19,210,1, -40,3032,5,84,1, -1011,1102,1,1012,3033, -16,0,208,1,1013, -1258,1,262,1119,1, -1267,3034,16,0,208, -1,515,3035,16,0, -208,1,1521,3036,16, -0,208,1,525,1216, -1,283,1172,1,2299, -3037,16,0,208,1, -42,3038,16,0,208, -1,40,1177,1,44, -1183,1,47,1184,1, -1303,3039,16,0,208, -1,1555,3040,16,0, -208,1,50,1201,1, -48,1190,1,49,1196, -1,51,1206,1,63, -1222,1,305,1211,1, -66,1228,1,67,1233, -1,68,1238,1,69, -1243,1,70,1248,1, -73,3041,16,0,208, -1,74,1253,1,328, -1302,1,1048,1344,1, -82,3042,16,0,208, -1,1840,3043,16,0, -208,1,1591,3044,16, -0,208,1,1341,3045, -16,0,208,1,1096, -1312,1,93,1318,1, -352,1349,1,107,3046, -16,0,208,1,1114, -1343,1,118,3047,16, -0,208,1,1123,3048, -16,0,208,1,371, -1365,1,1628,3049,16, -0,208,1,375,1376, -1,1882,3050,16,0, -208,1,377,1381,1, -379,1386,1,380,1391, -1,883,3051,16,0, -208,1,373,1409,1, -130,3052,16,0,208, -1,143,3053,16,0, -208,1,387,3054,16, -0,208,1,2664,3055, -16,0,208,1,1159, -3056,16,0,208,1, -157,3057,16,0,208, -1,1413,3058,16,0, -208,1,1665,3059,16, -0,208,1,412,3060, -16,0,208,1,1377, -3061,16,0,208,1, -172,3062,16,0,208, -1,1939,3063,16,0, -208,1,437,3064,16, -0,208,1,188,3065, -16,0,208,1,942, -1490,1,1195,3066,16, -0,208,1,1449,3067, -16,0,208,1,1701, -3068,16,0,208,1, -447,1511,1,205,3069, -16,0,208,1,827, -3070,16,0,208,1, -223,3071,16,0,208, -1,476,1543,1,477, -1549,1,1231,3072,16, -0,208,1,479,1559, -1,480,1564,1,1485, -3073,16,0,208,1, -1737,3074,16,0,208, -1,242,3075,16,0, -208,1,478,1583,1, -1001,1588,1,1002,1593, -1,41,3076,19,172, -1,41,3077,5,84, -1,1011,1102,1,1012, -3078,16,0,170,1, -1013,1258,1,262,1119, -1,1267,3079,16,0, -170,1,515,3080,16, -0,170,1,1521,3081, -16,0,170,1,525, -1216,1,283,1172,1, -2299,3082,16,0,170, -1,42,3083,16,0, -170,1,40,1177,1, -44,1183,1,47,1184, -1,1303,3084,16,0, -170,1,1555,3085,16, -0,170,1,50,1201, -1,48,1190,1,49, -1196,1,51,1206,1, -63,1222,1,305,1211, -1,66,1228,1,67, -1233,1,68,1238,1, -69,1243,1,70,1248, -1,73,3086,16,0, -170,1,74,1253,1, -328,1302,1,1048,1344, -1,82,3087,16,0, -170,1,1840,3088,16, -0,170,1,1591,3089, -16,0,170,1,1341, -3090,16,0,170,1, -1096,1312,1,93,1318, -1,352,1349,1,107, -3091,16,0,170,1, -1114,1343,1,118,3092, -16,0,170,1,1123, -3093,16,0,170,1, -371,1365,1,1628,3094, -16,0,170,1,375, -1376,1,1882,3095,16, -0,170,1,377,1381, -1,379,1386,1,380, -1391,1,883,3096,16, -0,170,1,373,1409, -1,130,3097,16,0, -170,1,143,3098,16, -0,170,1,387,3099, -16,0,170,1,2664, -3100,16,0,170,1, -1159,3101,16,0,170, -1,157,3102,16,0, -170,1,1413,3103,16, -0,170,1,1665,3104, -16,0,170,1,412, -3105,16,0,170,1, -1377,3106,16,0,170, -1,172,3107,16,0, -170,1,1939,3108,16, -0,170,1,437,3109, -16,0,170,1,188, -3110,16,0,170,1, -942,1490,1,1195,3111, -16,0,170,1,1449, -3112,16,0,170,1, -1701,3113,16,0,170, -1,447,1511,1,205, -3114,16,0,170,1, -827,3115,16,0,170, -1,223,3116,16,0, -170,1,476,1543,1, -477,1549,1,1231,3117, -16,0,170,1,479, -1559,1,480,1564,1, -1485,3118,16,0,170, -1,1737,3119,16,0, -170,1,242,3120,16, -0,170,1,478,1583, -1,1001,1588,1,1002, -1593,1,42,3121,19, -394,1,42,3122,5, -38,1,1901,3123,16, -0,392,1,2075,3124, -16,0,392,1,1860, -821,1,1803,787,1, -1804,3125,16,0,392, -1,2413,3126,16,0, -392,1,2198,3127,16, -0,392,1,1873,835, -1,1657,894,1,1989, -916,1,1990,3128,16, -0,392,1,1775,3129, -16,0,392,1,32, -3130,16,0,392,1, -2105,814,1,2106,3131, -16,0,392,1,2364, -827,1,2227,908,1, -2337,3132,16,0,392, -1,2021,718,1,2458, -876,1,2459,882,1, -2462,889,1,2136,842, -1,2464,899,1,2029, -725,1,2030,731,1, -2031,736,1,2032,741, -1,2033,746,1,2035, -752,1,2037,757,1, -2039,762,1,1931,861, -1,2041,768,1,2043, -774,1,2045,779,1, -1574,799,1,1958,3133, -16,0,392,1,43, -3134,19,453,1,43, -3135,5,25,1,2035, -752,1,2037,757,1, -2039,762,1,2041,768, -1,2227,908,1,2043, -774,1,1657,894,1, -1860,821,1,2136,842, -1,2021,718,1,2459, -882,1,1574,799,1, -2105,3136,16,0,578, -1,1931,861,1,1873, -835,1,2031,736,1, -1803,787,1,1989,3137, -16,0,451,1,2464, -899,1,2029,725,1, -2030,731,1,2364,827, -1,2032,741,1,2033, -746,1,2045,779,1, -44,3138,19,264,1, -44,3139,5,38,1, -1901,3140,16,0,262, -1,2075,3141,16,0, -262,1,1860,821,1, -1803,787,1,1804,3142, -16,0,262,1,2413, -3143,16,0,262,1, -2198,3144,16,0,262, -1,1873,835,1,1657, -894,1,1989,916,1, -1990,3145,16,0,262, -1,1775,3146,16,0, -262,1,32,3147,16, -0,262,1,2105,814, -1,2106,3148,16,0, -262,1,2364,827,1, -2227,908,1,2337,3149, -16,0,262,1,2021, -718,1,2458,876,1, -2459,882,1,2462,889, -1,2136,842,1,2464, -899,1,2029,725,1, -2030,731,1,2031,736, -1,2032,741,1,2033, -746,1,2035,752,1, -2037,757,1,2039,762, -1,1931,861,1,2041, -768,1,2043,774,1, -2045,779,1,1574,799, -1,1958,3150,16,0, -262,1,45,3151,19, -287,1,45,3152,5, -39,1,1901,3153,16, -0,315,1,2075,3154, -16,0,315,1,1860, -821,1,1803,787,1, -1804,3155,16,0,315, -1,2413,3156,16,0, -315,1,2198,3157,16, -0,315,1,1873,835, -1,1657,894,1,1989, -916,1,1990,3158,16, -0,315,1,1775,3159, -16,0,315,1,32, -3160,16,0,315,1, -2105,814,1,2106,3161, -16,0,315,1,2364, -827,1,2227,908,1, -2337,3162,16,0,315, -1,2021,718,1,2458, -876,1,2459,882,1, -2462,889,1,2136,842, -1,2464,899,1,2029, -725,1,2030,731,1, -2031,736,1,2032,741, -1,2033,746,1,2035, -752,1,2037,757,1, -2039,762,1,1931,861, -1,2041,768,1,2043, -774,1,2045,779,1, -1832,3163,16,0,285, -1,1574,799,1,1958, -3164,16,0,315,1, -46,3165,19,671,1, -46,3166,5,38,1, -1901,3167,16,0,669, -1,2075,3168,16,0, -669,1,1860,821,1, -1803,787,1,1804,3169, -16,0,669,1,2413, -3170,16,0,669,1, -2198,3171,16,0,669, -1,1873,835,1,1657, -894,1,1989,916,1, -1990,3172,16,0,669, -1,1775,3173,16,0, -669,1,32,3174,16, -0,669,1,2105,814, -1,2106,3175,16,0, -669,1,2364,827,1, -2227,908,1,2337,3176, -16,0,669,1,2021, -718,1,2458,876,1, -2459,882,1,2462,889, -1,2136,842,1,2464, -899,1,2029,725,1, -2030,731,1,2031,736, -1,2032,741,1,2033, -746,1,2035,752,1, -2037,757,1,2039,762, -1,1931,861,1,2041, -768,1,2043,774,1, -2045,779,1,1574,799, -1,1958,3177,16,0, -669,1,47,3178,19, -466,1,47,3179,5, -19,1,0,3180,16, -0,464,1,2706,3181, -16,0,464,1,2634, -691,1,2636,3182,16, -0,464,1,2639,707, -1,2714,3183,17,3184, -15,3185,4,36,37, -0,71,0,108,0, -111,0,98,0,97, -0,108,0,68,0, +116,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,76, +0,105,0,115,0, +116,0,95,0,49, +0,1,207,1,3, +1,2,1,1,2338, +22,1,42,1,477, +1675,1,1231,1680,1, +479,1685,1,480,1690, +1,1485,1696,1,459, +1953,1,476,1669,1, +242,1703,1,478,1708, +1,481,1955,1,1001, +1713,1,1002,1718,1, +2509,1960,1,18,2339, +19,574,1,18,2340, +5,84,1,1011,1227, +1,1012,2341,16,0, +572,1,1013,1385,1, +262,1244,1,1267,2342, +16,0,572,1,515, +2343,16,0,572,1, +1521,2344,16,0,572, +1,525,1343,1,2792, +2345,16,0,572,1, +283,1299,1,2299,2346, +16,0,572,1,42, +2347,16,0,572,1, +40,1304,1,44,1310, +1,47,1311,1,1303, +2348,16,0,572,1, +1555,2349,16,0,572, +1,50,1328,1,48, +1317,1,49,1323,1, +51,1333,1,63,1349, +1,305,1338,1,66, +1355,1,67,1360,1, +68,1365,1,69,1370, +1,70,1375,1,73, +2350,16,0,572,1, +74,1380,1,328,1429, +1,1048,2351,16,0, +572,1,82,2352,16, +0,572,1,1840,2353, +16,0,572,1,1591, +2354,16,0,572,1, +1341,2355,16,0,572, +1,1096,1439,1,93, +1445,1,352,1475,1, +107,2356,16,0,572, +1,1114,1469,1,118, +2357,16,0,572,1, +1123,2358,16,0,572, +1,371,1491,1,1628, +2359,16,0,572,1, +375,1502,1,1882,2360, +16,0,572,1,377, +1507,1,379,1512,1, +380,1517,1,883,2361, +16,0,572,1,373, +1535,1,130,2362,16, +0,572,1,143,2363, +16,0,572,1,387, +2364,16,0,572,1, +1159,2365,16,0,572, +1,157,2366,16,0, +572,1,1413,2367,16, +0,572,1,1665,2368, +16,0,572,1,412, +2369,16,0,572,1, +1377,2370,16,0,572, +1,172,2371,16,0, +572,1,1939,2372,16, +0,572,1,437,2373, +16,0,572,1,188, +2374,16,0,572,1, +942,2375,16,0,572, +1,1195,2376,16,0, +572,1,1449,2377,16, +0,572,1,1701,2378, +16,0,572,1,447, +1637,1,205,2379,16, +0,572,1,827,2380, +16,0,572,1,223, +2381,16,0,572,1, +476,1669,1,477,1675, +1,1231,2382,16,0, +572,1,479,1685,1, +480,1690,1,1485,2383, +16,0,572,1,1737, +2384,16,0,572,1, +242,2385,16,0,572, +1,478,1708,1,1001, +1713,1,1002,1718,1, +19,2386,19,251,1, +19,2387,5,176,1, +942,2388,16,0,537, +1,256,2389,16,0, +249,1,1261,2390,16, +0,249,1,1011,1227, +1,1012,2391,16,0, +537,1,2458,1001,1, +262,1244,1,1267,2392, +16,0,537,1,2021, +843,1,1521,2393,16, +0,537,1,1775,2394, +16,0,249,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2786,2395,16,0, +249,1,277,2396,16, +0,249,1,2035,877, +1,2037,882,1,2792, +2397,16,0,537,1, +32,2398,16,0,249, +1,2464,1024,1,2293, +2399,16,0,249,1, +2043,899,1,2045,904, +1,2299,2400,16,0, +537,1,41,2401,16, +0,249,1,42,2402, +16,0,537,1,40, +1304,1,44,1310,1, +43,2403,16,0,249, +1,1804,2404,16,0, +249,1,48,1317,1, +49,1323,1,47,1311, +1,51,1333,1,52, +2405,16,0,249,1, +50,1328,1,305,1338, +1,1096,1439,1,1515, +2406,16,0,249,1, +2318,2407,16,0,249, +1,283,1299,1,63, +1349,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,71,2408,16, +0,249,1,73,2409, +16,0,537,1,74, +1380,1,1013,1385,1, +76,2410,16,0,249, +1,1834,2411,16,0, +249,1,2337,2412,16, +0,249,1,79,2413, +16,0,249,1,1335, +2414,16,0,249,1, +299,2415,16,0,249, +1,82,2416,16,0, +537,1,1840,2417,16, +0,537,1,1297,2418, +16,0,249,1,85, +2419,16,0,249,1, +1341,2420,16,0,537, +1,89,2421,16,0, +249,1,1303,2422,16, +0,537,1,509,2423, +16,0,249,1,93, +1445,1,322,2424,16, +0,249,1,2039,887, +1,97,2425,16,0, +249,1,2041,893,1, +1555,2426,16,0,537, +1,827,2427,16,0, +537,1,102,2428,16, +0,249,1,1860,946, +1,1803,912,1,2364, +952,1,107,2429,16, +0,537,1,1114,1469, +1,112,2430,16,0, +249,1,1117,2431,16, +0,249,1,352,1475, +1,1873,961,1,118, +2432,16,0,537,1, +1123,2433,16,0,537, +1,371,1491,1,515, +2434,16,0,537,1, +1377,2435,16,0,537, +1,124,2436,16,0, +249,1,1882,2437,16, +0,537,1,377,1507, +1,379,1512,1,380, +1517,1,130,2438,16, +0,537,1,346,2439, +16,0,249,1,2075, +2440,16,0,249,1, +373,1535,1,387,2441, +16,0,537,1,137, +2442,16,0,249,1, +143,2443,16,0,537, +1,1901,2444,16,0, +249,1,1048,2445,16, +0,537,1,1153,2446, +16,0,249,1,375, +1502,1,151,2447,16, +0,249,1,1407,2448, +16,0,249,1,1659, +2449,16,0,249,1, +2413,2450,16,0,249, +1,1159,2451,16,0, +537,1,381,2452,16, +0,249,1,157,2453, +16,0,537,1,1413, +2454,16,0,537,1, +883,2455,16,0,537, +1,1371,2456,16,0, +249,1,328,1429,1, +2105,939,1,2106,2457, +16,0,249,1,166, +2458,16,0,249,1, +525,2459,16,0,249, +1,1622,2460,16,0, +249,1,406,2461,16, +0,249,1,1574,924, +1,172,2462,16,0, +537,1,1931,986,1, +412,2463,16,0,537, +1,1933,2464,16,0, +249,1,1876,2465,16, +0,249,1,431,2466, +16,0,249,1,1585, +2467,16,0,249,1, +182,2468,16,0,249, +1,1628,2469,16,0, +537,1,1189,2470,16, +0,249,1,437,2471, +16,0,537,1,1591, +2472,16,0,537,1, +188,2473,16,0,537, +1,1695,2474,16,0, +249,1,2198,2475,16, +0,249,1,1195,2476, +16,0,537,1,1449, +2477,16,0,537,1, +1701,2478,16,0,537, +1,447,2479,16,0, +249,1,199,2480,16, +0,249,1,2459,1007, +1,1958,2481,16,0, +249,1,2462,1014,1, +1657,1019,1,205,2482, +16,0,537,1,459, +2483,16,0,249,1, +462,2484,16,0,249, +1,1665,2485,16,0, +537,1,217,2486,16, +0,249,1,2227,1033, +1,2033,871,1,1225, +2487,16,0,249,1, +223,2488,16,0,537, +1,1479,2489,16,0, +249,1,1731,2490,16, +0,249,1,477,1675, +1,1231,2491,16,0, +537,1,479,1685,1, +480,1690,1,1485,2492, +16,0,537,1,1737, +2493,16,0,537,1, +1989,1041,1,1990,2494, +16,0,249,1,1443, +2495,16,0,249,1, +236,2496,16,0,249, +1,2136,968,1,476, +1669,1,242,2497,16, +0,537,1,478,1708, +1,1939,2498,16,0, +537,1,1001,1713,1, +1002,1718,1,1756,2499, +16,0,249,1,20, +2500,19,510,1,20, +2501,5,84,1,1011, +1227,1,1012,2502,16, +0,508,1,1013,1385, +1,262,1244,1,1267, +2503,16,0,508,1, +515,2504,16,0,508, +1,1521,2505,16,0, +508,1,525,1343,1, +2792,2506,16,0,508, +1,283,1299,1,2299, +2507,16,0,508,1, +42,2508,16,0,508, +1,40,1304,1,44, +1310,1,47,1311,1, +1303,2509,16,0,508, +1,1555,2510,16,0, +508,1,50,1328,1, +48,1317,1,49,1323, +1,51,1333,1,63, +1349,1,305,1338,1, +66,1355,1,67,1360, +1,68,1365,1,69, +1370,1,70,1375,1, +73,2511,16,0,508, +1,74,1380,1,328, +2512,16,0,508,1, +1048,2513,16,0,508, +1,82,2514,16,0, +508,1,1840,2515,16, +0,508,1,1591,2516, +16,0,508,1,1341, +2517,16,0,508,1, +1096,1439,1,93,1445, +1,352,2518,16,0, +508,1,107,2519,16, +0,508,1,1114,1469, +1,118,2520,16,0, +508,1,1123,2521,16, +0,508,1,371,1491, +1,1628,2522,16,0, +508,1,375,1502,1, +1882,2523,16,0,508, +1,377,1507,1,379, +1512,1,380,1517,1, +883,2524,16,0,508, +1,373,1535,1,130, +2525,16,0,508,1, +143,2526,16,0,508, +1,387,2527,16,0, +508,1,1159,2528,16, +0,508,1,157,2529, +16,0,508,1,1413, +2530,16,0,508,1, +1665,2531,16,0,508, +1,412,2532,16,0, +508,1,1377,2533,16, +0,508,1,172,2534, +16,0,508,1,1939, +2535,16,0,508,1, +437,2536,16,0,508, +1,188,2537,16,0, +508,1,942,2538,16, +0,508,1,1195,2539, +16,0,508,1,1449, +2540,16,0,508,1, +1701,2541,16,0,508, +1,447,1637,1,205, +2542,16,0,508,1, +827,2543,16,0,508, +1,223,2544,16,0, +508,1,476,1669,1, +477,1675,1,1231,2545, +16,0,508,1,479, +1685,1,480,1690,1, +1485,2546,16,0,508, +1,1737,2547,16,0, +508,1,242,2548,16, +0,508,1,478,1708, +1,1001,1713,1,1002, +1718,1,21,2549,19, +478,1,21,2550,5, +84,1,1011,1227,1, +1012,2551,16,0,476, +1,1013,1385,1,262, +1244,1,1267,2552,16, +0,476,1,515,2553, +16,0,476,1,1521, +2554,16,0,476,1, +525,1343,1,2792,2555, +16,0,476,1,283, +1299,1,2299,2556,16, +0,476,1,42,2557, +16,0,476,1,40, +1304,1,44,1310,1, +47,1311,1,1303,2558, +16,0,476,1,1555, +2559,16,0,476,1, +50,1328,1,48,1317, +1,49,1323,1,51, +1333,1,63,1349,1, +305,1338,1,66,1355, +1,67,1360,1,68, +1365,1,69,1370,1, +70,1375,1,73,2560, +16,0,476,1,74, +1380,1,328,2561,16, +0,476,1,1048,2562, +16,0,476,1,82, +2563,16,0,476,1, +1840,2564,16,0,476, +1,1591,2565,16,0, +476,1,1341,2566,16, +0,476,1,1096,1439, +1,93,1445,1,352, +2567,16,0,476,1, +107,2568,16,0,476, +1,1114,1469,1,118, +2569,16,0,476,1, +1123,2570,16,0,476, +1,371,1491,1,1628, +2571,16,0,476,1, +375,1502,1,1882,2572, +16,0,476,1,377, +1507,1,379,1512,1, +380,1517,1,883,2573, +16,0,476,1,373, +1535,1,130,2574,16, +0,476,1,143,2575, +16,0,476,1,387, +2576,16,0,476,1, +1159,2577,16,0,476, +1,157,2578,16,0, +476,1,1413,2579,16, +0,476,1,1665,2580, +16,0,476,1,412, +2581,16,0,476,1, +1377,2582,16,0,476, +1,172,2583,16,0, +476,1,1939,2584,16, +0,476,1,437,2585, +16,0,476,1,188, +2586,16,0,476,1, +942,2587,16,0,476, +1,1195,2588,16,0, +476,1,1449,2589,16, +0,476,1,1701,2590, +16,0,476,1,447, +1637,1,205,2591,16, +0,476,1,827,2592, +16,0,476,1,223, +2593,16,0,476,1, +476,1669,1,477,1675, +1,1231,2594,16,0, +476,1,479,1685,1, +480,1690,1,1485,2595, +16,0,476,1,1737, +2596,16,0,476,1, +242,2597,16,0,476, +1,478,1708,1,1001, +1713,1,1002,1718,1, +22,2598,19,429,1, +22,2599,5,84,1, +1011,1227,1,1012,2600, +16,0,427,1,1013, +1385,1,262,1244,1, +1267,2601,16,0,427, +1,515,2602,16,0, +427,1,1521,2603,16, +0,427,1,525,1343, +1,2792,2604,16,0, +427,1,283,1299,1, +2299,2605,16,0,427, +1,42,2606,16,0, +427,1,40,1304,1, +44,1310,1,47,1311, +1,1303,2607,16,0, +427,1,1555,2608,16, +0,427,1,50,1328, +1,48,1317,1,49, +1323,1,51,1333,1, +63,1349,1,305,1338, +1,66,1355,1,67, +1360,1,68,1365,1, +69,1370,1,70,1375, +1,73,2609,16,0, +427,1,74,1380,1, +328,2610,16,0,427, +1,1048,2611,16,0, +427,1,82,2612,16, +0,427,1,1840,2613, +16,0,427,1,1591, +2614,16,0,427,1, +1341,2615,16,0,427, +1,1096,1439,1,93, +1445,1,352,2616,16, +0,427,1,107,2617, +16,0,427,1,1114, +1469,1,118,2618,16, +0,427,1,1123,2619, +16,0,427,1,371, +1491,1,1628,2620,16, +0,427,1,375,1502, +1,1882,2621,16,0, +427,1,377,1507,1, +379,1512,1,380,1517, +1,883,2622,16,0, +427,1,373,1535,1, +130,2623,16,0,427, +1,143,2624,16,0, +427,1,387,2625,16, +0,427,1,1159,2626, +16,0,427,1,157, +2627,16,0,427,1, +1413,2628,16,0,427, +1,1665,2629,16,0, +427,1,412,2630,16, +0,427,1,1377,2631, +16,0,427,1,172, +2632,16,0,427,1, +1939,2633,16,0,427, +1,437,2634,16,0, +427,1,188,2635,16, +0,427,1,942,2636, +16,0,427,1,1195, +2637,16,0,427,1, +1449,2638,16,0,427, +1,1701,2639,16,0, +427,1,447,1637,1, +205,2640,16,0,427, +1,827,2641,16,0, +427,1,223,2642,16, +0,427,1,476,1669, +1,477,1675,1,1231, +2643,16,0,427,1, +479,1685,1,480,1690, +1,1485,2644,16,0, +427,1,1737,2645,16, +0,427,1,242,2646, +16,0,427,1,478, +1708,1,1001,1713,1, +1002,1718,1,23,2647, +19,590,1,23,2648, +5,38,1,1901,2649, +16,0,588,1,2075, +2650,16,0,588,1, +1860,946,1,1803,912, +1,1804,2651,16,0, +588,1,2413,2652,16, +0,588,1,2198,2653, +16,0,588,1,1873, +961,1,1657,1019,1, +1989,1041,1,1990,2654, +16,0,588,1,1775, +2655,16,0,588,1, +32,2656,16,0,588, +1,2105,939,1,2106, +2657,16,0,588,1, +2364,952,1,2227,1033, +1,2337,2658,16,0, +588,1,2021,843,1, +2458,1001,1,2459,1007, +1,2462,1014,1,2136, +968,1,2464,1024,1, +2029,850,1,2030,856, +1,2031,861,1,2032, +866,1,2033,871,1, +2035,877,1,2037,882, +1,2039,887,1,1931, +986,1,2041,893,1, +2043,899,1,2045,904, +1,1574,924,1,1958, +2659,16,0,588,1, +24,2660,19,193,1, +24,2661,5,5,1, +44,2662,16,0,191, +1,377,2663,16,0, +626,1,40,2664,16, +0,799,1,63,2665, +16,0,219,1,373, +2666,16,0,622,1, +25,2667,19,329,1, +25,2668,5,177,1, +942,1616,1,256,2669, +16,0,631,1,1261, +2670,16,0,631,1, +1011,1227,1,1012,2671, +16,0,327,1,2458, +1001,1,262,1244,1, +1267,2672,16,0,327, +1,2021,843,1,1521, +2673,16,0,327,1, +1775,2674,16,0,631, +1,2029,850,1,2030, +856,1,2031,861,1, +2032,866,1,2786,2675, +16,0,631,1,277, +2676,16,0,631,1, +2035,877,1,2037,882, +1,2792,2677,16,0, +327,1,32,2678,16, +0,631,1,2464,1024, +1,2293,2679,16,0, +631,1,2043,899,1, +2045,904,1,2299,2680, +16,0,327,1,41, +2681,16,0,631,1, +42,2682,16,0,327, +1,40,1304,1,44, +1310,1,43,2683,16, +0,631,1,1804,2684, +16,0,631,1,48, +1317,1,49,1323,1, +47,1311,1,51,1333, +1,52,2685,16,0, +631,1,50,1328,1, +305,1338,1,1096,1439, +1,1515,2686,16,0, +631,1,2318,2687,16, +0,631,1,62,2688, +16,0,631,1,63, +1349,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,71,2689,16, +0,631,1,283,1299, +1,73,2690,16,0, +327,1,74,1380,1, +1013,1385,1,76,2691, +16,0,631,1,1834, +2692,16,0,631,1, +2337,2693,16,0,631, +1,79,2694,16,0, +631,1,1335,2695,16, +0,631,1,299,2696, +16,0,631,1,82, +2697,16,0,327,1, +1840,2698,16,0,327, +1,1297,2699,16,0, +631,1,85,2700,16, +0,631,1,1341,2701, +16,0,327,1,89, +2702,16,0,631,1, +1303,2703,16,0,327, +1,509,2704,16,0, +631,1,93,1445,1, +322,2705,16,0,631, +1,2039,887,1,97, +2706,16,0,631,1, +2041,893,1,1555,2707, +16,0,327,1,827, +2708,16,0,327,1, +102,2709,16,0,631, +1,1860,946,1,1803, +912,1,2364,952,1, +107,2710,16,0,327, +1,1114,1469,1,112, +2711,16,0,631,1, +1117,2712,16,0,631, +1,352,1475,1,1873, +961,1,118,1481,1, +1123,2713,16,0,327, +1,371,1491,1,515, +2714,16,0,327,1, +1377,2715,16,0,327, +1,124,2716,16,0, +631,1,1882,2717,16, +0,327,1,377,1507, +1,379,1512,1,380, +1517,1,130,1540,1, +346,2718,16,0,631, +1,2075,2719,16,0, +631,1,373,1535,1, +387,2720,16,0,327, +1,137,2721,16,0, +631,1,143,2722,16, +0,327,1,1901,2723, +16,0,631,1,1048, +1470,1,1153,2724,16, +0,631,1,375,1502, +1,151,2725,16,0, +631,1,1407,2726,16, +0,631,1,1659,2727, +16,0,631,1,2413, +2728,16,0,631,1, +1159,2729,16,0,327, +1,381,2730,16,0, +631,1,157,2731,16, +0,327,1,1413,2732, +16,0,327,1,883, +2733,16,0,327,1, +1371,2734,16,0,631, +1,328,1429,1,2105, +939,1,2106,2735,16, +0,631,1,166,2736, +16,0,631,1,525, +2737,16,0,631,1, +1622,2738,16,0,631, +1,406,2739,16,0, +631,1,1574,924,1, +172,1595,1,1931,986, +1,412,2740,16,0, +327,1,1933,2741,16, +0,631,1,1876,2742, +16,0,631,1,431, +2743,16,0,631,1, +1585,2744,16,0,631, +1,182,2745,16,0, +631,1,1628,2746,16, +0,327,1,1189,2747, +16,0,631,1,437, +2748,16,0,327,1, +1591,2749,16,0,327, +1,188,1644,1,1695, +2750,16,0,631,1, +2198,2751,16,0,631, +1,1195,2752,16,0, +327,1,1449,2753,16, +0,327,1,1701,2754, +16,0,327,1,447, +2755,16,0,631,1, +199,2756,16,0,631, +1,2459,1007,1,1958, +2757,16,0,631,1, +2462,1014,1,1657,1019, +1,205,2758,16,0, +327,1,459,2759,16, +0,631,1,462,2760, +16,0,631,1,1665, +2761,16,0,327,1, +217,2762,16,0,631, +1,2227,1033,1,2033, +871,1,1225,2763,16, +0,631,1,223,2764, +16,0,327,1,1479, +2765,16,0,631,1, +1731,2766,16,0,631, +1,477,1675,1,1231, +2767,16,0,327,1, +479,1685,1,480,1690, +1,1485,2768,16,0, +327,1,1737,2769,16, +0,327,1,1989,1041, +1,1990,2770,16,0, +631,1,1443,2771,16, +0,631,1,236,2772, +16,0,631,1,2136, +968,1,476,1669,1, +242,2773,16,0,327, +1,478,1708,1,1939, +2774,16,0,327,1, +1001,1713,1,1002,1718, +1,1756,2775,16,0, +631,1,26,2776,19, +348,1,26,2777,5, +84,1,1011,1227,1, +1012,2778,16,0,346, +1,1013,1385,1,262, +1244,1,1267,2779,16, +0,346,1,515,2780, +16,0,780,1,1521, +2781,16,0,346,1, +525,1343,1,2792,2782, +16,0,346,1,283, +1299,1,2299,2783,16, +0,346,1,42,2784, +16,0,346,1,40, +1304,1,44,1310,1, +47,1311,1,1303,2785, +16,0,346,1,1555, +2786,16,0,346,1, +50,1328,1,48,1317, +1,49,1323,1,51, +1333,1,63,1349,1, +305,1338,1,66,1355, +1,67,1360,1,68, +1365,1,69,1370,1, +70,1375,1,73,2787, +16,0,346,1,74, +1380,1,328,1429,1, +1048,1470,1,82,2788, +16,0,346,1,1840, +2789,16,0,346,1, +1591,2790,16,0,346, +1,1341,2791,16,0, +346,1,1096,1439,1, +93,1445,1,352,1475, +1,107,2792,16,0, +346,1,1114,1469,1, +118,1481,1,1123,2793, +16,0,346,1,371, +1491,1,1628,2794,16, +0,346,1,375,1502, +1,1882,2795,16,0, +346,1,377,1507,1, +379,1512,1,380,1517, +1,883,2796,16,0, +346,1,373,1535,1, +130,1540,1,143,2797, +16,0,346,1,387, +2798,16,0,346,1, +1159,2799,16,0,346, +1,157,2800,16,0, +346,1,1413,2801,16, +0,346,1,1665,2802, +16,0,346,1,412, +2803,16,0,346,1, +1377,2804,16,0,346, +1,172,1595,1,1939, +2805,16,0,346,1, +437,2806,16,0,709, +1,188,1644,1,942, +1616,1,1195,2807,16, +0,346,1,1449,2808, +16,0,346,1,1701, +2809,16,0,346,1, +447,1637,1,205,2810, +16,0,346,1,827, +2811,16,0,346,1, +223,2812,16,0,346, +1,476,1669,1,477, +1675,1,1231,2813,16, +0,346,1,479,1685, +1,480,1690,1,1485, +2814,16,0,346,1, +1737,2815,16,0,346, +1,242,2816,16,0, +346,1,478,1708,1, +1001,1713,1,1002,1718, +1,27,2817,19,721, +1,27,2818,5,95, +1,256,2819,16,0, +719,1,1261,2820,16, +0,719,1,509,2821, +16,0,719,1,1515, +2822,16,0,719,1, +2021,843,1,1775,2823, +16,0,719,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2033,871,1,277, +2824,16,0,719,1, +2035,877,1,2037,882, +1,2039,887,1,32, +2825,16,0,719,1, +2041,893,1,2293,2826, +16,0,719,1,2043, +899,1,2045,904,1, +41,2827,16,0,719, +1,1297,2828,16,0, +719,1,43,2829,16, +0,719,1,1803,912, +1,1804,2830,16,0, +719,1,299,2831,16, +0,719,1,52,2832, +16,0,719,1,2318, +2833,16,0,719,1, +62,2834,16,0,719, +1,2075,2835,16,0, +719,1,1574,924,1, +71,2836,16,0,719, +1,76,2837,16,0, +719,1,1834,2838,16, +0,719,1,2337,2839, +16,0,719,1,79, +2840,16,0,719,1, +1335,2841,16,0,719, +1,322,2842,16,0, +719,1,85,2843,16, +0,719,1,89,2844, +16,0,719,1,346, +2845,16,0,719,1, +2105,939,1,2106,2846, +16,0,719,1,97, +2847,16,0,719,1, +1860,946,1,2364,952, +1,102,2848,16,0, +719,1,112,2849,16, +0,719,1,1117,2850, +16,0,719,1,2786, +2851,16,0,719,1, +1873,961,1,1876,2852, +16,0,719,1,124, +2853,16,0,719,1, +2136,968,1,381,2854, +16,0,719,1,525, +2855,16,0,719,1, +137,2856,16,0,719, +1,1901,2857,16,0, +719,1,1153,2858,16, +0,719,1,151,2859, +16,0,719,1,1407, +2860,16,0,719,1, +1659,2861,16,0,719, +1,2413,2862,16,0, +719,1,406,2863,16, +0,719,1,1371,2864, +16,0,719,1,166, +2865,16,0,719,1, +1622,2866,16,0,719, +1,1931,986,1,1933, +2867,16,0,719,1, +431,2868,16,0,719, +1,1585,2869,16,0, +719,1,182,2870,16, +0,719,1,1189,2871, +16,0,719,1,1443, +2872,16,0,719,1, +1695,2873,16,0,719, +1,2198,2874,16,0, +719,1,447,2875,16, +0,719,1,2458,1001, +1,2459,1007,1,1958, +2876,16,0,719,1, +2462,1014,1,1657,1019, +1,2464,1024,1,199, +2877,16,0,719,1, +459,2878,16,0,719, +1,462,2879,16,0, +719,1,217,2880,16, +0,719,1,2227,1033, +1,1225,2881,16,0, +719,1,1479,2882,16, +0,719,1,1731,2883, +16,0,719,1,1989, +1041,1,1990,2884,16, +0,719,1,236,2885, +16,0,719,1,1756, +2886,16,0,719,1, +28,2887,19,749,1, +28,2888,5,60,1, +328,1429,1,223,1659, +1,1096,1439,1,118, +1481,1,883,1523,1, +525,1343,1,1001,1713, +1,130,1540,1,459, +1953,1,1114,1469,1, +352,1475,1,447,1637, +1,464,1948,1,1011, +1227,1,1013,1385,1, +242,1703,1,143,1545, +1,40,1304,1,41, +1913,1,42,1917,1, +479,1685,1,44,1310, +1,481,1955,1,373, +1535,1,47,1311,1, +157,1568,1,49,1323, +1,50,1328,1,48, +1317,1,379,1512,1, +380,1517,1,51,1333, +1,476,1669,1,371, +1491,1,478,1708,1, +1048,1470,1,375,1502, +1,172,1595,1,262, +1244,1,283,1299,1, +63,1349,1,67,1360, +1,68,1365,1,69, +1370,1,66,1355,1, +461,2889,16,0,747, +1,74,1380,1,377, +1507,1,1002,1718,1, +70,1375,1,188,1644, +1,82,1407,1,305, +1338,1,477,1675,1, +827,1457,1,93,1445, +1,480,1690,1,205, +1649,1,942,1616,1, +107,1464,1,29,2890, +19,315,1,29,2891, +5,84,1,1011,1227, +1,1012,2892,16,0, +313,1,1013,1385,1, +262,1244,1,1267,2893, +16,0,313,1,515, +2894,16,0,313,1, +1521,2895,16,0,313, +1,525,1343,1,2792, +2896,16,0,313,1, +283,1299,1,2299,2897, +16,0,313,1,42, +2898,16,0,313,1, +40,1304,1,44,1310, +1,47,1311,1,1303, +2899,16,0,313,1, +1555,2900,16,0,313, +1,50,1328,1,48, +1317,1,49,1323,1, +51,1333,1,63,1349, +1,305,1338,1,66, +1355,1,67,1360,1, +68,1365,1,69,1370, +1,70,1375,1,73, +2901,16,0,313,1, +74,1380,1,328,1429, +1,1048,1470,1,82, +2902,16,0,313,1, +1840,2903,16,0,313, +1,1591,2904,16,0, +313,1,1341,2905,16, +0,313,1,1096,1439, +1,93,1445,1,352, +1475,1,107,2906,16, +0,313,1,1114,1469, +1,118,1481,1,1123, +2907,16,0,313,1, +371,1491,1,1628,2908, +16,0,313,1,375, +1502,1,1882,2909,16, +0,313,1,377,1507, +1,379,1512,1,380, +1517,1,883,2910,16, +0,313,1,373,1535, +1,130,1540,1,143, +1545,1,387,2911,16, +0,313,1,1159,2912, +16,0,313,1,157, +1568,1,1413,2913,16, +0,313,1,1665,2914, +16,0,313,1,412, +2915,16,0,313,1, +1377,2916,16,0,313, +1,172,1595,1,1939, +2917,16,0,313,1, +437,2918,16,0,313, +1,188,1644,1,942, +1616,1,1195,2919,16, +0,313,1,1449,2920, +16,0,313,1,1701, +2921,16,0,313,1, +447,1637,1,205,2922, +16,0,313,1,827, +2923,16,0,313,1, +223,2924,16,0,313, +1,476,1669,1,477, +1675,1,1231,2925,16, +0,313,1,479,1685, +1,480,1690,1,1485, +2926,16,0,313,1, +1737,2927,16,0,313, +1,242,2928,16,0, +313,1,478,1708,1, +1001,1713,1,1002,1718, +1,30,2929,19,297, +1,30,2930,5,84, +1,1011,1227,1,1012, +2931,16,0,295,1, +1013,1385,1,262,1244, +1,1267,2932,16,0, +295,1,515,2933,16, +0,295,1,1521,2934, +16,0,295,1,525, +1343,1,2792,2935,16, +0,295,1,283,1299, +1,2299,2936,16,0, +295,1,42,2937,16, +0,295,1,40,1304, +1,44,1310,1,47, +1311,1,1303,2938,16, +0,295,1,1555,2939, +16,0,295,1,50, +1328,1,48,1317,1, +49,1323,1,51,1333, +1,63,1349,1,305, +1338,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,73,2940,16, +0,295,1,74,1380, +1,328,1429,1,1048, +1470,1,82,2941,16, +0,295,1,1840,2942, +16,0,295,1,1591, +2943,16,0,295,1, +1341,2944,16,0,295, +1,1096,1439,1,93, +1445,1,352,1475,1, +107,2945,16,0,295, +1,1114,1469,1,118, +1481,1,1123,2946,16, +0,295,1,371,1491, +1,1628,2947,16,0, +295,1,375,1502,1, +1882,2948,16,0,295, +1,377,1507,1,379, +1512,1,380,1517,1, +883,2949,16,0,295, +1,373,1535,1,130, +1540,1,143,1545,1, +387,2950,16,0,295, +1,1159,2951,16,0, +295,1,157,1568,1, +1413,2952,16,0,295, +1,1665,2953,16,0, +295,1,412,2954,16, +0,295,1,1377,2955, +16,0,295,1,172, +1595,1,1939,2956,16, +0,295,1,437,2957, +16,0,295,1,188, +1644,1,942,1616,1, +1195,2958,16,0,295, +1,1449,2959,16,0, +295,1,1701,2960,16, +0,295,1,447,1637, +1,205,2961,16,0, +295,1,827,2962,16, +0,295,1,223,2963, +16,0,295,1,476, +1669,1,477,1675,1, +1231,2964,16,0,295, +1,479,1685,1,480, +1690,1,1485,2965,16, +0,295,1,1737,2966, +16,0,295,1,242, +2967,16,0,295,1, +478,1708,1,1001,1713, +1,1002,1718,1,31, +2968,19,277,1,31, +2969,5,84,1,1011, +1227,1,1012,2970,16, +0,275,1,1013,1385, +1,262,1244,1,1267, +2971,16,0,275,1, +515,2972,16,0,275, +1,1521,2973,16,0, +275,1,525,1343,1, +2792,2974,16,0,275, +1,283,1299,1,2299, +2975,16,0,275,1, +42,2976,16,0,275, +1,40,1304,1,44, +1310,1,47,1311,1, +1303,2977,16,0,275, +1,1555,2978,16,0, +275,1,50,1328,1, +48,1317,1,49,1323, +1,51,1333,1,63, +1349,1,305,1338,1, +66,1355,1,67,1360, +1,68,1365,1,69, +1370,1,70,1375,1, +73,2979,16,0,275, +1,74,1380,1,328, +1429,1,1048,1470,1, +82,2980,16,0,275, +1,1840,2981,16,0, +275,1,1591,2982,16, +0,275,1,1341,2983, +16,0,275,1,1096, +1439,1,93,1445,1, +352,1475,1,107,2984, +16,0,275,1,1114, +1469,1,118,1481,1, +1123,2985,16,0,275, +1,371,1491,1,1628, +2986,16,0,275,1, +375,1502,1,1882,2987, +16,0,275,1,377, +1507,1,379,1512,1, +380,1517,1,883,2988, +16,0,275,1,373, +1535,1,130,1540,1, +143,2989,16,0,275, +1,387,2990,16,0, +275,1,1159,2991,16, +0,275,1,157,2992, +16,0,275,1,1413, +2993,16,0,275,1, +1665,2994,16,0,275, +1,412,2995,16,0, +275,1,1377,2996,16, +0,275,1,172,1595, +1,1939,2997,16,0, +275,1,437,2998,16, +0,275,1,188,1644, +1,942,1616,1,1195, +2999,16,0,275,1, +1449,3000,16,0,275, +1,1701,3001,16,0, +275,1,447,1637,1, +205,3002,16,0,275, +1,827,3003,16,0, +275,1,223,3004,16, +0,275,1,476,1669, +1,477,1675,1,1231, +3005,16,0,275,1, +479,1685,1,480,1690, +1,1485,3006,16,0, +275,1,1737,3007,16, +0,275,1,242,3008, +16,0,275,1,478, +1708,1,1001,1713,1, +1002,1718,1,32,3009, +19,270,1,32,3010, +5,84,1,1011,1227, +1,1012,3011,16,0, +268,1,1013,1385,1, +262,1244,1,1267,3012, +16,0,268,1,515, +3013,16,0,268,1, +1521,3014,16,0,268, +1,525,1343,1,2792, +3015,16,0,268,1, +283,1299,1,2299,3016, +16,0,268,1,42, +3017,16,0,268,1, +40,1304,1,44,1310, +1,47,1311,1,1303, +3018,16,0,268,1, +1555,3019,16,0,268, +1,50,1328,1,48, +1317,1,49,1323,1, +51,1333,1,63,1349, +1,305,1338,1,66, +1355,1,67,1360,1, +68,1365,1,69,1370, +1,70,1375,1,73, +3020,16,0,268,1, +74,1380,1,328,1429, +1,1048,1470,1,82, +3021,16,0,268,1, +1840,3022,16,0,268, +1,1591,3023,16,0, +268,1,1341,3024,16, +0,268,1,1096,1439, +1,93,1445,1,352, +1475,1,107,3025,16, +0,268,1,1114,1469, +1,118,1481,1,1123, +3026,16,0,268,1, +371,1491,1,1628,3027, +16,0,268,1,375, +1502,1,1882,3028,16, +0,268,1,377,1507, +1,379,1512,1,380, +1517,1,883,3029,16, +0,268,1,373,1535, +1,130,1540,1,143, +3030,16,0,268,1, +387,3031,16,0,268, +1,1159,3032,16,0, +268,1,157,3033,16, +0,268,1,1413,3034, +16,0,268,1,1665, +3035,16,0,268,1, +412,3036,16,0,268, +1,1377,3037,16,0, +268,1,172,1595,1, +1939,3038,16,0,268, +1,437,3039,16,0, +268,1,188,1644,1, +942,1616,1,1195,3040, +16,0,268,1,1449, +3041,16,0,268,1, +1701,3042,16,0,268, +1,447,1637,1,205, +3043,16,0,268,1, +827,3044,16,0,268, +1,223,3045,16,0, +268,1,476,1669,1, +477,1675,1,1231,3046, +16,0,268,1,479, +1685,1,480,1690,1, +1485,3047,16,0,268, +1,1737,3048,16,0, +268,1,242,3049,16, +0,268,1,478,1708, +1,1001,1713,1,1002, +1718,1,33,3050,19, +378,1,33,3051,5, +84,1,1011,1227,1, +1012,3052,16,0,376, +1,1013,1385,1,262, +1244,1,1267,3053,16, +0,376,1,515,3054, +16,0,376,1,1521, +3055,16,0,376,1, +525,1343,1,2792,3056, +16,0,376,1,283, +1299,1,2299,3057,16, +0,376,1,42,3058, +16,0,376,1,40, +1304,1,44,1310,1, +47,1311,1,1303,3059, +16,0,376,1,1555, +3060,16,0,376,1, +50,1328,1,48,1317, +1,49,1323,1,51, +1333,1,63,1349,1, +305,1338,1,66,1355, +1,67,1360,1,68, +1365,1,69,1370,1, +70,1375,1,73,3061, +16,0,376,1,74, +1380,1,328,1429,1, +1048,1470,1,82,3062, +16,0,376,1,1840, +3063,16,0,376,1, +1591,3064,16,0,376, +1,1341,3065,16,0, +376,1,1096,1439,1, +93,1445,1,352,1475, +1,107,3066,16,0, +376,1,1114,1469,1, +118,1481,1,1123,3067, +16,0,376,1,371, +1491,1,1628,3068,16, +0,376,1,375,1502, +1,1882,3069,16,0, +376,1,377,1507,1, +379,1512,1,380,1517, +1,883,3070,16,0, +376,1,373,1535,1, +130,1540,1,143,1545, +1,387,3071,16,0, +376,1,1159,3072,16, +0,376,1,157,1568, +1,1413,3073,16,0, +376,1,1665,3074,16, +0,376,1,412,3075, +16,0,376,1,1377, +3076,16,0,376,1, +172,1595,1,1939,3077, +16,0,376,1,437, +3078,16,0,376,1, +188,1644,1,942,1616, +1,1195,3079,16,0, +376,1,1449,3080,16, +0,376,1,1701,3081, +16,0,376,1,447, +1637,1,205,3082,16, +0,376,1,827,3083, +16,0,376,1,223, +3084,16,0,376,1, +476,1669,1,477,1675, +1,1231,3085,16,0, +376,1,479,1685,1, +480,1690,1,1485,3086, +16,0,376,1,1737, +3087,16,0,376,1, +242,1703,1,478,1708, +1,1001,1713,1,1002, +1718,1,34,3088,19, +365,1,34,3089,5, +84,1,1011,1227,1, +1012,3090,16,0,363, +1,1013,1385,1,262, +1244,1,1267,3091,16, +0,363,1,515,3092, +16,0,363,1,1521, +3093,16,0,363,1, +525,1343,1,2792,3094, +16,0,363,1,283, +1299,1,2299,3095,16, +0,363,1,42,3096, +16,0,363,1,40, +1304,1,44,1310,1, +47,1311,1,1303,3097, +16,0,363,1,1555, +3098,16,0,363,1, +50,1328,1,48,1317, +1,49,1323,1,51, +1333,1,63,1349,1, +305,1338,1,66,1355, +1,67,1360,1,68, +1365,1,69,1370,1, +70,1375,1,73,3099, +16,0,363,1,74, +1380,1,328,1429,1, +1048,1470,1,82,3100, +16,0,363,1,1840, +3101,16,0,363,1, +1591,3102,16,0,363, +1,1341,3103,16,0, +363,1,1096,1439,1, +93,1445,1,352,1475, +1,107,3104,16,0, +363,1,1114,1469,1, +118,1481,1,1123,3105, +16,0,363,1,371, +1491,1,1628,3106,16, +0,363,1,375,1502, +1,1882,3107,16,0, +363,1,377,1507,1, +379,1512,1,380,1517, +1,883,3108,16,0, +363,1,373,1535,1, +130,1540,1,143,1545, +1,387,3109,16,0, +363,1,1159,3110,16, +0,363,1,157,1568, +1,1413,3111,16,0, +363,1,1665,3112,16, +0,363,1,412,3113, +16,0,363,1,1377, +3114,16,0,363,1, +172,1595,1,1939,3115, +16,0,363,1,437, +3116,16,0,363,1, +188,1644,1,942,1616, +1,1195,3117,16,0, +363,1,1449,3118,16, +0,363,1,1701,3119, +16,0,363,1,447, +1637,1,205,1649,1, +827,3120,16,0,363, +1,223,1659,1,476, +1669,1,477,1675,1, +1231,3121,16,0,363, +1,479,1685,1,480, +1690,1,1485,3122,16, +0,363,1,1737,3123, +16,0,363,1,242, +1703,1,478,1708,1, +1001,1713,1,1002,1718, +1,35,3124,19,351, +1,35,3125,5,84, +1,1011,1227,1,1012, +3126,16,0,349,1, +1013,1385,1,262,1244, +1,1267,3127,16,0, +349,1,515,3128,16, +0,349,1,1521,3129, +16,0,349,1,525, +1343,1,2792,3130,16, +0,349,1,283,1299, +1,2299,3131,16,0, +349,1,42,3132,16, +0,349,1,40,1304, +1,44,1310,1,47, +1311,1,1303,3133,16, +0,349,1,1555,3134, +16,0,349,1,50, +1328,1,48,1317,1, +49,1323,1,51,1333, +1,63,1349,1,305, +1338,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,73,3135,16, +0,349,1,74,1380, +1,328,1429,1,1048, +1470,1,82,3136,16, +0,349,1,1840,3137, +16,0,349,1,1591, +3138,16,0,349,1, +1341,3139,16,0,349, +1,1096,1439,1,93, +1445,1,352,1475,1, +107,3140,16,0,349, +1,1114,1469,1,118, +1481,1,1123,3141,16, +0,349,1,371,1491, +1,1628,3142,16,0, +349,1,375,1502,1, +1882,3143,16,0,349, +1,377,1507,1,379, +1512,1,380,1517,1, +883,3144,16,0,349, +1,373,1535,1,130, +1540,1,143,1545,1, +387,3145,16,0,349, +1,1159,3146,16,0, +349,1,157,1568,1, +1413,3147,16,0,349, +1,1665,3148,16,0, +349,1,412,3149,16, +0,349,1,1377,3150, +16,0,349,1,172, +1595,1,1939,3151,16, +0,349,1,437,3152, +16,0,349,1,188, +1644,1,942,1616,1, +1195,3153,16,0,349, +1,1449,3154,16,0, +349,1,1701,3155,16, +0,349,1,447,1637, +1,205,1649,1,827, +3156,16,0,349,1, +223,3157,16,0,349, +1,476,1669,1,477, +1675,1,1231,3158,16, +0,349,1,479,1685, +1,480,1690,1,1485, +3159,16,0,349,1, +1737,3160,16,0,349, +1,242,1703,1,478, +1708,1,1001,1713,1, +1002,1718,1,36,3161, +19,239,1,36,3162, +5,94,1,256,3163, +16,0,237,1,1261, +3164,16,0,237,1, +509,3165,16,0,237, +1,1515,3166,16,0, +237,1,2021,843,1, +1775,3167,16,0,237, +1,2029,850,1,2030, +856,1,2031,861,1, +2032,866,1,2033,871, +1,277,3168,16,0, +237,1,2035,877,1, +2037,882,1,2039,887, +1,32,3169,16,0, +237,1,2041,893,1, +2293,3170,16,0,237, +1,2043,899,1,2045, +904,1,41,3171,16, +0,237,1,1297,3172, +16,0,237,1,43, +3173,16,0,237,1, +1803,912,1,1804,3174, +16,0,237,1,299, +3175,16,0,237,1, +52,3176,16,0,237, +1,2318,3177,16,0, +237,1,2075,3178,16, +0,237,1,1574,924, +1,71,3179,16,0, +237,1,76,3180,16, +0,237,1,1834,3181, +16,0,237,1,2337, +3182,16,0,237,1, +79,3183,16,0,237, +1,1335,3184,16,0, +237,1,322,3185,16, +0,237,1,85,3186, +16,0,237,1,89, +3187,16,0,237,1, +346,3188,16,0,237, +1,2105,939,1,2106, +3189,16,0,237,1, +97,3190,16,0,237, +1,1860,946,1,2364, +952,1,102,3191,16, +0,237,1,112,3192, +16,0,237,1,1117, +3193,16,0,237,1, +2786,3194,16,0,237, +1,1873,961,1,1876, +3195,16,0,237,1, +124,3196,16,0,237, +1,2136,968,1,381, +3197,16,0,237,1, +525,3198,16,0,237, +1,137,3199,16,0, +237,1,1901,3200,16, +0,237,1,1153,3201, +16,0,237,1,151, +3202,16,0,237,1, +1407,3203,16,0,237, +1,1659,3204,16,0, +237,1,2413,3205,16, +0,237,1,406,3206, +16,0,237,1,1371, +3207,16,0,237,1, +166,3208,16,0,237, +1,1622,3209,16,0, +237,1,1931,986,1, +1933,3210,16,0,237, +1,431,3211,16,0, +237,1,1585,3212,16, +0,237,1,182,3213, +16,0,237,1,1189, +3214,16,0,237,1, +1443,3215,16,0,237, +1,1695,3216,16,0, +237,1,2198,3217,16, +0,237,1,447,3218, +16,0,237,1,2458, +1001,1,2459,1007,1, +1958,3219,16,0,237, +1,2462,1014,1,1657, +1019,1,2464,1024,1, +199,3220,16,0,237, +1,459,3221,16,0, +237,1,462,3222,16, +0,237,1,217,3223, +16,0,237,1,2227, +1033,1,1225,3224,16, +0,237,1,1479,3225, +16,0,237,1,1731, +3226,16,0,237,1, +1989,1041,1,1990,3227, +16,0,237,1,236, +3228,16,0,237,1, +1756,3229,16,0,237, +1,37,3230,19,260, +1,37,3231,5,94, +1,256,3232,16,0, +258,1,1261,3233,16, +0,258,1,509,3234, +16,0,258,1,1515, +3235,16,0,258,1, +2021,843,1,1775,3236, +16,0,258,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2033,871,1,277, +3237,16,0,258,1, +2035,877,1,2037,882, +1,2039,887,1,32, +3238,16,0,258,1, +2041,893,1,2293,3239, +16,0,258,1,2043, +899,1,2045,904,1, +41,3240,16,0,258, +1,1297,3241,16,0, +258,1,43,3242,16, +0,258,1,1803,912, +1,1804,3243,16,0, +258,1,299,3244,16, +0,258,1,52,3245, +16,0,258,1,2318, +3246,16,0,258,1, +2075,3247,16,0,258, +1,1574,924,1,71, +3248,16,0,258,1, +76,3249,16,0,258, +1,1834,3250,16,0, +258,1,2337,3251,16, +0,258,1,79,3252, +16,0,258,1,1335, +3253,16,0,258,1, +322,3254,16,0,258, +1,85,3255,16,0, +258,1,89,3256,16, +0,258,1,346,3257, +16,0,258,1,2105, +939,1,2106,3258,16, +0,258,1,97,3259, +16,0,258,1,1860, +946,1,2364,952,1, +102,3260,16,0,258, +1,112,3261,16,0, +258,1,1117,3262,16, +0,258,1,2786,3263, +16,0,258,1,1873, +961,1,1876,3264,16, +0,258,1,124,3265, +16,0,258,1,2136, +968,1,381,3266,16, +0,258,1,525,3267, +16,0,258,1,137, +3268,16,0,258,1, +1901,3269,16,0,258, +1,1153,3270,16,0, +258,1,151,3271,16, +0,258,1,1407,3272, +16,0,258,1,1659, +3273,16,0,258,1, +2413,3274,16,0,258, +1,406,3275,16,0, +258,1,1371,3276,16, +0,258,1,166,3277, +16,0,258,1,1622, +3278,16,0,258,1, +1931,986,1,1933,3279, +16,0,258,1,431, +3280,16,0,258,1, +1585,3281,16,0,258, +1,182,3282,16,0, +258,1,1189,3283,16, +0,258,1,1443,3284, +16,0,258,1,1695, +3285,16,0,258,1, +2198,3286,16,0,258, +1,447,3287,16,0, +258,1,2458,1001,1, +2459,1007,1,1958,3288, +16,0,258,1,2462, +1014,1,1657,1019,1, +2464,1024,1,199,3289, +16,0,258,1,459, +3290,16,0,258,1, +462,3291,16,0,258, +1,217,3292,16,0, +258,1,2227,1033,1, +1225,3293,16,0,258, +1,1479,3294,16,0, +258,1,1731,3295,16, +0,258,1,1989,1041, +1,1990,3296,16,0, +258,1,236,3297,16, +0,258,1,1756,3298, +16,0,258,1,38, +3299,19,257,1,38, +3300,5,84,1,1011, +1227,1,1012,3301,16, +0,255,1,1013,1385, +1,262,1244,1,1267, +3302,16,0,255,1, +515,3303,16,0,255, +1,1521,3304,16,0, +255,1,525,1343,1, +2792,3305,16,0,255, +1,283,1299,1,2299, +3306,16,0,255,1, +42,3307,16,0,255, +1,40,1304,1,44, +1310,1,47,1311,1, +1303,3308,16,0,255, +1,1555,3309,16,0, +255,1,50,1328,1, +48,1317,1,49,1323, +1,51,1333,1,63, +1349,1,305,1338,1, +66,1355,1,67,1360, +1,68,1365,1,69, +1370,1,70,1375,1, +73,3310,16,0,255, +1,74,1380,1,328, +1429,1,1048,1470,1, +82,3311,16,0,255, +1,1840,3312,16,0, +255,1,1591,3313,16, +0,255,1,1341,3314, +16,0,255,1,1096, +1439,1,93,1445,1, +352,1475,1,107,3315, +16,0,255,1,1114, +1469,1,118,1481,1, +1123,3316,16,0,255, +1,371,1491,1,1628, +3317,16,0,255,1, +375,1502,1,1882,3318, +16,0,255,1,377, +1507,1,379,1512,1, +380,1517,1,883,1523, +1,373,1535,1,130, +1540,1,143,1545,1, +387,3319,16,0,255, +1,1159,3320,16,0, +255,1,157,1568,1, +1413,3321,16,0,255, +1,1665,3322,16,0, +255,1,412,3323,16, +0,255,1,1377,3324, +16,0,255,1,172, +1595,1,1939,3325,16, +0,255,1,437,3326, +16,0,255,1,188, +1644,1,942,1616,1, +1195,3327,16,0,255, +1,1449,3328,16,0, +255,1,1701,3329,16, +0,255,1,447,1637, +1,205,1649,1,827, +1457,1,223,1659,1, +476,1669,1,477,1675, +1,1231,3330,16,0, +255,1,479,1685,1, +480,1690,1,1485,3331, +16,0,255,1,1737, +3332,16,0,255,1, +242,1703,1,478,1708, +1,1001,1713,1,1002, +1718,1,39,3333,19, +245,1,39,3334,5, +84,1,1011,1227,1, +1012,3335,16,0,243, +1,1013,1385,1,262, +1244,1,1267,3336,16, +0,243,1,515,3337, +16,0,243,1,1521, +3338,16,0,243,1, +525,1343,1,2792,3339, +16,0,243,1,283, +1299,1,2299,3340,16, +0,243,1,42,3341, +16,0,243,1,40, +1304,1,44,1310,1, +47,1311,1,1303,3342, +16,0,243,1,1555, +3343,16,0,243,1, +50,1328,1,48,1317, +1,49,1323,1,51, +1333,1,63,1349,1, +305,1338,1,66,1355, +1,67,1360,1,68, +1365,1,69,1370,1, +70,1375,1,73,3344, +16,0,243,1,74, +1380,1,328,1429,1, +1048,1470,1,82,3345, +16,0,243,1,1840, +3346,16,0,243,1, +1591,3347,16,0,243, +1,1341,3348,16,0, +243,1,1096,1439,1, +93,1445,1,352,1475, +1,107,3349,16,0, +243,1,1114,1469,1, +118,1481,1,1123,3350, +16,0,243,1,371, +1491,1,1628,3351,16, +0,243,1,375,1502, +1,1882,3352,16,0, +243,1,377,1507,1, +379,1512,1,380,1517, +1,883,1523,1,373, +1535,1,130,1540,1, +143,1545,1,387,3353, +16,0,243,1,1159, +3354,16,0,243,1, +157,1568,1,1413,3355, +16,0,243,1,1665, +3356,16,0,243,1, +412,3357,16,0,243, +1,1377,3358,16,0, +243,1,172,1595,1, +1939,3359,16,0,243, +1,437,3360,16,0, +243,1,188,1644,1, +942,1616,1,1195,3361, +16,0,243,1,1449, +3362,16,0,243,1, +1701,3363,16,0,243, +1,447,1637,1,205, +1649,1,827,1457,1, +223,1659,1,476,1669, +1,477,1675,1,1231, +3364,16,0,243,1, +479,1685,1,480,1690, +1,1485,3365,16,0, +243,1,1737,3366,16, +0,243,1,242,1703, +1,478,1708,1,1001, +1713,1,1002,1718,1, +40,3367,19,233,1, +40,3368,5,84,1, +1011,1227,1,1012,3369, +16,0,231,1,1013, +1385,1,262,1244,1, +1267,3370,16,0,231, +1,515,3371,16,0, +231,1,1521,3372,16, +0,231,1,525,1343, +1,2792,3373,16,0, +231,1,283,1299,1, +2299,3374,16,0,231, +1,42,3375,16,0, +231,1,40,1304,1, +44,1310,1,47,1311, +1,1303,3376,16,0, +231,1,1555,3377,16, +0,231,1,50,1328, +1,48,1317,1,49, +1323,1,51,1333,1, +63,1349,1,305,1338, +1,66,1355,1,67, +1360,1,68,1365,1, +69,1370,1,70,1375, +1,73,3378,16,0, +231,1,74,1380,1, +328,1429,1,1048,1470, +1,82,3379,16,0, +231,1,1840,3380,16, +0,231,1,1591,3381, +16,0,231,1,1341, +3382,16,0,231,1, +1096,1439,1,93,1445, +1,352,1475,1,107, +3383,16,0,231,1, +1114,1469,1,118,3384, +16,0,231,1,1123, +3385,16,0,231,1, +371,1491,1,1628,3386, +16,0,231,1,375, +1502,1,1882,3387,16, +0,231,1,377,1507, +1,379,1512,1,380, +1517,1,883,3388,16, +0,231,1,373,1535, +1,130,3389,16,0, +231,1,143,3390,16, +0,231,1,387,3391, +16,0,231,1,1159, +3392,16,0,231,1, +157,3393,16,0,231, +1,1413,3394,16,0, +231,1,1665,3395,16, +0,231,1,412,3396, +16,0,231,1,1377, +3397,16,0,231,1, +172,3398,16,0,231, +1,1939,3399,16,0, +231,1,437,3400,16, +0,231,1,188,3401, +16,0,231,1,942, +1616,1,1195,3402,16, +0,231,1,1449,3403, +16,0,231,1,1701, +3404,16,0,231,1, +447,1637,1,205,3405, +16,0,231,1,827, +3406,16,0,231,1, +223,3407,16,0,231, +1,476,1669,1,477, +1675,1,1231,3408,16, +0,231,1,479,1685, +1,480,1690,1,1485, +3409,16,0,231,1, +1737,3410,16,0,231, +1,242,3411,16,0, +231,1,478,1708,1, +1001,1713,1,1002,1718, +1,41,3412,19,188, +1,41,3413,5,84, +1,1011,1227,1,1012, +3414,16,0,186,1, +1013,1385,1,262,1244, +1,1267,3415,16,0, +186,1,515,3416,16, +0,186,1,1521,3417, +16,0,186,1,525, +1343,1,2792,3418,16, +0,186,1,283,1299, +1,2299,3419,16,0, +186,1,42,3420,16, +0,186,1,40,1304, +1,44,1310,1,47, +1311,1,1303,3421,16, +0,186,1,1555,3422, +16,0,186,1,50, +1328,1,48,1317,1, +49,1323,1,51,1333, +1,63,1349,1,305, +1338,1,66,1355,1, +67,1360,1,68,1365, +1,69,1370,1,70, +1375,1,73,3423,16, +0,186,1,74,1380, +1,328,1429,1,1048, +1470,1,82,3424,16, +0,186,1,1840,3425, +16,0,186,1,1591, +3426,16,0,186,1, +1341,3427,16,0,186, +1,1096,1439,1,93, +1445,1,352,1475,1, +107,3428,16,0,186, +1,1114,1469,1,118, +3429,16,0,186,1, +1123,3430,16,0,186, +1,371,1491,1,1628, +3431,16,0,186,1, +375,1502,1,1882,3432, +16,0,186,1,377, +1507,1,379,1512,1, +380,1517,1,883,3433, +16,0,186,1,373, +1535,1,130,3434,16, +0,186,1,143,3435, +16,0,186,1,387, +3436,16,0,186,1, +1159,3437,16,0,186, +1,157,3438,16,0, +186,1,1413,3439,16, +0,186,1,1665,3440, +16,0,186,1,412, +3441,16,0,186,1, +1377,3442,16,0,186, +1,172,3443,16,0, +186,1,1939,3444,16, +0,186,1,437,3445, +16,0,186,1,188, +3446,16,0,186,1, +942,1616,1,1195,3447, +16,0,186,1,1449, +3448,16,0,186,1, +1701,3449,16,0,186, +1,447,1637,1,205, +3450,16,0,186,1, +827,3451,16,0,186, +1,223,3452,16,0, +186,1,476,1669,1, +477,1675,1,1231,3453, +16,0,186,1,479, +1685,1,480,1690,1, +1485,3454,16,0,186, +1,1737,3455,16,0, +186,1,242,3456,16, +0,186,1,478,1708, +1,1001,1713,1,1002, +1718,1,42,3457,19, +440,1,42,3458,5, +38,1,1901,3459,16, +0,438,1,2075,3460, +16,0,438,1,1860, +946,1,1803,912,1, +1804,3461,16,0,438, +1,2413,3462,16,0, +438,1,2198,3463,16, +0,438,1,1873,961, +1,1657,1019,1,1989, +1041,1,1990,3464,16, +0,438,1,1775,3465, +16,0,438,1,32, +3466,16,0,438,1, +2105,939,1,2106,3467, +16,0,438,1,2364, +952,1,2227,1033,1, +2337,3468,16,0,438, +1,2021,843,1,2458, +1001,1,2459,1007,1, +2462,1014,1,2136,968, +1,2464,1024,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2033,871,1,2035, +877,1,2037,882,1, +2039,887,1,1931,986, +1,2041,893,1,2043, +899,1,2045,904,1, +1574,924,1,1958,3469, +16,0,438,1,43, +3470,19,532,1,43, +3471,5,25,1,2035, +877,1,2037,882,1, +2039,887,1,2041,893, +1,2227,1033,1,2043, +899,1,1657,1019,1, +1860,946,1,2136,968, +1,2021,843,1,2459, +1007,1,1574,924,1, +2105,3472,16,0,698, +1,1931,986,1,1873, +961,1,2031,861,1, +1803,912,1,1989,3473, +16,0,530,1,2464, +1024,1,2029,850,1, +2030,856,1,2364,952, +1,2032,866,1,2033, +871,1,2045,904,1, +44,3474,19,292,1, +44,3475,5,38,1, +1901,3476,16,0,290, +1,2075,3477,16,0, +290,1,1860,946,1, +1803,912,1,1804,3478, +16,0,290,1,2413, +3479,16,0,290,1, +2198,3480,16,0,290, +1,1873,961,1,1657, +1019,1,1989,1041,1, +1990,3481,16,0,290, +1,1775,3482,16,0, +290,1,32,3483,16, +0,290,1,2105,939, +1,2106,3484,16,0, +290,1,2364,952,1, +2227,1033,1,2337,3485, +16,0,290,1,2021, +843,1,2458,1001,1, +2459,1007,1,2462,1014, +1,2136,968,1,2464, +1024,1,2029,850,1, +2030,856,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2037,882,1,2039,887, +1,1931,986,1,2041, +893,1,2043,899,1, +2045,904,1,1574,924, +1,1958,3486,16,0, +290,1,45,3487,19, +325,1,45,3488,5, +39,1,1901,3489,16, +0,355,1,2075,3490, +16,0,355,1,1860, +946,1,1803,912,1, +1804,3491,16,0,355, +1,2413,3492,16,0, +355,1,2198,3493,16, +0,355,1,1873,961, +1,1657,1019,1,1989, +1041,1,1990,3494,16, +0,355,1,1775,3495, +16,0,355,1,32, +3496,16,0,355,1, +2105,939,1,2106,3497, +16,0,355,1,2364, +952,1,2227,1033,1, +2337,3498,16,0,355, +1,2021,843,1,2458, +1001,1,2459,1007,1, +2462,1014,1,2136,968, +1,2464,1024,1,2029, +850,1,2030,856,1, +2031,861,1,2032,866, +1,2033,871,1,2035, +877,1,2037,882,1, +2039,887,1,1931,986, +1,2041,893,1,2043, +899,1,2045,904,1, +1832,3499,16,0,323, +1,1574,924,1,1958, +3500,16,0,355,1, +46,3501,19,794,1, +46,3502,5,38,1, +1901,3503,16,0,792, +1,2075,3504,16,0, +792,1,1860,946,1, +1803,912,1,1804,3505, +16,0,792,1,2413, +3506,16,0,792,1, +2198,3507,16,0,792, +1,1873,961,1,1657, +1019,1,1989,1041,1, +1990,3508,16,0,792, +1,1775,3509,16,0, +792,1,32,3510,16, +0,792,1,2105,939, +1,2106,3511,16,0, +792,1,2364,952,1, +2227,1033,1,2337,3512, +16,0,792,1,2021, +843,1,2458,1001,1, +2459,1007,1,2462,1014, +1,2136,968,1,2464, +1024,1,2029,850,1, +2030,856,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2037,882,1,2039,887, +1,1931,986,1,2041, +893,1,2043,899,1, +2045,904,1,1574,924, +1,1958,3513,16,0, +792,1,47,3514,19, +283,1,47,3515,5, +19,1,0,3516,16, +0,281,1,2783,3517, +17,3518,15,3519,4, +50,37,0,71,0, +108,0,111,0,98, +0,97,0,108,0, +70,0,117,0,110, +0,99,0,116,0, +105,0,111,0,110, +0,68,0,101,0, +102,0,105,0,110, +0,105,0,116,0, +105,0,111,0,110, +0,1,-1,1,5, +3520,20,3521,4,52, +71,0,108,0,111, +0,98,0,97,0, +108,0,70,0,117, +0,110,0,99,0, +116,0,105,0,111, +0,110,0,68,0, 101,0,102,0,105, 0,110,0,105,0, 116,0,105,0,111, -0,110,0,115,0, -1,-1,1,5,3186, -20,3187,4,38,71, +0,110,0,95,0, +49,0,1,175,1, +3,1,6,1,5, +3522,22,1,9,1, +2464,1024,1,2767,822, +1,2768,810,1,2822, +3523,17,3524,15,3525, +4,52,37,0,71, 0,108,0,111,0, 98,0,97,0,108, -0,68,0,101,0, -102,0,105,0,110, -0,105,0,116,0, -105,0,111,0,110, -0,115,0,95,0, -50,0,1,145,1, -3,1,3,1,2, -3188,22,1,4,1, -2558,697,1,2716,3189, -17,3190,15,3185,1, --1,1,5,3191,20, -3192,4,38,71,0, -108,0,111,0,98, -0,97,0,108,0, -68,0,101,0,102, -0,105,0,110,0, -105,0,116,0,105, -0,111,0,110,0, -115,0,95,0,49, -0,1,144,1,3, -1,2,1,1,3193, -22,1,3,1,2022, -3194,16,0,567,1, -2459,882,1,2715,3195, -17,3196,15,3185,1, --1,1,5,3197,20, -3198,4,38,71,0, +0,86,0,97,0, +114,0,105,0,97, +0,98,0,108,0, +101,0,68,0,101, +0,99,0,108,0, +97,0,114,0,97, +0,116,0,105,0, +111,0,110,0,1, +-1,1,5,3526,20, +3527,4,54,71,0, 108,0,111,0,98, 0,97,0,108,0, -68,0,101,0,102, -0,105,0,110,0, -105,0,116,0,105, -0,111,0,110,0, -115,0,95,0,51, -0,1,146,1,3, -1,2,1,1,3199, -22,1,5,1,2464, -899,1,2466,3200,17, -3201,15,3202,4,50, -37,0,71,0,108, -0,111,0,98,0, -97,0,108,0,70, -0,117,0,110,0, -99,0,116,0,105, -0,111,0,110,0, -68,0,101,0,102, -0,105,0,110,0, -105,0,116,0,105, -0,111,0,110,0, -1,-1,1,5,3203, -20,3204,4,52,71, +86,0,97,0,114, +0,105,0,97,0, +98,0,108,0,101, +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,95,0, +49,0,1,173,1, +3,1,3,1,2, +3528,22,1,7,1, +2823,3529,16,0,281, +1,2022,3530,16,0, +673,1,2755,816,1, +2834,3531,16,0,281, +1,2459,1007,1,2466, +3532,17,3533,15,3519, +1,-1,1,5,3534, +20,3535,4,52,71, 0,108,0,111,0, 98,0,97,0,108, 0,70,0,117,0, @@ -8477,70 +9979,74 @@ public yyLSLSyntax 110,0,105,0,116, 0,105,0,111,0, 110,0,95,0,50, -0,1,151,1,3, -1,7,1,6,3205, -22,1,10,1,2640, -685,1,2713,3206,17, -3207,15,3185,1,-1, -1,5,3208,20,3209, -4,38,71,0,108, -0,111,0,98,0, -97,0,108,0,68, -0,101,0,102,0, -105,0,110,0,105, -0,116,0,105,0, -111,0,110,0,115, -0,95,0,52,0, -1,147,1,3,1, -3,1,2,3210,22, -1,6,1,2655,3211, -17,3212,15,3202,1, --1,1,5,3213,20, -3214,4,52,71,0, +0,1,176,1,3, +1,7,1,6,3536, +22,1,10,1,2764, +3537,16,0,281,1, +2841,3538,17,3539,15, +3540,4,36,37,0, +71,0,108,0,111, +0,98,0,97,0, +108,0,68,0,101, +0,102,0,105,0, +110,0,105,0,116, +0,105,0,111,0, +110,0,115,0,1, +-1,1,5,3541,20, +3542,4,38,71,0, 108,0,111,0,98, 0,97,0,108,0, -70,0,117,0,110, -0,99,0,116,0, -105,0,111,0,110, +68,0,101,0,102, +0,105,0,110,0, +105,0,116,0,105, +0,111,0,110,0, +115,0,95,0,52, +0,1,172,1,3, +1,3,1,2,3543, +22,1,6,1,2842, +3544,17,3545,15,3540, +1,-1,1,5,3546, +20,3547,4,38,71, +0,108,0,111,0, +98,0,97,0,108, 0,68,0,101,0, 102,0,105,0,110, 0,105,0,116,0, 105,0,111,0,110, -0,95,0,49,0, -1,150,1,3,1, -6,1,5,3215,22, -1,9,1,2694,3216, -17,3217,15,3218,4, -52,37,0,71,0, -108,0,111,0,98, -0,97,0,108,0, -86,0,97,0,114, -0,105,0,97,0, -98,0,108,0,101, -0,68,0,101,0, -99,0,108,0,97, -0,114,0,97,0, -116,0,105,0,111, -0,110,0,1,-1, -1,5,3219,20,3220, -4,54,71,0,108, -0,111,0,98,0, -97,0,108,0,86, -0,97,0,114,0, -105,0,97,0,98, -0,108,0,101,0, -68,0,101,0,99, -0,108,0,97,0, -114,0,97,0,116, +0,115,0,95,0, +50,0,1,170,1, +3,1,3,1,2, +3548,22,1,4,1, +2843,3549,17,3550,15, +3540,1,-1,1,5, +3551,20,3552,4,38, +71,0,108,0,111, +0,98,0,97,0, +108,0,68,0,101, +0,102,0,105,0, +110,0,105,0,116, 0,105,0,111,0, -110,0,95,0,49, -0,1,148,1,3, -1,3,1,2,3221, -22,1,7,1,2695, -3222,16,0,464,1, -2683,3223,17,3224,15, -3218,1,-1,1,5, -3225,20,3226,4,54, +110,0,115,0,95, +0,51,0,1,171, +1,3,1,2,1, +1,3553,22,1,5, +1,2844,3554,17,3555, +15,3540,1,-1,1, +5,3556,20,3557,4, +38,71,0,108,0, +111,0,98,0,97, +0,108,0,68,0, +101,0,102,0,105, +0,110,0,105,0, +116,0,105,0,111, +0,110,0,115,0, +95,0,49,0,1, +169,1,3,1,2, +1,1,3558,22,1, +3,1,2649,832,1, +2811,3559,17,3560,15, +3525,1,-1,1,5, +3561,20,3562,4,54, 71,0,108,0,111, 0,98,0,97,0, 108,0,86,0,97, @@ -8552,2203 +10058,2877 @@ public yyLSLSyntax 97,0,116,0,105, 0,111,0,110,0, 95,0,50,0,1, -149,1,3,1,5, -1,4,3227,22,1, -8,1,48,3228,19, -339,1,48,3229,5, -54,1,0,3230,16, -0,337,1,2075,3231, -16,0,495,1,1860, -821,1,1803,787,1, -1804,3232,16,0,495, -1,2413,3233,16,0, -495,1,2634,691,1, -1873,835,1,1657,894, -1,2639,707,1,2640, -685,1,1989,916,1, -1990,3234,16,0,495, -1,2459,882,1,1775, -3235,16,0,495,1, -32,3236,16,0,495, -1,2105,814,1,2106, -3237,16,0,495,1, -2466,3200,1,2655,3211, -1,2683,3223,1,2227, -908,1,2337,3238,16, -0,495,1,2558,697, -1,2694,3216,1,2695, -3239,16,0,337,1, -2021,718,1,2458,876, -1,1901,3240,16,0, -495,1,2462,889,1, -2136,842,1,2464,899, -1,2029,725,1,2030, -731,1,2031,736,1, -2032,741,1,2033,746, -1,2035,752,1,2364, -827,1,2715,3195,1, -2039,762,1,1931,861, -1,2041,768,1,2043, -774,1,2045,779,1, -2198,3241,16,0,495, -1,2706,3242,16,0, -337,1,2037,757,1, -2713,3206,1,2714,3183, -1,1574,799,1,2716, -3189,1,2636,3243,16, -0,337,1,1958,3244, -16,0,495,1,49, -3245,19,500,1,49, -3246,5,38,1,1901, -3247,16,0,498,1, -2075,3248,16,0,498, -1,1860,821,1,1803, -787,1,1804,3249,16, -0,498,1,2413,3250, -16,0,498,1,2198, -3251,16,0,498,1, -1873,835,1,1657,894, -1,1989,916,1,1990, -3252,16,0,498,1, -1775,3253,16,0,498, -1,32,3254,16,0, -498,1,2105,814,1, -2106,3255,16,0,498, -1,2364,827,1,2227, -908,1,2337,3256,16, -0,498,1,2021,718, -1,2458,876,1,2459, -882,1,2462,889,1, -2136,842,1,2464,899, -1,2029,725,1,2030, -731,1,2031,736,1, -2032,741,1,2033,746, -1,2035,752,1,2037, -757,1,2039,762,1, -1931,861,1,2041,768, -1,2043,774,1,2045, -779,1,1574,799,1, -1958,3257,16,0,498, -1,50,3258,19,614, -1,50,3259,5,38, -1,1901,3260,16,0, -612,1,2075,3261,16, -0,612,1,1860,821, -1,1803,787,1,1804, -3262,16,0,612,1, -2413,3263,16,0,612, -1,2198,3264,16,0, -612,1,1873,835,1, -1657,894,1,1989,916, -1,1990,3265,16,0, -612,1,1775,3266,16, -0,612,1,32,3267, -16,0,612,1,2105, -814,1,2106,3268,16, -0,612,1,2364,827, -1,2227,908,1,2337, -3269,16,0,612,1, -2021,718,1,2458,876, -1,2459,882,1,2462, -889,1,2136,842,1, -2464,899,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,2035,752, -1,2037,757,1,2039, -762,1,1931,861,1, -2041,768,1,2043,774, -1,2045,779,1,1574, -799,1,1958,3270,16, -0,612,1,51,3271, -19,127,1,51,3272, -5,53,1,0,3273, -16,0,125,1,2075, -3274,16,0,125,1, -1860,821,1,1803,787, -1,1804,3275,16,0, -125,1,10,3276,16, -0,125,1,2413,3277, -16,0,125,1,2198, -3278,16,0,125,1, -1873,835,1,21,3279, -16,0,125,1,1657, -894,1,2030,731,1, -2642,3280,16,0,125, -1,1989,916,1,1990, -3281,16,0,125,1, -2459,882,1,1775,3282, -16,0,125,1,32, -3283,16,0,125,1, -2105,814,1,2106,3284, -16,0,125,1,2655, -3211,1,2683,3223,1, -2227,908,1,2337,3285, -16,0,125,1,52, -3286,16,0,125,1, -2694,3216,1,2695,3287, -16,0,125,1,2021, -718,1,2458,876,1, -1901,3288,16,0,125, -1,2462,889,1,2136, -842,1,2464,899,1, -2029,725,1,2466,3200, -1,2031,736,1,2032, -741,1,2033,746,1, -2035,752,1,2364,827, -1,2715,3195,1,2039, -762,1,1931,861,1, -2041,768,1,2043,774, -1,2045,779,1,2037, -757,1,2713,3206,1, -2714,3183,1,1574,799, -1,2716,3189,1,1958, -3289,16,0,125,1, -2506,3290,16,0,125, -1,52,3291,19,124, -1,52,3292,5,53, -1,0,3293,16,0, -122,1,2075,3294,16, -0,122,1,1860,821, -1,1803,787,1,1804, -3295,16,0,122,1, -10,3296,16,0,122, -1,2413,3297,16,0, -122,1,2198,3298,16, -0,122,1,1873,835, -1,21,3299,16,0, -122,1,1657,894,1, -2030,731,1,2642,3300, -16,0,122,1,1989, -916,1,1990,3301,16, -0,122,1,2459,882, -1,1775,3302,16,0, -122,1,32,3303,16, -0,122,1,2105,814, -1,2106,3304,16,0, -122,1,2655,3211,1, -2683,3223,1,2227,908, -1,2337,3305,16,0, -122,1,52,3306,16, -0,122,1,2694,3216, -1,2695,3307,16,0, -122,1,2021,718,1, -2458,876,1,1901,3308, -16,0,122,1,2462, -889,1,2136,842,1, -2464,899,1,2029,725, -1,2466,3200,1,2031, -736,1,2032,741,1, -2033,746,1,2035,752, -1,2364,827,1,2715, -3195,1,2039,762,1, -1931,861,1,2041,768, -1,2043,774,1,2045, -779,1,2037,757,1, -2713,3206,1,2714,3183, -1,1574,799,1,2716, -3189,1,1958,3309,16, -0,122,1,2506,3310, +174,1,3,1,5, +1,4,3563,22,1, +8,1,48,3564,19, +385,1,48,3565,5, +54,1,0,3566,16, +0,383,1,2075,3567, +16,0,581,1,1860, +946,1,2842,3544,1, +1804,3568,16,0,581, +1,2844,3554,1,2413, +3569,16,0,581,1, +2198,3570,16,0,581, +1,1873,961,1,1657, +1019,1,2030,856,1, +1989,1041,1,1990,3571, +16,0,581,1,2755, +816,1,1775,3572,16, +0,581,1,32,3573, +16,0,581,1,2649, +832,1,2105,939,1, +2106,3574,16,0,581, +1,2764,3575,16,0, +383,1,2841,3538,1, +1574,924,1,2767,822, +1,2768,810,1,2227, +1033,1,2337,3576,16, +0,581,1,2783,3517, +1,1803,912,1,2458, +1001,1,1901,3577,16, +0,581,1,2462,1014, +1,2136,968,1,2464, +1024,1,2029,850,1, +2466,3532,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2364,952,1,2039,887, +1,1931,986,1,2041, +893,1,2021,843,1, +2043,899,1,2045,904, +1,2811,3559,1,2834, +3578,16,0,383,1, +2037,882,1,2822,3523, +1,2823,3579,16,0, +383,1,2843,3549,1, +1958,3580,16,0,581, +1,2459,1007,1,49, +3581,19,586,1,49, +3582,5,38,1,1901, +3583,16,0,584,1, +2075,3584,16,0,584, +1,1860,946,1,1803, +912,1,1804,3585,16, +0,584,1,2413,3586, +16,0,584,1,2198, +3587,16,0,584,1, +1873,961,1,1657,1019, +1,1989,1041,1,1990, +3588,16,0,584,1, +1775,3589,16,0,584, +1,32,3590,16,0, +584,1,2105,939,1, +2106,3591,16,0,584, +1,2364,952,1,2227, +1033,1,2337,3592,16, +0,584,1,2021,843, +1,2458,1001,1,2459, +1007,1,2462,1014,1, +2136,968,1,2464,1024, +1,2029,850,1,2030, +856,1,2031,861,1, +2032,866,1,2033,871, +1,2035,877,1,2037, +882,1,2039,887,1, +1931,986,1,2041,893, +1,2043,899,1,2045, +904,1,1574,924,1, +1958,3593,16,0,584, +1,50,3594,19,733, +1,50,3595,5,38, +1,1901,3596,16,0, +731,1,2075,3597,16, +0,731,1,1860,946, +1,1803,912,1,1804, +3598,16,0,731,1, +2413,3599,16,0,731, +1,2198,3600,16,0, +731,1,1873,961,1, +1657,1019,1,1989,1041, +1,1990,3601,16,0, +731,1,1775,3602,16, +0,731,1,32,3603, +16,0,731,1,2105, +939,1,2106,3604,16, +0,731,1,2364,952, +1,2227,1033,1,2337, +3605,16,0,731,1, +2021,843,1,2458,1001, +1,2459,1007,1,2462, +1014,1,2136,968,1, +2464,1024,1,2029,850, +1,2030,856,1,2031, +861,1,2032,866,1, +2033,871,1,2035,877, +1,2037,882,1,2039, +887,1,1931,986,1, +2041,893,1,2043,899, +1,2045,904,1,1574, +924,1,1958,3606,16, +0,731,1,51,3607, +19,127,1,51,3608, +5,58,1,0,3609, +16,0,125,1,2538, +3610,16,0,489,1, +2075,3611,16,0,125, +1,2841,3538,1,2515, +3612,16,0,489,1, +2843,3549,1,10,3613, +16,0,125,1,2413, +3614,16,0,125,1, +2523,3615,16,0,489, +1,2198,3616,16,0, +125,1,1873,961,1, +21,3617,16,0,125, +1,1657,1019,1,2029, +850,1,2030,856,1, +1989,1041,1,1990,3618, +16,0,125,1,2458, +1001,1,2459,1007,1, +1775,3619,16,0,125, +1,32,3620,16,0, +125,1,2105,939,1, +2106,3621,16,0,125, +1,2823,3622,16,0, +125,1,2770,3623,16, +0,125,1,2227,1033, +1,2337,3624,16,0, +125,1,52,3625,16, +0,125,1,2561,3626, +16,0,489,1,2783, +3517,1,1803,912,1, +1804,3627,16,0,125, +1,1901,3628,16,0, +125,1,2462,1014,1, +2136,968,1,2464,1024, +1,1860,946,1,2466, +3532,1,2031,861,1, +2032,866,1,2033,871, +1,2035,877,1,2364, +952,1,2039,887,1, +1931,986,1,2041,893, +1,2021,843,1,2043, +899,1,2045,904,1, +2511,3629,16,0,489, +1,2811,3559,1,2037, +882,1,2822,3523,1, +2842,3544,1,1574,924, +1,2844,3554,1,2582, +3630,16,0,125,1, +1958,3631,16,0,125, +1,52,3632,19,124, +1,52,3633,5,53, +1,0,3634,16,0, +122,1,2075,3635,16, +0,122,1,2841,3538, +1,2842,3544,1,1804, +3636,16,0,122,1, +10,3637,16,0,122, +1,2413,3638,16,0, +122,1,2198,3639,16, +0,122,1,1873,961, +1,21,3640,16,0, +122,1,1657,1019,1, +2029,850,1,2030,856, +1,1989,1041,1,1990, +3641,16,0,122,1, +2459,1007,1,1775,3642, +16,0,122,1,32, +3643,16,0,122,1, +2105,939,1,2106,3644, +16,0,122,1,1574, +924,1,2770,3645,16, +0,122,1,2227,1033, +1,2337,3646,16,0, +122,1,52,3647,16, +0,122,1,2783,3517, +1,1803,912,1,2458, +1001,1,1901,3648,16, +0,122,1,2462,1014, +1,2136,968,1,2464, +1024,1,1860,946,1, +2466,3532,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2364,952,1,2039,887, +1,1931,986,1,2041, +893,1,2021,843,1, +2043,899,1,2045,904, +1,2811,3559,1,2037, +882,1,2822,3523,1, +2823,3649,16,0,122, +1,2843,3549,1,2844, +3554,1,2582,3650,16, +0,122,1,1958,3651, 16,0,122,1,53, -3311,19,121,1,53, -3312,5,53,1,0, -3313,16,0,119,1, -2075,3314,16,0,119, -1,1860,821,1,1803, -787,1,1804,3315,16, -0,119,1,10,3316, +3652,19,121,1,53, +3653,5,53,1,0, +3654,16,0,119,1, +2075,3655,16,0,119, +1,2841,3538,1,2842, +3544,1,1804,3656,16, +0,119,1,10,3657, 16,0,119,1,2413, -3317,16,0,119,1, -2198,3318,16,0,119, -1,1873,835,1,21, -3319,16,0,119,1, -1657,894,1,2030,731, -1,2642,3320,16,0, -119,1,1989,916,1, -1990,3321,16,0,119, -1,2459,882,1,1775, -3322,16,0,119,1, -32,3323,16,0,119, -1,2105,814,1,2106, -3324,16,0,119,1, -2655,3211,1,2683,3223, -1,2227,908,1,2337, -3325,16,0,119,1, -52,3326,16,0,119, -1,2694,3216,1,2695, -3327,16,0,119,1, -2021,718,1,2458,876, -1,1901,3328,16,0, -119,1,2462,889,1, -2136,842,1,2464,899, -1,2029,725,1,2466, -3200,1,2031,736,1, -2032,741,1,2033,746, -1,2035,752,1,2364, -827,1,2715,3195,1, -2039,762,1,1931,861, -1,2041,768,1,2043, -774,1,2045,779,1, -2037,757,1,2713,3206, -1,2714,3183,1,1574, -799,1,2716,3189,1, -1958,3329,16,0,119, -1,2506,3330,16,0, -119,1,54,3331,19, -118,1,54,3332,5, -53,1,0,3333,16, -0,116,1,2075,3334, -16,0,116,1,1860, -821,1,1803,787,1, -1804,3335,16,0,116, -1,10,3336,16,0, -116,1,2413,3337,16, -0,116,1,2198,3338, +3658,16,0,119,1, +2198,3659,16,0,119, +1,1873,961,1,21, +3660,16,0,119,1, +1657,1019,1,2029,850, +1,2030,856,1,1989, +1041,1,1990,3661,16, +0,119,1,2459,1007, +1,1775,3662,16,0, +119,1,32,3663,16, +0,119,1,2105,939, +1,2106,3664,16,0, +119,1,1574,924,1, +2770,3665,16,0,119, +1,2227,1033,1,2337, +3666,16,0,119,1, +52,3667,16,0,119, +1,2783,3517,1,1803, +912,1,2458,1001,1, +1901,3668,16,0,119, +1,2462,1014,1,2136, +968,1,2464,1024,1, +1860,946,1,2466,3532, +1,2031,861,1,2032, +866,1,2033,871,1, +2035,877,1,2364,952, +1,2039,887,1,1931, +986,1,2041,893,1, +2021,843,1,2043,899, +1,2045,904,1,2811, +3559,1,2037,882,1, +2822,3523,1,2823,3669, +16,0,119,1,2843, +3549,1,2844,3554,1, +2582,3670,16,0,119, +1,1958,3671,16,0, +119,1,54,3672,19, +118,1,54,3673,5, +55,1,0,3674,16, +0,116,1,2075,3675, +16,0,116,1,2841, +3538,1,2842,3544,1, +1804,3676,16,0,116, +1,10,3677,16,0, +116,1,2413,3678,16, +0,116,1,2198,3679, 16,0,116,1,1873, -835,1,21,3339,16, -0,116,1,1657,894, -1,2030,731,1,2642, -3340,16,0,116,1, -1989,916,1,1990,3341, -16,0,116,1,2459, -882,1,1775,3342,16, -0,116,1,32,3343, -16,0,116,1,2105, -814,1,2106,3344,16, -0,116,1,2655,3211, -1,2683,3223,1,2227, -908,1,2337,3345,16, -0,116,1,52,3346, -16,0,116,1,2694, -3216,1,2695,3347,16, -0,116,1,2021,718, -1,2458,876,1,1901, -3348,16,0,116,1, -2462,889,1,2136,842, -1,2464,899,1,2029, -725,1,2466,3200,1, -2031,736,1,2032,741, -1,2033,746,1,2035, -752,1,2364,827,1, -2715,3195,1,2039,762, -1,1931,861,1,2041, -768,1,2043,774,1, -2045,779,1,2037,757, -1,2713,3206,1,2714, -3183,1,1574,799,1, -2716,3189,1,1958,3349, -16,0,116,1,2506, -3350,16,0,116,1, -55,3351,19,115,1, -55,3352,5,53,1, -0,3353,16,0,113, -1,2075,3354,16,0, -113,1,1860,821,1, -1803,787,1,1804,3355, -16,0,113,1,10, -3356,16,0,113,1, -2413,3357,16,0,113, -1,2198,3358,16,0, -113,1,1873,835,1, -21,3359,16,0,113, -1,1657,894,1,2030, -731,1,2642,3360,16, -0,113,1,1989,916, -1,1990,3361,16,0, -113,1,2459,882,1, -1775,3362,16,0,113, -1,32,3363,16,0, -113,1,2105,814,1, -2106,3364,16,0,113, -1,2655,3211,1,2683, -3223,1,2227,908,1, -2337,3365,16,0,113, -1,52,3366,16,0, -113,1,2694,3216,1, -2695,3367,16,0,113, -1,2021,718,1,2458, -876,1,1901,3368,16, -0,113,1,2462,889, -1,2136,842,1,2464, -899,1,2029,725,1, -2466,3200,1,2031,736, -1,2032,741,1,2033, -746,1,2035,752,1, -2364,827,1,2715,3195, -1,2039,762,1,1931, -861,1,2041,768,1, -2043,774,1,2045,779, -1,2037,757,1,2713, -3206,1,2714,3183,1, -1574,799,1,2716,3189, -1,1958,3369,16,0, -113,1,2506,3370,16, -0,113,1,56,3371, -19,112,1,56,3372, -5,53,1,0,3373, +961,1,21,3680,16, +0,116,1,1657,1019, +1,2029,850,1,2030, +856,1,1989,1041,1, +1990,3681,16,0,116, +1,2459,1007,1,1775, +3682,16,0,116,1, +32,3683,16,0,116, +1,2105,939,1,2106, +3684,16,0,116,1, +2021,843,1,1574,924, +1,2770,3685,16,0, +116,1,2227,1033,1, +2337,3686,16,0,116, +1,52,3687,16,0, +116,1,2783,3517,1, +1803,912,1,2458,1001, +1,1901,3688,16,0, +116,1,2569,3689,16, +0,483,1,2462,1014, +1,2136,968,1,2464, +1024,1,1860,946,1, +2466,3532,1,2031,861, +1,2032,866,1,2033, +871,1,2035,877,1, +2364,952,1,2039,887, +1,1931,986,1,2041, +893,1,2507,3690,16, +0,483,1,2043,899, +1,2045,904,1,2811, +3559,1,2037,882,1, +2822,3523,1,2823,3691, +16,0,116,1,2843, +3549,1,2844,3554,1, +2582,3692,16,0,116, +1,1958,3693,16,0, +116,1,55,3694,19, +115,1,55,3695,5, +56,1,0,3696,16, +0,113,1,2075,3697, +16,0,113,1,2841, +3538,1,2842,3544,1, +2843,3549,1,10,3698, +16,0,113,1,2413, +3699,16,0,113,1, +2198,3700,16,0,113, +1,2526,3701,16,0, +304,1,1873,961,1, +21,3702,16,0,113, +1,1657,1019,1,2530, +3703,16,0,304,1, +2030,856,1,1989,1041, +1,1990,3704,16,0, +113,1,2458,1001,1, +2459,1007,1,1775,3705, +16,0,113,1,32, +3706,16,0,113,1, +2105,939,1,2106,3707, +16,0,113,1,2770, +3708,16,0,113,1, +2553,3709,16,0,304, +1,2227,1033,1,2337, +3710,16,0,113,1, +52,3711,16,0,113, +1,2783,3517,1,1803, +912,1,1804,3712,16, +0,113,1,1901,3713, +16,0,113,1,2462, +1014,1,2136,968,1, +2464,1024,1,1860,946, +1,2466,3532,1,2031, +861,1,2032,866,1, +2033,871,1,2035,877, +1,2364,952,1,2039, +887,1,1931,986,1, +2041,893,1,2021,843, +1,2043,899,1,2045, +904,1,2811,3559,1, +2029,850,1,2037,882, +1,2822,3523,1,2823, +3714,16,0,113,1, +1574,924,1,2844,3554, +1,2582,3715,16,0, +113,1,1958,3716,16, +0,113,1,56,3717, +19,112,1,56,3718, +5,55,1,0,3719, 16,0,110,1,2075, -3374,16,0,110,1, -1860,821,1,1803,787, -1,1804,3375,16,0, -110,1,10,3376,16, -0,110,1,2413,3377, +3720,16,0,110,1, +2841,3538,1,2842,3544, +1,1804,3721,16,0, +110,1,10,3722,16, +0,110,1,2413,3723, 16,0,110,1,2198, -3378,16,0,110,1, -1873,835,1,21,3379, +3724,16,0,110,1, +1873,961,1,21,3725, 16,0,110,1,1657, -894,1,2030,731,1, -2642,3380,16,0,110, -1,1989,916,1,1990, -3381,16,0,110,1, -2459,882,1,1775,3382, -16,0,110,1,32, -3383,16,0,110,1, -2105,814,1,2106,3384, -16,0,110,1,2655, -3211,1,2683,3223,1, -2227,908,1,2337,3385, -16,0,110,1,52, -3386,16,0,110,1, -2694,3216,1,2695,3387, -16,0,110,1,2021, -718,1,2458,876,1, -1901,3388,16,0,110, -1,2462,889,1,2136, -842,1,2464,899,1, -2029,725,1,2466,3200, -1,2031,736,1,2032, -741,1,2033,746,1, -2035,752,1,2364,827, -1,2715,3195,1,2039, -762,1,1931,861,1, -2041,768,1,2043,774, -1,2045,779,1,2037, -757,1,2713,3206,1, -2714,3183,1,1574,799, -1,2716,3189,1,1958, -3389,16,0,110,1, -2506,3390,16,0,110, -1,57,3391,19,109, -1,57,3392,5,53, -1,0,3393,16,0, -107,1,2075,3394,16, -0,107,1,1860,821, -1,1803,787,1,1804, -3395,16,0,107,1, -10,3396,16,0,107, -1,2413,3397,16,0, -107,1,2198,3398,16, -0,107,1,1873,835, -1,21,3399,16,0, -107,1,1657,894,1, -2030,731,1,2642,3400, -16,0,107,1,1989, -916,1,1990,3401,16, -0,107,1,2459,882, -1,1775,3402,16,0, -107,1,32,3403,16, -0,107,1,2105,814, -1,2106,3404,16,0, -107,1,2655,3211,1, -2683,3223,1,2227,908, -1,2337,3405,16,0, -107,1,52,3406,16, -0,107,1,2694,3216, -1,2695,3407,16,0, -107,1,2021,718,1, -2458,876,1,1901,3408, -16,0,107,1,2462, -889,1,2136,842,1, -2464,899,1,2029,725, -1,2466,3200,1,2031, -736,1,2032,741,1, -2033,746,1,2035,752, -1,2364,827,1,2715, -3195,1,2039,762,1, -1931,861,1,2041,768, -1,2043,774,1,2045, -779,1,2037,757,1, -2713,3206,1,2714,3183, -1,1574,799,1,2716, -3189,1,1958,3409,16, -0,107,1,2506,3410, -16,0,107,1,58, -3411,19,429,1,58, -3412,5,9,1,2519, -1618,1,2557,1627,1, -2521,3413,16,0,427, -1,2559,1633,1,2597, -3414,16,0,427,1, -2561,3415,16,0,427, -1,2459,882,1,2464, -899,1,2470,3416,16, -0,427,1,59,3417, -19,426,1,59,3418, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3419,16,0,424,1, -2559,1633,1,2597,3420, -16,0,424,1,2561, -3421,16,0,424,1, -2459,882,1,2464,899, -1,2470,3422,16,0, -424,1,60,3423,19, -423,1,60,3424,5, -9,1,2519,1618,1, -2557,1627,1,2521,3425, -16,0,421,1,2559, -1633,1,2597,3426,16, -0,421,1,2561,3427, -16,0,421,1,2459, -882,1,2464,899,1, -2470,3428,16,0,421, -1,61,3429,19,420, -1,61,3430,5,9, -1,2519,1618,1,2557, -1627,1,2521,3431,16, -0,418,1,2559,1633, -1,2597,3432,16,0, -418,1,2561,3433,16, -0,418,1,2459,882, -1,2464,899,1,2470, -3434,16,0,418,1, -62,3435,19,417,1, -62,3436,5,9,1, -2519,1618,1,2557,1627, -1,2521,3437,16,0, -415,1,2559,1633,1, -2597,3438,16,0,415, -1,2561,3439,16,0, -415,1,2459,882,1, -2464,899,1,2470,3440, -16,0,415,1,63, -3441,19,414,1,63, -3442,5,9,1,2519, -1618,1,2557,1627,1, -2521,3443,16,0,412, -1,2559,1633,1,2597, -3444,16,0,412,1, -2561,3445,16,0,412, -1,2459,882,1,2464, -899,1,2470,3446,16, -0,412,1,64,3447, -19,653,1,64,3448, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3449,16,0,651,1, -2559,1633,1,2597,3450, -16,0,651,1,2561, -3451,16,0,651,1, -2459,882,1,2464,899, -1,2470,3452,16,0, -651,1,65,3453,19, -410,1,65,3454,5, -9,1,2519,1618,1, -2557,1627,1,2521,3455, -16,0,408,1,2559, -1633,1,2597,3456,16, -0,408,1,2561,3457, -16,0,408,1,2459, -882,1,2464,899,1, -2470,3458,16,0,408, -1,66,3459,19,493, -1,66,3460,5,9, -1,2519,1618,1,2557, -1627,1,2521,3461,16, -0,491,1,2559,1633, -1,2597,3462,16,0, -491,1,2561,3463,16, -0,491,1,2459,882, -1,2464,899,1,2470, -3464,16,0,491,1, -67,3465,19,406,1, -67,3466,5,9,1, -2519,1618,1,2557,1627, -1,2521,3467,16,0, -404,1,2559,1633,1, -2597,3468,16,0,404, -1,2561,3469,16,0, -404,1,2459,882,1, -2464,899,1,2470,3470, -16,0,404,1,68, -3471,19,403,1,68, -3472,5,9,1,2519, -1618,1,2557,1627,1, -2521,3473,16,0,401, -1,2559,1633,1,2597, -3474,16,0,401,1, -2561,3475,16,0,401, -1,2459,882,1,2464, -899,1,2470,3476,16, -0,401,1,69,3477, -19,486,1,69,3478, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3479,16,0,484,1, -2559,1633,1,2597,3480, -16,0,484,1,2561, -3481,16,0,484,1, -2459,882,1,2464,899, -1,2470,3482,16,0, -484,1,70,3483,19, -399,1,70,3484,5, -9,1,2519,1618,1, -2557,1627,1,2521,3485, -16,0,397,1,2559, -1633,1,2597,3486,16, -0,397,1,2561,3487, -16,0,397,1,2459, -882,1,2464,899,1, -2470,3488,16,0,397, -1,71,3489,19,483, -1,71,3490,5,9, -1,2519,1618,1,2557, -1627,1,2521,3491,16, -0,481,1,2559,1633, -1,2597,3492,16,0, -481,1,2561,3493,16, -0,481,1,2459,882, -1,2464,899,1,2470, -3494,16,0,481,1, -72,3495,19,480,1, -72,3496,5,9,1, -2519,1618,1,2557,1627, -1,2521,3497,16,0, -478,1,2559,1633,1, -2597,3498,16,0,478, -1,2561,3499,16,0, -478,1,2459,882,1, -2464,899,1,2470,3500, -16,0,478,1,73, -3501,19,477,1,73, -3502,5,9,1,2519, -1618,1,2557,1627,1, -2521,3503,16,0,475, -1,2559,1633,1,2597, -3504,16,0,475,1, -2561,3505,16,0,475, -1,2459,882,1,2464, -899,1,2470,3506,16, -0,475,1,74,3507, -19,474,1,74,3508, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3509,16,0,472,1, -2559,1633,1,2597,3510, -16,0,472,1,2561, -3511,16,0,472,1, -2459,882,1,2464,899, -1,2470,3512,16,0, -472,1,75,3513,19, -390,1,75,3514,5, -9,1,2519,1618,1, -2557,1627,1,2521,3515, -16,0,388,1,2559, -1633,1,2597,3516,16, -0,388,1,2561,3517, -16,0,388,1,2459, -882,1,2464,899,1, -2470,3518,16,0,388, -1,76,3519,19,387, -1,76,3520,5,9, -1,2519,1618,1,2557, -1627,1,2521,3521,16, -0,385,1,2559,1633, -1,2597,3522,16,0, -385,1,2561,3523,16, -0,385,1,2459,882, -1,2464,899,1,2470, -3524,16,0,385,1, -77,3525,19,471,1, -77,3526,5,9,1, -2519,1618,1,2557,1627, -1,2521,3527,16,0, -469,1,2559,1633,1, -2597,3528,16,0,469, -1,2561,3529,16,0, -469,1,2459,882,1, -2464,899,1,2470,3530, -16,0,469,1,78, -3531,19,566,1,78, -3532,5,9,1,2519, -1618,1,2557,1627,1, -2521,3533,16,0,564, -1,2559,1633,1,2597, -3534,16,0,564,1, -2561,3535,16,0,564, -1,2459,882,1,2464, -899,1,2470,3536,16, -0,564,1,79,3537, -19,380,1,79,3538, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3539,16,0,378,1, -2559,1633,1,2597,3540, -16,0,378,1,2561, -3541,16,0,378,1, -2459,882,1,2464,899, -1,2470,3542,16,0, -378,1,80,3543,19, -377,1,80,3544,5, -9,1,2519,1618,1, -2557,1627,1,2521,3545, -16,0,375,1,2559, -1633,1,2597,3546,16, -0,375,1,2561,3547, -16,0,375,1,2459, -882,1,2464,899,1, -2470,3548,16,0,375, -1,81,3549,19,374, -1,81,3550,5,9, -1,2519,1618,1,2557, -1627,1,2521,3551,16, -0,372,1,2559,1633, -1,2597,3552,16,0, -372,1,2561,3553,16, -0,372,1,2459,882, -1,2464,899,1,2470, -3554,16,0,372,1, -82,3555,19,371,1, -82,3556,5,9,1, -2519,1618,1,2557,1627, -1,2521,3557,16,0, -369,1,2559,1633,1, -2597,3558,16,0,369, -1,2561,3559,16,0, -369,1,2459,882,1, -2464,899,1,2470,3560, -16,0,369,1,83, -3561,19,368,1,83, -3562,5,9,1,2519, -1618,1,2557,1627,1, -2521,3563,16,0,366, -1,2559,1633,1,2597, -3564,16,0,366,1, -2561,3565,16,0,366, -1,2459,882,1,2464, -899,1,2470,3566,16, -0,366,1,84,3567, -19,365,1,84,3568, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3569,16,0,363,1, -2559,1633,1,2597,3570, -16,0,363,1,2561, -3571,16,0,363,1, -2459,882,1,2464,899, -1,2470,3572,16,0, -363,1,85,3573,19, -362,1,85,3574,5, -9,1,2519,1618,1, -2557,1627,1,2521,3575, -16,0,360,1,2559, -1633,1,2597,3576,16, -0,360,1,2561,3577, -16,0,360,1,2459, -882,1,2464,899,1, -2470,3578,16,0,360, -1,86,3579,19,359, -1,86,3580,5,9, -1,2519,1618,1,2557, -1627,1,2521,3581,16, -0,357,1,2559,1633, -1,2597,3582,16,0, -357,1,2561,3583,16, -0,357,1,2459,882, -1,2464,899,1,2470, -3584,16,0,357,1, -87,3585,19,356,1, -87,3586,5,9,1, -2519,1618,1,2557,1627, -1,2521,3587,16,0, -354,1,2559,1633,1, -2597,3588,16,0,354, -1,2561,3589,16,0, -354,1,2459,882,1, -2464,899,1,2470,3590, -16,0,354,1,88, -3591,19,353,1,88, -3592,5,9,1,2519, -1618,1,2557,1627,1, -2521,3593,16,0,351, -1,2559,1633,1,2597, -3594,16,0,351,1, -2561,3595,16,0,351, -1,2459,882,1,2464, -899,1,2470,3596,16, -0,351,1,89,3597, -19,347,1,89,3598, -5,9,1,2519,1618, -1,2557,1627,1,2521, -3599,16,0,345,1, -2559,1633,1,2597,3600, -16,0,345,1,2561, -3601,16,0,345,1, -2459,882,1,2464,899, -1,2470,3602,16,0, -345,1,90,3603,19, -350,1,90,3604,5, -9,1,2519,1618,1, -2557,1627,1,2521,3605, -16,0,348,1,2559, -1633,1,2597,3606,16, -0,348,1,2561,3607, -16,0,348,1,2459, -882,1,2464,899,1, -2470,3608,16,0,348, -1,91,3609,19,344, -1,91,3610,5,9, -1,2519,1618,1,2557, -1627,1,2521,3611,16, -0,342,1,2559,1633, -1,2597,3612,16,0, -342,1,2561,3613,16, -0,342,1,2459,882, -1,2464,899,1,2470, -3614,16,0,342,1, -92,3615,19,133,1, -92,3616,5,125,1, -0,3617,16,0,563, -1,1,1951,1,2, -1957,1,3,1962,1, -4,1967,1,5,1972, -1,6,1977,1,7, -1982,1,8,3618,16, -0,131,1,1515,3619, -16,0,165,1,2021, -718,1,2022,3620,16, -0,497,1,256,3621, -16,0,173,1,2025, -3622,16,0,501,1, -18,3623,16,0,138, -1,2027,3624,16,0, -505,1,2695,3625,16, -0,563,1,2029,725, -1,2030,731,1,2031, -736,1,2032,741,1, -2033,746,1,277,3626, -16,0,173,1,2035, -752,1,2037,757,1, -2039,762,1,32,3627, -16,0,165,1,2041, -768,1,2293,3628,16, -0,173,1,2043,774, -1,2045,779,1,2713, -3206,1,2715,3195,1, -41,3629,16,0,173, -1,1297,3630,16,0, -165,1,43,3631,16, -0,173,1,46,3632, -16,0,178,1,1804, -3633,16,0,165,1, -299,3634,16,0,173, -1,52,3635,16,0, -165,1,509,3636,16, -0,173,1,2318,3637, -16,0,165,1,62, -3638,16,0,195,1, -65,3639,16,0,197, -1,2075,3640,16,0, -165,1,1574,799,1, -71,3641,16,0,173, -1,1775,3642,16,0, -165,1,76,3643,16, -0,173,1,1834,3644, -16,0,165,1,2337, -3645,16,0,165,1, -79,3646,16,0,173, -1,1335,3647,16,0, -165,1,322,3648,16, -0,173,1,85,3649, -16,0,173,1,1261, -3650,16,0,165,1, -89,3651,16,0,173, -1,346,3652,16,0, -173,1,97,3653,16, -0,173,1,2106,3654, -16,0,165,1,102, -3655,16,0,173,1, -1860,821,1,1803,787, -1,2364,827,1,1113, -3656,16,0,158,1, -112,3657,16,0,173, -1,1117,3658,16,0, -165,1,1873,835,1, -1876,3659,16,0,165, -1,372,3660,16,0, -535,1,374,3661,16, -0,537,1,124,3662, -16,0,173,1,376, -3663,16,0,539,1, -378,3664,16,0,541, -1,2136,842,1,381, -3665,16,0,173,1, -525,3666,16,0,173, -1,137,3667,16,0, -173,1,1901,3668,16, -0,165,1,2655,3211, -1,2658,3669,16,0, -173,1,1153,3670,16, -0,165,1,151,3671, -16,0,173,1,1407, -3672,16,0,165,1, -1659,3673,16,0,165, -1,2413,3674,16,0, -165,1,406,3675,16, -0,173,1,1371,3676, -16,0,165,1,2105, -814,1,1657,894,1, -166,3677,16,0,173, -1,1622,3678,16,0, -173,1,2683,3223,1, -1931,861,1,1933,3679, -16,0,165,1,431, -3680,16,0,173,1, -1585,3681,16,0,173, -1,182,3682,16,0, -173,1,2694,3216,1, -1189,3683,16,0,165, -1,1443,3684,16,0, -165,1,1695,3685,16, -0,165,1,2198,3686, -16,0,165,1,447, -3687,16,0,173,1, -2458,876,1,2459,882, -1,1958,3688,16,0, -165,1,2462,889,1, -2714,3183,1,2464,899, -1,2716,3189,1,2466, -3200,1,459,3689,16, -0,173,1,2468,3690, -16,0,340,1,462, -3691,16,0,173,1, -199,3692,16,0,173, -1,217,3693,16,0, -173,1,2227,908,1, -1225,3694,16,0,165, -1,1479,3695,16,0, -165,1,1731,3696,16, -0,173,1,1989,916, -1,1990,3697,16,0, -165,1,236,3698,16, -0,173,1,1756,3699, -16,0,165,1,93, -3700,19,626,1,93, -3701,5,95,1,256, -3702,16,0,624,1, -1261,3703,16,0,624, -1,509,3704,16,0, -624,1,1515,3705,16, -0,624,1,2021,718, -1,1775,3706,16,0, -624,1,2029,725,1, -2030,731,1,2031,736, -1,2032,741,1,2033, -746,1,277,3707,16, -0,624,1,2035,752, -1,2037,757,1,2039, -762,1,32,3708,16, -0,624,1,2041,768, -1,2293,3709,16,0, -624,1,2043,774,1, -2045,779,1,41,3710, -16,0,624,1,1297, -3711,16,0,624,1, -43,3712,16,0,624, -1,1803,787,1,1804, -3713,16,0,624,1, -299,3714,16,0,624, -1,52,3715,16,0, -624,1,2318,3716,16, -0,624,1,62,3717, -16,0,624,1,2075, -3718,16,0,624,1, -1574,799,1,71,3719, -16,0,624,1,76, -3720,16,0,624,1, -1834,3721,16,0,624, -1,2337,3722,16,0, -624,1,79,3723,16, -0,624,1,1335,3724, -16,0,624,1,322, -3725,16,0,624,1, -85,3726,16,0,624, -1,89,3727,16,0, -624,1,346,3728,16, -0,624,1,2105,814, -1,2106,3729,16,0, -624,1,97,3730,16, -0,624,1,1860,821, -1,2364,827,1,102, -3731,16,0,624,1, -112,3732,16,0,624, -1,1117,3733,16,0, -624,1,1873,835,1, -1876,3734,16,0,624, -1,124,3735,16,0, -624,1,2136,842,1, -381,3736,16,0,624, -1,525,3737,16,0, -624,1,137,3738,16, -0,624,1,1901,3739, -16,0,624,1,2658, -3740,16,0,624,1, -1153,3741,16,0,624, -1,151,3742,16,0, -624,1,1407,3743,16, -0,624,1,1659,3744, -16,0,624,1,2413, -3745,16,0,624,1, -406,3746,16,0,624, -1,1371,3747,16,0, -624,1,166,3748,16, -0,624,1,1622,3749, -16,0,624,1,1931, -861,1,1933,3750,16, -0,624,1,431,3751, -16,0,624,1,1585, -3752,16,0,624,1, -182,3753,16,0,624, -1,1189,3754,16,0, -624,1,1443,3755,16, -0,624,1,1695,3756, -16,0,624,1,2198, -3757,16,0,624,1, -447,3758,16,0,624, -1,2458,876,1,2459, -882,1,1958,3759,16, -0,624,1,2462,889, -1,1657,894,1,2464, -899,1,199,3760,16, -0,624,1,459,3761, -16,0,624,1,462, -3762,16,0,624,1, -217,3763,16,0,624, -1,2227,908,1,1225, -3764,16,0,624,1, -1479,3765,16,0,624, -1,1731,3766,16,0, -624,1,1989,916,1, -1990,3767,16,0,624, -1,236,3768,16,0, -624,1,1756,3769,16, -0,624,1,94,3770, -19,623,1,94,3771, -5,95,1,256,3772, -16,0,621,1,1261, -3773,16,0,621,1, -509,3774,16,0,621, -1,1515,3775,16,0, -621,1,2021,718,1, -1775,3776,16,0,621, -1,2029,725,1,2030, -731,1,2031,736,1, -2032,741,1,2033,746, -1,277,3777,16,0, -621,1,2035,752,1, -2037,757,1,2039,762, -1,32,3778,16,0, -621,1,2041,768,1, -2293,3779,16,0,621, -1,2043,774,1,2045, -779,1,41,3780,16, -0,621,1,1297,3781, -16,0,621,1,43, -3782,16,0,621,1, -1803,787,1,1804,3783, -16,0,621,1,299, -3784,16,0,621,1, -52,3785,16,0,621, -1,2318,3786,16,0, -621,1,62,3787,16, -0,621,1,2075,3788, -16,0,621,1,1574, -799,1,71,3789,16, -0,621,1,76,3790, -16,0,621,1,1834, -3791,16,0,621,1, -2337,3792,16,0,621, -1,79,3793,16,0, -621,1,1335,3794,16, -0,621,1,322,3795, -16,0,621,1,85, -3796,16,0,621,1, -89,3797,16,0,621, -1,346,3798,16,0, -621,1,2105,814,1, -2106,3799,16,0,621, -1,97,3800,16,0, -621,1,1860,821,1, -2364,827,1,102,3801, -16,0,621,1,112, -3802,16,0,621,1, -1117,3803,16,0,621, -1,1873,835,1,1876, -3804,16,0,621,1, -124,3805,16,0,621, -1,2136,842,1,381, -3806,16,0,621,1, -525,3807,16,0,621, -1,137,3808,16,0, -621,1,1901,3809,16, -0,621,1,2658,3810, -16,0,621,1,1153, -3811,16,0,621,1, -151,3812,16,0,621, -1,1407,3813,16,0, -621,1,1659,3814,16, -0,621,1,2413,3815, -16,0,621,1,406, -3816,16,0,621,1, -1371,3817,16,0,621, -1,166,3818,16,0, -621,1,1622,3819,16, -0,621,1,1931,861, -1,1933,3820,16,0, -621,1,431,3821,16, -0,621,1,1585,3822, -16,0,621,1,182, -3823,16,0,621,1, -1189,3824,16,0,621, -1,1443,3825,16,0, -621,1,1695,3826,16, -0,621,1,2198,3827, -16,0,621,1,447, -3828,16,0,621,1, -2458,876,1,2459,882, -1,1958,3829,16,0, -621,1,2462,889,1, -1657,894,1,2464,899, -1,199,3830,16,0, -621,1,459,3831,16, -0,621,1,462,3832, -16,0,621,1,217, -3833,16,0,621,1, -2227,908,1,1225,3834, -16,0,621,1,1479, -3835,16,0,621,1, -1731,3836,16,0,621, -1,1989,916,1,1990, -3837,16,0,621,1, -236,3838,16,0,621, -1,1756,3839,16,0, -621,1,95,3840,19, -620,1,95,3841,5, -95,1,256,3842,16, -0,618,1,1261,3843, -16,0,618,1,509, -3844,16,0,618,1, -1515,3845,16,0,618, -1,2021,718,1,1775, -3846,16,0,618,1, -2029,725,1,2030,731, -1,2031,736,1,2032, -741,1,2033,746,1, -277,3847,16,0,618, -1,2035,752,1,2037, -757,1,2039,762,1, -32,3848,16,0,618, -1,2041,768,1,2293, -3849,16,0,618,1, -2043,774,1,2045,779, -1,41,3850,16,0, -618,1,1297,3851,16, -0,618,1,43,3852, -16,0,618,1,1803, -787,1,1804,3853,16, -0,618,1,299,3854, -16,0,618,1,52, -3855,16,0,618,1, -2318,3856,16,0,618, -1,62,3857,16,0, -618,1,2075,3858,16, -0,618,1,1574,799, -1,71,3859,16,0, -618,1,76,3860,16, -0,618,1,1834,3861, -16,0,618,1,2337, -3862,16,0,618,1, -79,3863,16,0,618, -1,1335,3864,16,0, -618,1,322,3865,16, -0,618,1,85,3866, -16,0,618,1,89, -3867,16,0,618,1, -346,3868,16,0,618, -1,2105,814,1,2106, -3869,16,0,618,1, -97,3870,16,0,618, -1,1860,821,1,2364, -827,1,102,3871,16, -0,618,1,112,3872, -16,0,618,1,1117, -3873,16,0,618,1, -1873,835,1,1876,3874, -16,0,618,1,124, -3875,16,0,618,1, -2136,842,1,381,3876, -16,0,618,1,525, -3877,16,0,618,1, -137,3878,16,0,618, -1,1901,3879,16,0, -618,1,2658,3880,16, -0,618,1,1153,3881, -16,0,618,1,151, -3882,16,0,618,1, -1407,3883,16,0,618, -1,1659,3884,16,0, -618,1,2413,3885,16, -0,618,1,406,3886, -16,0,618,1,1371, -3887,16,0,618,1, -166,3888,16,0,618, -1,1622,3889,16,0, -618,1,1931,861,1, -1933,3890,16,0,618, -1,431,3891,16,0, -618,1,1585,3892,16, -0,618,1,182,3893, -16,0,618,1,1189, -3894,16,0,618,1, -1443,3895,16,0,618, -1,1695,3896,16,0, -618,1,2198,3897,16, -0,618,1,447,3898, -16,0,618,1,2458, -876,1,2459,882,1, -1958,3899,16,0,618, -1,2462,889,1,1657, -894,1,2464,899,1, -199,3900,16,0,618, -1,459,3901,16,0, -618,1,462,3902,16, -0,618,1,217,3903, -16,0,618,1,2227, -908,1,1225,3904,16, -0,618,1,1479,3905, -16,0,618,1,1731, -3906,16,0,618,1, -1989,916,1,1990,3907, -16,0,618,1,236, -3908,16,0,618,1, -1756,3909,16,0,618, -1,96,3910,19,103, -1,96,3911,5,1, -1,0,3912,16,0, -104,1,97,3913,19, -611,1,97,3914,5, -1,1,0,3915,16, -0,609,1,98,3916, -19,636,1,98,3917, -5,2,1,0,3918, -16,0,638,1,2695, -3919,16,0,634,1, -99,3920,19,633,1, -99,3921,5,2,1, -0,3922,16,0,637, -1,2695,3923,16,0, -631,1,100,3924,19, -296,1,100,3925,5, -2,1,0,3926,16, -0,557,1,2695,3927, -16,0,294,1,101, -3928,19,561,1,101, -3929,5,4,1,0, -3930,16,0,641,1, -2695,3931,16,0,641, -1,2706,3932,16,0, -559,1,2636,3933,16, -0,559,1,102,3934, -19,591,1,102,3935, -5,2,1,2470,3936, -16,0,664,1,2561, -3937,16,0,589,1, -103,3938,19,463,1, -103,3939,5,4,1, -2597,3940,16,0,558, -1,2521,3941,16,0, -558,1,2470,3942,16, -0,461,1,2561,3943, -16,0,461,1,104, -3944,19,141,1,104, -3945,5,3,1,2642, -3946,16,0,569,1, -2506,3947,16,0,317, -1,10,3948,16,0, -139,1,105,3949,19, -151,1,105,3950,5, -17,1,0,3951,16, -0,254,1,2075,3952, -16,0,648,1,2337, -3953,16,0,648,1, -2413,3954,16,0,648, -1,10,3955,16,0, -336,1,2198,3956,16, -0,648,1,1901,3957, -16,0,648,1,2642, -3958,16,0,336,1, -21,3959,16,0,149, -1,2106,3960,16,0, -648,1,2506,3961,16, -0,336,1,1804,3962, -16,0,648,1,1990, -3963,16,0,648,1, -2695,3964,16,0,254, -1,32,3965,16,0, -648,1,1958,3966,16, -0,648,1,1775,3967, -16,0,648,1,106, -3968,19,130,1,106, -3969,5,18,1,0, -3970,16,0,128,1, -2642,3971,16,0,137, -1,2075,3972,16,0, -137,1,2337,3973,16, -0,137,1,2413,3974, -16,0,137,1,10, -3975,16,0,137,1, -2198,3976,16,0,137, -1,1901,3977,16,0, -137,1,52,3978,16, -0,193,1,21,3979, -16,0,137,1,2106, -3980,16,0,137,1, -2506,3981,16,0,137, -1,1804,3982,16,0, -137,1,1990,3983,16, -0,137,1,2695,3984, -16,0,128,1,32, -3985,16,0,137,1, -1958,3986,16,0,137, -1,1775,3987,16,0, -137,1,107,3988,19, -658,1,107,3989,5, -4,1,2597,3990,16, -0,656,1,2521,3991, -16,0,656,1,2470, -3992,16,0,656,1, -2561,3993,16,0,656, -1,108,3994,19,335, -1,108,3995,5,14, -1,2517,3996,16,0, -437,1,2075,3997,16, -0,506,1,2337,3998, -16,0,506,1,2413, -3999,16,0,506,1, -1901,4000,16,0,506, -1,2198,4001,16,0, -506,1,2106,4002,16, -0,506,1,2653,4003, -16,0,571,1,1804, -4004,16,0,506,1, -1990,4005,16,0,506, -1,31,4006,16,0, -333,1,32,4007,16, -0,506,1,1958,4008, -16,0,506,1,1775, -4009,16,0,506,1, -109,4010,19,302,1, -109,4011,5,1,1, -32,4012,16,0,300, -1,110,4013,19,261, -1,110,4014,5,11, -1,2075,4015,16,0, -577,1,2337,4016,16, -0,265,1,2413,4017, -16,0,445,1,1901, -4018,16,0,391,1, -2198,4019,16,0,319, -1,2106,4020,16,0, -607,1,1804,4021,16, -0,284,1,1990,4022, -16,0,494,1,32, -4023,16,0,329,1, -1958,4024,16,0,450, -1,1775,4025,16,0, -259,1,111,4026,19, -583,1,111,4027,5, -11,1,2075,4028,16, -0,581,1,2337,4029, -16,0,581,1,2413, -4030,16,0,581,1, -1901,4031,16,0,581, -1,2198,4032,16,0, -581,1,2106,4033,16, -0,581,1,1804,4034, -16,0,581,1,1990, -4035,16,0,581,1, -32,4036,16,0,581, -1,1958,4037,16,0, -581,1,1775,4038,16, -0,581,1,112,4039, -19,645,1,112,4040, -5,11,1,2075,4041, -16,0,643,1,2337, -4042,16,0,643,1, -2413,4043,16,0,643, -1,1901,4044,16,0, -643,1,2198,4045,16, -0,643,1,2106,4046, -16,0,643,1,1804, -4047,16,0,643,1, -1990,4048,16,0,643, -1,32,4049,16,0, -643,1,1958,4050,16, -0,643,1,1775,4051, -16,0,643,1,113, -4052,19,161,1,113, -4053,5,31,1,1901, -4054,16,0,647,1, -1479,4055,16,0,551, -1,2075,4056,16,0, -647,1,1695,4057,16, -0,189,1,1756,4058, -16,0,188,1,2413, -4059,16,0,647,1, -2198,4060,16,0,647, -1,1876,4061,16,0, -661,1,1659,4062,16, -0,188,1,1443,4063, -16,0,522,1,1117, -4064,16,0,159,1, -1990,4065,16,0,647, -1,1189,4066,16,0, -240,1,1775,4067,16, -0,647,1,32,4068, -16,0,647,1,2106, -4069,16,0,647,1, -1515,4070,16,0,579, -1,2337,4071,16,0, -647,1,52,4072,16, -0,592,1,1804,4073, -16,0,647,1,1261, -4074,16,0,298,1, -1153,4075,16,0,247, -1,1225,4076,16,0, -274,1,1335,4077,16, -0,443,1,1933,4078, -16,0,553,1,1834, -4079,16,0,312,1, -1297,4080,16,0,323, -1,1407,4081,16,0, -568,1,2318,4082,16, -0,188,1,1958,4083, -16,0,647,1,1371, -4084,16,0,438,1, -114,4085,19,531,1, -114,4086,5,11,1, -2075,4087,16,0,529, -1,2337,4088,16,0, -529,1,2413,4089,16, -0,529,1,1901,4090, -16,0,529,1,2198, -4091,16,0,529,1, -2106,4092,16,0,529, -1,1804,4093,16,0, -529,1,1990,4094,16, -0,529,1,32,4095, -16,0,529,1,1958, -4096,16,0,529,1, -1775,4097,16,0,529, -1,115,4098,19,527, -1,115,4099,5,11, -1,2075,4100,16,0, -525,1,2337,4101,16, -0,525,1,2413,4102, -16,0,525,1,1901, -4103,16,0,525,1, -2198,4104,16,0,525, -1,2106,4105,16,0, -525,1,1804,4106,16, -0,525,1,1990,4107, -16,0,525,1,32, -4108,16,0,525,1, -1958,4109,16,0,525, -1,1775,4110,16,0, -525,1,116,4111,19, -575,1,116,4112,5, -11,1,2075,4113,16, -0,573,1,2337,4114, -16,0,573,1,2413, -4115,16,0,573,1, -1901,4116,16,0,573, -1,2198,4117,16,0, -573,1,2106,4118,16, -0,573,1,1804,4119, -16,0,573,1,1990, -4120,16,0,573,1, -32,4121,16,0,573, -1,1958,4122,16,0, -573,1,1775,4123,16, -0,573,1,117,4124, -19,521,1,117,4125, -5,11,1,2075,4126, -16,0,519,1,2337, -4127,16,0,519,1, -2413,4128,16,0,519, -1,1901,4129,16,0, -519,1,2198,4130,16, -0,519,1,2106,4131, -16,0,519,1,1804, -4132,16,0,519,1, -1990,4133,16,0,519, -1,32,4134,16,0, -519,1,1958,4135,16, -0,519,1,1775,4136, -16,0,519,1,118, -4137,19,518,1,118, -4138,5,11,1,2075, -4139,16,0,516,1, -2337,4140,16,0,516, -1,2413,4141,16,0, -516,1,1901,4142,16, -0,516,1,2198,4143, -16,0,516,1,2106, -4144,16,0,516,1, -1804,4145,16,0,516, -1,1990,4146,16,0, -516,1,32,4147,16, -0,516,1,1958,4148, -16,0,516,1,1775, -4149,16,0,516,1, -119,4150,19,515,1, -119,4151,5,11,1, -2075,4152,16,0,513, -1,2337,4153,16,0, -513,1,2413,4154,16, -0,513,1,1901,4155, -16,0,513,1,2198, -4156,16,0,513,1, -2106,4157,16,0,513, -1,1804,4158,16,0, -513,1,1990,4159,16, -0,513,1,32,4160, -16,0,513,1,1958, -4161,16,0,513,1, -1775,4162,16,0,513, -1,120,4163,19,512, -1,120,4164,5,11, -1,2075,4165,16,0, -510,1,2337,4166,16, -0,510,1,2413,4167, -16,0,510,1,1901, -4168,16,0,510,1, -2198,4169,16,0,510, -1,2106,4170,16,0, -510,1,1804,4171,16, -0,510,1,1990,4172, -16,0,510,1,32, -4173,16,0,510,1, -1958,4174,16,0,510, -1,1775,4175,16,0, -510,1,121,4176,19, -509,1,121,4177,5, -11,1,2075,4178,16, -0,507,1,2337,4179, -16,0,507,1,2413, -4180,16,0,507,1, -1901,4181,16,0,507, -1,2198,4182,16,0, -507,1,2106,4183,16, -0,507,1,1804,4184, -16,0,507,1,1990, -4185,16,0,507,1, -32,4186,16,0,507, +1019,1,2029,850,1, +2030,856,1,1989,1041, +1,1990,3726,16,0, +110,1,2459,1007,1, +1775,3727,16,0,110, +1,32,3728,16,0, +110,1,2541,3729,16, +0,525,1,2106,3730, +16,0,110,1,2545, +3731,16,0,525,1, +1574,924,1,2770,3732, +16,0,110,1,2227, +1033,1,2337,3733,16, +0,110,1,52,3734, +16,0,110,1,2783, +3517,1,1803,912,1, +2458,1001,1,1901,3735, +16,0,110,1,2462, +1014,1,2136,968,1, +2464,1024,1,1860,946, +1,2466,3532,1,2031, +861,1,2032,866,1, +2033,871,1,2035,877, +1,2364,952,1,2039, +887,1,1931,986,1, +2041,893,1,2021,843, +1,2043,899,1,2045, +904,1,2811,3559,1, +2037,882,1,2822,3523, +1,2823,3736,16,0, +110,1,2843,3549,1, +2844,3554,1,2105,939, +1,2582,3737,16,0, +110,1,1958,3738,16, +0,110,1,57,3739, +19,109,1,57,3740, +5,53,1,0,3741, +16,0,107,1,2075, +3742,16,0,107,1, +2841,3538,1,2842,3544, +1,1804,3743,16,0, +107,1,10,3744,16, +0,107,1,2413,3745, +16,0,107,1,2198, +3746,16,0,107,1, +1873,961,1,21,3747, +16,0,107,1,1657, +1019,1,2029,850,1, +2030,856,1,1989,1041, +1,1990,3748,16,0, +107,1,2459,1007,1, +1775,3749,16,0,107, +1,32,3750,16,0, +107,1,2105,939,1, +2106,3751,16,0,107, +1,1574,924,1,2770, +3752,16,0,107,1, +2227,1033,1,2337,3753, +16,0,107,1,52, +3754,16,0,107,1, +2783,3517,1,1803,912, +1,2458,1001,1,1901, +3755,16,0,107,1, +2462,1014,1,2136,968, +1,2464,1024,1,1860, +946,1,2466,3532,1, +2031,861,1,2032,866, +1,2033,871,1,2035, +877,1,2364,952,1, +2039,887,1,1931,986, +1,2041,893,1,2021, +843,1,2043,899,1, +2045,904,1,2811,3559, +1,2037,882,1,2822, +3523,1,2823,3756,16, +0,107,1,2843,3549, +1,2844,3554,1,2582, +3757,16,0,107,1, +1958,3758,16,0,107, +1,58,3759,19,396, +1,58,3760,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3761,16,0,394, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3762,16,0,394,1, +2580,1858,1,2703,3763, +16,0,394,1,2595, +1871,1,2597,3764,16, +0,394,1,59,3765, +19,393,1,59,3766, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3767,16, +0,391,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3768,16,0, +391,1,2580,1858,1, +2703,3769,16,0,391, +1,2595,1871,1,2597, +3770,16,0,391,1, +60,3771,19,557,1, +60,3772,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3773,16,0,555,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3774, +16,0,555,1,2580, +1858,1,2703,3775,16, +0,555,1,2595,1871, +1,2597,3776,16,0, +555,1,61,3777,19, +433,1,61,3778,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3779,16,0, +431,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3780,16,0,431, +1,2580,1858,1,2703, +3781,16,0,431,1, +2595,1871,1,2597,3782, +16,0,431,1,62, +3783,19,553,1,62, +3784,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3785, +16,0,551,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3786,16, +0,551,1,2580,1858, +1,2703,3787,16,0, +551,1,2595,1871,1, +2597,3788,16,0,551, +1,63,3789,19,666, +1,63,3790,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3791,16,0,664, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3792,16,0,664,1, +2580,1858,1,2703,3793, +16,0,664,1,2595, +1871,1,2597,3794,16, +0,664,1,64,3795, +19,426,1,64,3796, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3797,16, +0,424,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3798,16,0, +424,1,2580,1858,1, +2703,3799,16,0,424, +1,2595,1871,1,2597, +3800,16,0,424,1, +65,3801,19,390,1, +65,3802,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3803,16,0,388,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3804, +16,0,388,1,2580, +1858,1,2703,3805,16, +0,388,1,2595,1871, +1,2597,3806,16,0, +388,1,66,3807,19, +778,1,66,3808,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3809,16,0, +776,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3810,16,0,776, +1,2580,1858,1,2703, +3811,16,0,776,1, +2595,1871,1,2597,3812, +16,0,776,1,67, +3813,19,475,1,67, +3814,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3815, +16,0,473,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3816,16, +0,473,1,2580,1858, +1,2703,3817,16,0, +473,1,2595,1871,1, +2597,3818,16,0,473, +1,68,3819,19,472, +1,68,3820,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3821,16,0,470, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3822,16,0,470,1, +2580,1858,1,2703,3823, +16,0,470,1,2595, +1871,1,2597,3824,16, +0,470,1,69,3825, +19,405,1,69,3826, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3827,16, +0,403,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3828,16,0, +403,1,2580,1858,1, +2703,3829,16,0,403, +1,2595,1871,1,2597, +3830,16,0,403,1, +70,3831,19,402,1, +70,3832,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3833,16,0,400,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3834, +16,0,400,1,2580, +1858,1,2703,3835,16, +0,400,1,2595,1871, +1,2597,3836,16,0, +400,1,71,3837,19, +399,1,71,3838,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3839,16,0, +397,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3840,16,0,397, +1,2580,1858,1,2703, +3841,16,0,397,1, +2595,1871,1,2597,3842, +16,0,397,1,72, +3843,19,469,1,72, +3844,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3845, +16,0,467,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3846,16, +0,467,1,2580,1858, +1,2703,3847,16,0, +467,1,2595,1871,1, +2597,3848,16,0,467, +1,73,3849,19,466, +1,73,3850,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3851,16,0,464, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3852,16,0,464,1, +2580,1858,1,2703,3853, +16,0,464,1,2595, +1871,1,2597,3854,16, +0,464,1,74,3855, +19,463,1,74,3856, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3857,16, +0,461,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3858,16,0, +461,1,2580,1858,1, +2703,3859,16,0,461, +1,2595,1871,1,2597, +3860,16,0,461,1, +75,3861,19,449,1, +75,3862,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3863,16,0,447,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3864, +16,0,447,1,2580, +1858,1,2703,3865,16, +0,447,1,2595,1871, +1,2597,3866,16,0, +447,1,76,3867,19, +570,1,76,3868,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3869,16,0, +568,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3870,16,0,568, +1,2580,1858,1,2703, +3871,16,0,568,1, +2595,1871,1,2597,3872, +16,0,568,1,77, +3873,19,445,1,77, +3874,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3875, +16,0,443,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3876,16, +0,443,1,2580,1858, +1,2703,3877,16,0, +443,1,2595,1871,1, +2597,3878,16,0,443, +1,78,3879,19,566, +1,78,3880,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3881,16,0,564, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3882,16,0,564,1, +2580,1858,1,2703,3883, +16,0,564,1,2595, +1871,1,2597,3884,16, +0,564,1,79,3885, +19,563,1,79,3886, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3887,16, +0,561,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3888,16,0, +561,1,2580,1858,1, +2703,3889,16,0,561, +1,2595,1871,1,2597, +3890,16,0,561,1, +80,3891,19,436,1, +80,3892,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3893,16,0,434,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3894, +16,0,434,1,2580, +1858,1,2703,3895,16, +0,434,1,2595,1871, +1,2597,3896,16,0, +434,1,81,3897,19, +423,1,81,3898,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3899,16,0, +421,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3900,16,0,421, +1,2580,1858,1,2703, +3901,16,0,421,1, +2595,1871,1,2597,3902, +16,0,421,1,82, +3903,19,460,1,82, +3904,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3905, +16,0,458,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3906,16, +0,458,1,2580,1858, +1,2703,3907,16,0, +458,1,2595,1871,1, +2597,3908,16,0,458, +1,83,3909,19,420, +1,83,3910,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3911,16,0,418, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3912,16,0,418,1, +2580,1858,1,2703,3913, +16,0,418,1,2595, +1871,1,2597,3914,16, +0,418,1,84,3915, +19,417,1,84,3916, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3917,16, +0,415,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3918,16,0, +415,1,2580,1858,1, +2703,3919,16,0,415, +1,2595,1871,1,2597, +3920,16,0,415,1, +85,3921,19,578,1, +85,3922,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3923,16,0,576,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3924, +16,0,576,1,2580, +1858,1,2703,3925,16, +0,576,1,2595,1871, +1,2597,3926,16,0, +576,1,86,3927,19, +452,1,86,3928,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3929,16,0, +450,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3930,16,0,450, +1,2580,1858,1,2703, +3931,16,0,450,1, +2595,1871,1,2597,3932, +16,0,450,1,87, +3933,19,560,1,87, +3934,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3935, +16,0,558,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3936,16, +0,558,1,2580,1858, +1,2703,3937,16,0, +558,1,2595,1871,1, +2597,3938,16,0,558, +1,88,3939,19,414, +1,88,3940,5,30, +1,2536,1750,1,2521, +1767,1,2641,1779,1, +2642,1784,1,2643,1756, +1,2644,1789,1,2645, +1794,1,2646,1799,1, +2647,1762,1,2648,1878, +1,2650,1811,1,2651, +1816,1,2652,1821,1, +2653,1826,1,2654,1831, +1,2655,1836,1,2656, +1841,1,2657,1774,1, +2659,3941,16,0,412, +1,2551,1852,1,2559, +1864,1,2567,1805,1, +2459,1007,1,2464,1024, +1,2575,1846,1,2470, +3942,16,0,412,1, +2580,1858,1,2703,3943, +16,0,412,1,2595, +1871,1,2597,3944,16, +0,412,1,89,3945, +19,408,1,89,3946, +5,30,1,2536,1750, +1,2521,1767,1,2641, +1779,1,2642,1784,1, +2643,1756,1,2644,1789, +1,2645,1794,1,2646, +1799,1,2647,1762,1, +2648,1878,1,2650,1811, +1,2651,1816,1,2652, +1821,1,2653,1826,1, +2654,1831,1,2655,1836, +1,2656,1841,1,2657, +1774,1,2659,3947,16, +0,406,1,2551,1852, +1,2559,1864,1,2567, +1805,1,2459,1007,1, +2464,1024,1,2575,1846, +1,2470,3948,16,0, +406,1,2580,1858,1, +2703,3949,16,0,406, +1,2595,1871,1,2597, +3950,16,0,406,1, +90,3951,19,411,1, +90,3952,5,30,1, +2536,1750,1,2521,1767, +1,2641,1779,1,2642, +1784,1,2643,1756,1, +2644,1789,1,2645,1794, +1,2646,1799,1,2647, +1762,1,2648,1878,1, +2650,1811,1,2651,1816, +1,2652,1821,1,2653, +1826,1,2654,1831,1, +2655,1836,1,2656,1841, +1,2657,1774,1,2659, +3953,16,0,409,1, +2551,1852,1,2559,1864, +1,2567,1805,1,2459, +1007,1,2464,1024,1, +2575,1846,1,2470,3954, +16,0,409,1,2580, +1858,1,2703,3955,16, +0,409,1,2595,1871, +1,2597,3956,16,0, +409,1,91,3957,19, +768,1,91,3958,5, +30,1,2536,1750,1, +2521,1767,1,2641,1779, +1,2642,1784,1,2643, +1756,1,2644,1789,1, +2645,1794,1,2646,1799, +1,2647,1762,1,2648, +1878,1,2650,1811,1, +2651,1816,1,2652,1821, +1,2653,1826,1,2654, +1831,1,2655,1836,1, +2656,1841,1,2657,1774, +1,2659,3959,16,0, +766,1,2551,1852,1, +2559,1864,1,2567,1805, +1,2459,1007,1,2464, +1024,1,2575,1846,1, +2470,3960,16,0,766, +1,2580,1858,1,2703, +3961,16,0,766,1, +2595,1871,1,2597,3962, +16,0,766,1,92, +3963,19,456,1,92, +3964,5,30,1,2536, +1750,1,2521,1767,1, +2641,1779,1,2642,1784, +1,2643,1756,1,2644, +1789,1,2645,1794,1, +2646,1799,1,2647,1762, +1,2648,1878,1,2650, +1811,1,2651,1816,1, +2652,1821,1,2653,1826, +1,2654,1831,1,2655, +1836,1,2656,1841,1, +2657,1774,1,2659,3965, +16,0,454,1,2551, +1852,1,2559,1864,1, +2567,1805,1,2459,1007, +1,2464,1024,1,2575, +1846,1,2470,3966,16, +0,454,1,2580,1858, +1,2703,3967,16,0, +454,1,2595,1871,1, +2597,3968,16,0,454, +1,93,3969,19,133, +1,93,3970,5,129, +1,0,3971,16,0, +789,1,1,2244,1, +2,2250,1,3,2255, +1,4,2260,1,5, +2265,1,6,2270,1, +7,2275,1,8,3972, +16,0,131,1,1515, +3973,16,0,181,1, +2021,843,1,2022,3974, +16,0,583,1,256, +3975,16,0,189,1, +2527,3976,16,0,311, +1,18,3977,16,0, +138,1,2027,3978,16, +0,591,1,2029,850, +1,2030,856,1,2031, +861,1,2032,866,1, +2786,3979,16,0,189, +1,277,3980,16,0, +189,1,2035,877,1, +2037,882,1,2039,887, +1,32,3981,16,0, +181,1,2041,893,1, +2293,3982,16,0,189, +1,2043,899,1,2045, +904,1,41,3983,16, +0,189,1,1297,3984, +16,0,181,1,43, +3985,16,0,189,1, +46,3986,16,0,194, +1,1804,3987,16,0, +181,1,299,3988,16, +0,189,1,2811,3559, +1,52,3989,16,0, +181,1,509,3990,16, +0,189,1,2318,3991, +16,0,181,1,2822, +3523,1,62,3992,16, +0,218,1,65,3993, +16,0,220,1,2075, +3994,16,0,181,1, +1574,924,1,71,3995, +16,0,189,1,1775, +3996,16,0,181,1, +76,3997,16,0,189, +1,1834,3998,16,0, +181,1,2337,3999,16, +0,181,1,79,4000, +16,0,189,1,1335, +4001,16,0,181,1, +2842,3544,1,2843,3549, +1,2844,3554,1,85, +4002,16,0,189,1, +1261,4003,16,0,181, +1,89,4004,16,0, +189,1,2033,871,1, +322,4005,16,0,189, +1,97,4006,16,0, +189,1,2106,4007,16, +0,181,1,102,4008, +16,0,189,1,1860, +946,1,1803,912,1, +2364,952,1,346,4009, +16,0,189,1,1113, +4010,16,0,173,1, +2783,3517,1,112,4011, +16,0,189,1,1117, +4012,16,0,181,1, +1371,4013,16,0,181, +1,1876,4014,16,0, +181,1,372,4015,16, +0,621,1,374,4016, +16,0,623,1,124, +4017,16,0,189,1, +376,4018,16,0,625, +1,378,4019,16,0, +627,1,2136,968,1, +381,4020,16,0,189, +1,525,4021,16,0, +189,1,137,4022,16, +0,189,1,1901,4023, +16,0,181,1,2025, +4024,16,0,587,1, +1153,4025,16,0,181, +1,151,4026,16,0, +189,1,1407,4027,16, +0,181,1,1659,4028, +16,0,181,1,2413, +4029,16,0,181,1, +406,4030,16,0,189, +1,2512,4031,16,0, +490,1,2105,939,1, +166,4032,16,0,189, +1,1622,4033,16,0, +189,1,2841,3538,1, +1931,986,1,1873,961, +1,431,4034,16,0, +189,1,1585,4035,16, +0,189,1,182,4036, +16,0,189,1,1189, +4037,16,0,181,1, +1443,4038,16,0,181, +1,1695,4039,16,0, +181,1,2198,4040,16, +0,181,1,2542,4041, +16,0,644,1,447, +4042,16,0,189,1, +2458,1001,1,2459,1007, +1,1958,4043,16,0, +181,1,2462,1014,1, +1657,1019,1,2464,1024, +1,2466,3532,1,459, +4044,16,0,189,1, +2468,4045,16,0,386, +1,462,4046,16,0, +189,1,199,4047,16, +0,189,1,217,4048, +16,0,189,1,2227, +1033,1,1225,4049,16, +0,181,1,1479,4050, +16,0,181,1,1731, +4051,16,0,189,1, +1989,1041,1,1990,4052, +16,0,181,1,236, +4053,16,0,189,1, +1933,4054,16,0,181, +1,2823,4055,16,0, +789,1,2508,4056,16, +0,484,1,1756,4057, +16,0,181,1,94, +4058,19,746,1,94, +4059,5,95,1,256, +4060,16,0,744,1, +1261,4061,16,0,744, +1,509,4062,16,0, +744,1,1515,4063,16, +0,744,1,2021,843, +1,1775,4064,16,0, +744,1,2029,850,1, +2030,856,1,2031,861, +1,2032,866,1,2033, +871,1,277,4065,16, +0,744,1,2035,877, +1,2037,882,1,2039, +887,1,32,4066,16, +0,744,1,2041,893, +1,2293,4067,16,0, +744,1,2043,899,1, +2045,904,1,41,4068, +16,0,744,1,1297, +4069,16,0,744,1, +43,4070,16,0,744, +1,1803,912,1,1804, +4071,16,0,744,1, +299,4072,16,0,744, +1,52,4073,16,0, +744,1,2318,4074,16, +0,744,1,62,4075, +16,0,744,1,2075, +4076,16,0,744,1, +1574,924,1,71,4077, +16,0,744,1,76, +4078,16,0,744,1, +1834,4079,16,0,744, +1,2337,4080,16,0, +744,1,79,4081,16, +0,744,1,1335,4082, +16,0,744,1,322, +4083,16,0,744,1, +85,4084,16,0,744, +1,89,4085,16,0, +744,1,346,4086,16, +0,744,1,2105,939, +1,2106,4087,16,0, +744,1,97,4088,16, +0,744,1,1860,946, +1,2364,952,1,102, +4089,16,0,744,1, +112,4090,16,0,744, +1,1117,4091,16,0, +744,1,2786,4092,16, +0,744,1,1873,961, +1,1876,4093,16,0, +744,1,124,4094,16, +0,744,1,2136,968, +1,381,4095,16,0, +744,1,525,4096,16, +0,744,1,137,4097, +16,0,744,1,1901, +4098,16,0,744,1, +1153,4099,16,0,744, +1,151,4100,16,0, +744,1,1407,4101,16, +0,744,1,1659,4102, +16,0,744,1,2413, +4103,16,0,744,1, +406,4104,16,0,744, +1,1371,4105,16,0, +744,1,166,4106,16, +0,744,1,1622,4107, +16,0,744,1,1931, +986,1,1933,4108,16, +0,744,1,431,4109, +16,0,744,1,1585, +4110,16,0,744,1, +182,4111,16,0,744, +1,1189,4112,16,0, +744,1,1443,4113,16, +0,744,1,1695,4114, +16,0,744,1,2198, +4115,16,0,744,1, +447,4116,16,0,744, +1,2458,1001,1,2459, +1007,1,1958,4117,16, +0,744,1,2462,1014, +1,1657,1019,1,2464, +1024,1,199,4118,16, +0,744,1,459,4119, +16,0,744,1,462, +4120,16,0,744,1, +217,4121,16,0,744, +1,2227,1033,1,1225, +4122,16,0,744,1, +1479,4123,16,0,744, +1,1731,4124,16,0, +744,1,1989,1041,1, +1990,4125,16,0,744, +1,236,4126,16,0, +744,1,1756,4127,16, +0,744,1,95,4128, +19,743,1,95,4129, +5,95,1,256,4130, +16,0,741,1,1261, +4131,16,0,741,1, +509,4132,16,0,741, +1,1515,4133,16,0, +741,1,2021,843,1, +1775,4134,16,0,741, +1,2029,850,1,2030, +856,1,2031,861,1, +2032,866,1,2033,871, +1,277,4135,16,0, +741,1,2035,877,1, +2037,882,1,2039,887, +1,32,4136,16,0, +741,1,2041,893,1, +2293,4137,16,0,741, +1,2043,899,1,2045, +904,1,41,4138,16, +0,741,1,1297,4139, +16,0,741,1,43, +4140,16,0,741,1, +1803,912,1,1804,4141, +16,0,741,1,299, +4142,16,0,741,1, +52,4143,16,0,741, +1,2318,4144,16,0, +741,1,62,4145,16, +0,741,1,2075,4146, +16,0,741,1,1574, +924,1,71,4147,16, +0,741,1,76,4148, +16,0,741,1,1834, +4149,16,0,741,1, +2337,4150,16,0,741, +1,79,4151,16,0, +741,1,1335,4152,16, +0,741,1,322,4153, +16,0,741,1,85, +4154,16,0,741,1, +89,4155,16,0,741, +1,346,4156,16,0, +741,1,2105,939,1, +2106,4157,16,0,741, +1,97,4158,16,0, +741,1,1860,946,1, +2364,952,1,102,4159, +16,0,741,1,112, +4160,16,0,741,1, +1117,4161,16,0,741, +1,2786,4162,16,0, +741,1,1873,961,1, +1876,4163,16,0,741, +1,124,4164,16,0, +741,1,2136,968,1, +381,4165,16,0,741, +1,525,4166,16,0, +741,1,137,4167,16, +0,741,1,1901,4168, +16,0,741,1,1153, +4169,16,0,741,1, +151,4170,16,0,741, +1,1407,4171,16,0, +741,1,1659,4172,16, +0,741,1,2413,4173, +16,0,741,1,406, +4174,16,0,741,1, +1371,4175,16,0,741, +1,166,4176,16,0, +741,1,1622,4177,16, +0,741,1,1931,986, +1,1933,4178,16,0, +741,1,431,4179,16, +0,741,1,1585,4180, +16,0,741,1,182, +4181,16,0,741,1, +1189,4182,16,0,741, +1,1443,4183,16,0, +741,1,1695,4184,16, +0,741,1,2198,4185, +16,0,741,1,447, +4186,16,0,741,1, +2458,1001,1,2459,1007, 1,1958,4187,16,0, -507,1,1775,4188,16, -0,507,1,122,4189, -19,147,1,122,4190, -5,3,1,1756,4191, -16,0,283,1,2318, -4192,16,0,297,1, -1659,4193,16,0,145, -1,123,4194,19,548, -1,123,4195,5,68, -1,1901,4196,16,0, -546,1,1479,4197,16, -0,546,1,112,4198, -16,0,546,1,2293, -4199,16,0,546,1, -1804,4200,16,0,546, -1,431,4201,16,0, -546,1,1443,4202,16, -0,546,1,1756,4203, -16,0,546,1,124, -4204,16,0,546,1, -525,4205,16,0,546, -1,236,4206,16,0, -546,1,346,4207,16, -0,546,1,1876,4208, -16,0,546,1,1659, -4209,16,0,546,1, -1225,4210,16,0,546, -1,1117,4211,16,0, -546,1,137,4212,16, -0,546,1,2318,4213, -16,0,546,1,1775, -4214,16,0,546,1, -32,4215,16,0,546, -1,1407,4216,16,0, -546,1,256,4217,16, -0,546,1,459,4218, -16,0,546,1,406, -4219,16,0,546,1, -41,4220,16,0,546, -1,2658,4221,16,0, -546,1,43,4222,16, -0,546,1,1585,4223, -16,0,546,1,1990, -4224,16,0,546,1, -2337,4225,16,0,546, -1,509,4226,16,0, -546,1,52,4227,16, -0,546,1,151,4228, -16,0,546,1,447, -4229,16,0,546,1, -166,4230,16,0,546, -1,462,4231,16,0, -546,1,277,4232,16, -0,546,1,1695,4233, -16,0,546,1,62, -4234,16,0,586,1, -1153,4235,16,0,546, -1,381,4236,16,0, -546,1,2106,4237,16, -0,546,1,1335,4238, -16,0,546,1,71, -4239,16,0,546,1, -182,4240,16,0,546, -1,76,4241,16,0, -546,1,79,4242,16, -0,546,1,1933,4243, -16,0,546,1,299, -4244,16,0,546,1, -85,4245,16,0,546, -1,1515,4246,16,0, -546,1,2198,4247,16, -0,546,1,89,4248, -16,0,546,1,1834, -4249,16,0,546,1, -1622,4250,16,0,546, -1,2413,4251,16,0, -546,1,2075,4252,16, -0,546,1,1731,4253, -16,0,546,1,97, -4254,16,0,546,1, -1297,4255,16,0,546, -1,1189,4256,16,0, -546,1,102,4257,16, -0,546,1,1261,4258, -16,0,546,1,322, -4259,16,0,546,1, -1958,4260,16,0,546, -1,199,4261,16,0, -546,1,1371,4262,16, -0,546,1,217,4263, -16,0,546,1,124, -4264,19,602,1,124, -4265,5,2,1,459, -4266,16,0,600,1, -41,4267,16,0,665, -1,125,4268,19,606, -1,125,4269,5,3, -1,462,4270,16,0, -604,1,459,4271,16, -0,630,1,41,4272, -16,0,630,1,126, -4273,19,4274,4,36, -69,0,120,0,112, -0,114,0,101,0, -115,0,115,0,105, +741,1,2462,1014,1, +1657,1019,1,2464,1024, +1,199,4188,16,0, +741,1,459,4189,16, +0,741,1,462,4190, +16,0,741,1,217, +4191,16,0,741,1, +2227,1033,1,1225,4192, +16,0,741,1,1479, +4193,16,0,741,1, +1731,4194,16,0,741, +1,1989,1041,1,1990, +4195,16,0,741,1, +236,4196,16,0,741, +1,1756,4197,16,0, +741,1,96,4198,19, +740,1,96,4199,5, +95,1,256,4200,16, +0,738,1,1261,4201, +16,0,738,1,509, +4202,16,0,738,1, +1515,4203,16,0,738, +1,2021,843,1,1775, +4204,16,0,738,1, +2029,850,1,2030,856, +1,2031,861,1,2032, +866,1,2033,871,1, +277,4205,16,0,738, +1,2035,877,1,2037, +882,1,2039,887,1, +32,4206,16,0,738, +1,2041,893,1,2293, +4207,16,0,738,1, +2043,899,1,2045,904, +1,41,4208,16,0, +738,1,1297,4209,16, +0,738,1,43,4210, +16,0,738,1,1803, +912,1,1804,4211,16, +0,738,1,299,4212, +16,0,738,1,52, +4213,16,0,738,1, +2318,4214,16,0,738, +1,62,4215,16,0, +738,1,2075,4216,16, +0,738,1,1574,924, +1,71,4217,16,0, +738,1,76,4218,16, +0,738,1,1834,4219, +16,0,738,1,2337, +4220,16,0,738,1, +79,4221,16,0,738, +1,1335,4222,16,0, +738,1,322,4223,16, +0,738,1,85,4224, +16,0,738,1,89, +4225,16,0,738,1, +346,4226,16,0,738, +1,2105,939,1,2106, +4227,16,0,738,1, +97,4228,16,0,738, +1,1860,946,1,2364, +952,1,102,4229,16, +0,738,1,112,4230, +16,0,738,1,1117, +4231,16,0,738,1, +2786,4232,16,0,738, +1,1873,961,1,1876, +4233,16,0,738,1, +124,4234,16,0,738, +1,2136,968,1,381, +4235,16,0,738,1, +525,4236,16,0,738, +1,137,4237,16,0, +738,1,1901,4238,16, +0,738,1,1153,4239, +16,0,738,1,151, +4240,16,0,738,1, +1407,4241,16,0,738, +1,1659,4242,16,0, +738,1,2413,4243,16, +0,738,1,406,4244, +16,0,738,1,1371, +4245,16,0,738,1, +166,4246,16,0,738, +1,1622,4247,16,0, +738,1,1931,986,1, +1933,4248,16,0,738, +1,431,4249,16,0, +738,1,1585,4250,16, +0,738,1,182,4251, +16,0,738,1,1189, +4252,16,0,738,1, +1443,4253,16,0,738, +1,1695,4254,16,0, +738,1,2198,4255,16, +0,738,1,447,4256, +16,0,738,1,2458, +1001,1,2459,1007,1, +1958,4257,16,0,738, +1,2462,1014,1,1657, +1019,1,2464,1024,1, +199,4258,16,0,738, +1,459,4259,16,0, +738,1,462,4260,16, +0,738,1,217,4261, +16,0,738,1,2227, +1033,1,1225,4262,16, +0,738,1,1479,4263, +16,0,738,1,1731, +4264,16,0,738,1, +1989,1041,1,1990,4265, +16,0,738,1,236, +4266,16,0,738,1, +1756,4267,16,0,738, +1,97,4268,19,103, +1,97,4269,5,1, +1,0,4270,16,0, +104,1,98,4271,19, +647,1,98,4272,5, +1,1,0,4273,16, +0,645,1,99,4274, +19,210,1,99,4275, +5,2,1,0,4276, +16,0,312,1,2823, +4277,16,0,208,1, +100,4278,19,207,1, +100,4279,5,2,1, +0,4280,16,0,286, +1,2823,4281,16,0, +205,1,101,4282,19, +301,1,101,4283,5, +2,1,0,4284,16, +0,785,1,2823,4285, +16,0,299,1,102, +4286,19,320,1,102, +4287,5,4,1,0, +4288,16,0,788,1, +2764,4289,16,0,318, +1,2823,4290,16,0, +788,1,2834,4291,16, +0,318,1,103,4292, +19,714,1,103,4293, +5,2,1,2470,4294, +16,0,712,1,2659, +4295,16,0,734,1, +104,4296,19,280,1, +104,4297,5,4,1, +2597,4298,16,0,680, +1,2703,4299,16,0, +680,1,2470,4300,16, +0,278,1,2659,4301, +16,0,278,1,105, +4302,19,679,1,105, +4303,5,4,1,2597, +4304,16,0,677,1, +2703,4305,16,0,677, +1,2470,4306,16,0, +690,1,2659,4307,16, +0,690,1,106,4308, +19,157,1,106,4309, +5,4,1,2597,4310, +16,0,155,1,2703, +4311,16,0,155,1, +2470,4312,16,0,769, +1,2659,4313,16,0, +769,1,107,4314,19, +154,1,107,4315,5, +4,1,2597,4316,16, +0,152,1,2703,4317, +16,0,152,1,2470, +4318,16,0,174,1, +2659,4319,16,0,174, +1,108,4320,19,672, +1,108,4321,5,4, +1,2597,4322,16,0, +670,1,2703,4323,16, +0,670,1,2470,4324, +16,0,685,1,2659, +4325,16,0,685,1, +109,4326,19,669,1, +109,4327,5,4,1, +2597,4328,16,0,667, +1,2703,4329,16,0, +667,1,2470,4330,16, +0,684,1,2659,4331, +16,0,684,1,110, +4332,19,172,1,110, +4333,5,4,1,2597, +4334,16,0,752,1, +2703,4335,16,0,752, +1,2470,4336,16,0, +170,1,2659,4337,16, +0,170,1,111,4338, +19,169,1,111,4339, +5,4,1,2597,4340, +16,0,663,1,2703, +4341,16,0,663,1, +2470,4342,16,0,167, +1,2659,4343,16,0, +167,1,112,4344,19, +141,1,112,4345,5, +3,1,2582,4346,16, +0,293,1,2770,4347, +16,0,331,1,10, +4348,16,0,139,1, +113,4349,19,688,1, +113,4350,5,1,1, +2569,4351,16,0,686, +1,114,4352,19,676, +1,114,4353,5,1, +1,2561,4354,16,0, +674,1,115,4355,19, +660,1,115,4356,5, +1,1,2553,4357,16, +0,658,1,116,4358, +19,535,1,116,4359, +5,1,1,2538,4360, +16,0,533,1,117, +4361,19,638,1,117, +4362,5,1,1,2523, +4363,16,0,636,1, +118,4364,19,498,1, +118,4365,5,1,1, +2507,4366,16,0,496, +1,119,4367,19,160, +1,119,4368,5,17, +1,0,4369,16,0, +333,1,2582,4370,16, +0,382,1,2075,4371, +16,0,763,1,2337, +4372,16,0,763,1, +2413,4373,16,0,763, +1,10,4374,16,0, +382,1,2823,4375,16, +0,333,1,1901,4376, +16,0,763,1,2198, +4377,16,0,763,1, +21,4378,16,0,158, +1,2106,4379,16,0, +763,1,2770,4380,16, +0,382,1,1804,4381, +16,0,763,1,1990, +4382,16,0,763,1, +32,4383,16,0,763, +1,1958,4384,16,0, +763,1,1775,4385,16, +0,763,1,120,4386, +19,487,1,120,4387, +5,2,1,2569,4388, +16,0,567,1,2507, +4389,16,0,485,1, +121,4390,19,493,1, +121,4391,5,5,1, +2511,4392,16,0,491, +1,2523,4393,16,0, +506,1,2515,4394,16, +0,495,1,2538,4395, +16,0,523,1,2561, +4396,16,0,753,1, +122,4397,19,514,1, +122,4398,5,3,1, +2530,4399,16,0,516, +1,2553,4400,16,0, +542,1,2526,4401,16, +0,512,1,123,4402, +19,248,1,123,4403, +5,2,1,2541,4404, +16,0,527,1,2545, +4405,16,0,246,1, +124,4406,19,130,1, +124,4407,5,18,1, +0,4408,16,0,128, +1,2582,4409,16,0, +137,1,2075,4410,16, +0,137,1,2337,4411, +16,0,137,1,2413, +4412,16,0,137,1, +10,4413,16,0,137, +1,2823,4414,16,0, +128,1,2198,4415,16, +0,137,1,1901,4416, +16,0,137,1,52, +4417,16,0,216,1, +21,4418,16,0,137, +1,2106,4419,16,0, +137,1,2770,4420,16, +0,137,1,1804,4421, +16,0,137,1,1990, +4422,16,0,137,1, +32,4423,16,0,137, +1,1958,4424,16,0, +137,1,1775,4425,16, +0,137,1,125,4426, +19,359,1,125,4427, +5,4,1,2597,4428, +16,0,357,1,2703, +4429,16,0,357,1, +2470,4430,16,0,357, +1,2659,4431,16,0, +357,1,126,4432,19, +772,1,126,4433,5, +4,1,2597,4434,16, +0,770,1,2703,4435, +16,0,770,1,2470, +4436,16,0,770,1, +2659,4437,16,0,770, +1,127,4438,19,760, +1,127,4439,5,4, +1,2597,4440,16,0, +758,1,2703,4441,16, +0,758,1,2470,4442, +16,0,758,1,2659, +4443,16,0,758,1, +128,4444,19,548,1, +128,4445,5,4,1, +2597,4446,16,0,546, +1,2703,4447,16,0, +546,1,2470,4448,16, +0,546,1,2659,4449, +16,0,546,1,129, +4450,19,655,1,129, +4451,5,4,1,2597, +4452,16,0,653,1, +2703,4453,16,0,653, +1,2470,4454,16,0, +653,1,2659,4455,16, +0,653,1,130,4456, +19,643,1,130,4457, +5,4,1,2597,4458, +16,0,641,1,2703, +4459,16,0,641,1, +2470,4460,16,0,641, +1,2659,4461,16,0, +641,1,131,4462,19, +504,1,131,4463,5, +4,1,2597,4464,16, +0,502,1,2703,4465, +16,0,502,1,2470, +4466,16,0,502,1, +2659,4467,16,0,502, +1,132,4468,19,481, +1,132,4469,5,4, +1,2597,4470,16,0, +479,1,2703,4471,16, +0,479,1,2470,4472, +16,0,479,1,2659, +4473,16,0,479,1, +133,4474,19,381,1, +133,4475,5,21,1, +2781,4476,16,0,798, +1,2519,4477,16,0, +784,1,2557,4478,16, +0,545,1,2337,4479, +16,0,592,1,2413, +4480,16,0,592,1, +2593,4481,16,0,711, +1,2565,4482,16,0, +681,1,1901,4483,16, +0,592,1,2198,4484, +16,0,592,1,2534, +4485,16,0,640,1, +2573,4486,16,0,575, +1,2106,4487,16,0, +592,1,2578,4488,16, +0,775,1,2075,4489, +16,0,592,1,1804, +4490,16,0,592,1, +1990,4491,16,0,592, +1,31,4492,16,0, +379,1,32,4493,16, +0,592,1,2549,4494, +16,0,538,1,1958, +4495,16,0,592,1, +1775,4496,16,0,592, +1,134,4497,19,342, +1,134,4498,5,1, +1,32,4499,16,0, +340,1,135,4500,19, +289,1,135,4501,5, +11,1,2075,4502,16, +0,697,1,2337,4503, +16,0,294,1,2413, +4504,16,0,520,1, +1901,4505,16,0,437, +1,2198,4506,16,0, +362,1,2106,4507,16, +0,730,1,1804,4508, +16,0,322,1,1990, +4509,16,0,580,1, +32,4510,16,0,375, +1,1958,4511,16,0, +529,1,1775,4512,16, +0,287,1,136,4513, +19,703,1,136,4514, +5,11,1,2075,4515, +16,0,701,1,2337, +4516,16,0,701,1, +2413,4517,16,0,701, +1,1901,4518,16,0, +701,1,2198,4519,16, +0,701,1,2106,4520, +16,0,701,1,1804, +4521,16,0,701,1, +1990,4522,16,0,701, +1,32,4523,16,0, +701,1,1958,4524,16, +0,701,1,1775,4525, +16,0,701,1,137, +4526,19,756,1,137, +4527,5,11,1,2075, +4528,16,0,754,1, +2337,4529,16,0,754, +1,2413,4530,16,0, +754,1,1901,4531,16, +0,754,1,2198,4532, +16,0,754,1,2106, +4533,16,0,754,1, +1804,4534,16,0,754, +1,1990,4535,16,0, +754,1,32,4536,16, +0,754,1,1958,4537, +16,0,754,1,1775, +4538,16,0,754,1, +138,4539,19,177,1, +138,4540,5,31,1, +1901,4541,16,0,762, +1,1479,4542,16,0, +648,1,2075,4543,16, +0,762,1,1695,4544, +16,0,214,1,1756, +4545,16,0,204,1, +2413,4546,16,0,762, +1,2198,4547,16,0, +762,1,1876,4548,16, +0,781,1,1659,4549, +16,0,204,1,1443, +4550,16,0,608,1, +1117,4551,16,0,175, +1,1990,4552,16,0, +762,1,1189,4553,16, +0,264,1,1775,4554, +16,0,762,1,32, +4555,16,0,762,1, +2106,4556,16,0,762, +1,1515,4557,16,0, +699,1,2337,4558,16, +0,762,1,52,4559, +16,0,715,1,1804, +4560,16,0,762,1, +1261,4561,16,0,338, +1,1153,4562,16,0, +271,1,1225,4563,16, +0,307,1,1335,4564, +16,0,511,1,1933, +4565,16,0,651,1, +1834,4566,16,0,352, +1,1297,4567,16,0, +366,1,1407,4568,16, +0,682,1,2318,4569, +16,0,204,1,1958, +4570,16,0,762,1, +1371,4571,16,0,500, +1,139,4572,19,617, +1,139,4573,5,11, +1,2075,4574,16,0, +615,1,2337,4575,16, +0,615,1,2413,4576, +16,0,615,1,1901, +4577,16,0,615,1, +2198,4578,16,0,615, +1,2106,4579,16,0, +615,1,1804,4580,16, +0,615,1,1990,4581, +16,0,615,1,32, +4582,16,0,615,1, +1958,4583,16,0,615, +1,1775,4584,16,0, +615,1,140,4585,19, +613,1,140,4586,5, +11,1,2075,4587,16, +0,611,1,2337,4588, +16,0,611,1,2413, +4589,16,0,611,1, +1901,4590,16,0,611, +1,2198,4591,16,0, +611,1,2106,4592,16, +0,611,1,1804,4593, +16,0,611,1,1990, +4594,16,0,611,1, +32,4595,16,0,611, +1,1958,4596,16,0, +611,1,1775,4597,16, +0,611,1,141,4598, +19,694,1,141,4599, +5,11,1,2075,4600, +16,0,692,1,2337, +4601,16,0,692,1, +2413,4602,16,0,692, +1,1901,4603,16,0, +692,1,2198,4604,16, +0,692,1,2106,4605, +16,0,692,1,1804, +4606,16,0,692,1, +1990,4607,16,0,692, +1,32,4608,16,0, +692,1,1958,4609,16, +0,692,1,1775,4610, +16,0,692,1,142, +4611,19,607,1,142, +4612,5,11,1,2075, +4613,16,0,605,1, +2337,4614,16,0,605, +1,2413,4615,16,0, +605,1,1901,4616,16, +0,605,1,2198,4617, +16,0,605,1,2106, +4618,16,0,605,1, +1804,4619,16,0,605, +1,1990,4620,16,0, +605,1,32,4621,16, +0,605,1,1958,4622, +16,0,605,1,1775, +4623,16,0,605,1, +143,4624,19,604,1, +143,4625,5,11,1, +2075,4626,16,0,602, +1,2337,4627,16,0, +602,1,2413,4628,16, +0,602,1,1901,4629, +16,0,602,1,2198, +4630,16,0,602,1, +2106,4631,16,0,602, +1,1804,4632,16,0, +602,1,1990,4633,16, +0,602,1,32,4634, +16,0,602,1,1958, +4635,16,0,602,1, +1775,4636,16,0,602, +1,144,4637,19,601, +1,144,4638,5,11, +1,2075,4639,16,0, +599,1,2337,4640,16, +0,599,1,2413,4641, +16,0,599,1,1901, +4642,16,0,599,1, +2198,4643,16,0,599, +1,2106,4644,16,0, +599,1,1804,4645,16, +0,599,1,1990,4646, +16,0,599,1,32, +4647,16,0,599,1, +1958,4648,16,0,599, +1,1775,4649,16,0, +599,1,145,4650,19, +598,1,145,4651,5, +11,1,2075,4652,16, +0,596,1,2337,4653, +16,0,596,1,2413, +4654,16,0,596,1, +1901,4655,16,0,596, +1,2198,4656,16,0, +596,1,2106,4657,16, +0,596,1,1804,4658, +16,0,596,1,1990, +4659,16,0,596,1, +32,4660,16,0,596, +1,1958,4661,16,0, +596,1,1775,4662,16, +0,596,1,146,4663, +19,595,1,146,4664, +5,11,1,2075,4665, +16,0,593,1,2337, +4666,16,0,593,1, +2413,4667,16,0,593, +1,1901,4668,16,0, +593,1,2198,4669,16, +0,593,1,2106,4670, +16,0,593,1,1804, +4671,16,0,593,1, +1990,4672,16,0,593, +1,32,4673,16,0, +593,1,1958,4674,16, +0,593,1,1775,4675, +16,0,593,1,147, +4676,19,147,1,147, +4677,5,3,1,1756, +4678,16,0,321,1, +2318,4679,16,0,337, +1,1659,4680,16,0, +145,1,148,4681,19, +634,1,148,4682,5, +68,1,1901,4683,16, +0,632,1,1479,4684, +16,0,632,1,112, +4685,16,0,632,1, +2293,4686,16,0,632, +1,1804,4687,16,0, +632,1,431,4688,16, +0,632,1,1443,4689, +16,0,632,1,1756, +4690,16,0,632,1, +124,4691,16,0,632, +1,525,4692,16,0, +632,1,236,4693,16, +0,632,1,346,4694, +16,0,632,1,1876, +4695,16,0,632,1, +1659,4696,16,0,632, +1,1225,4697,16,0, +632,1,1117,4698,16, +0,632,1,137,4699, +16,0,632,1,2318, +4700,16,0,632,1, +1775,4701,16,0,632, +1,32,4702,16,0, +632,1,1407,4703,16, +0,632,1,256,4704, +16,0,632,1,459, +4705,16,0,632,1, +406,4706,16,0,632, +1,41,4707,16,0, +632,1,151,4708,16, +0,632,1,43,4709, +16,0,632,1,1585, +4710,16,0,632,1, +1990,4711,16,0,632, +1,2337,4712,16,0, +632,1,509,4713,16, +0,632,1,52,4714, +16,0,632,1,381, +4715,16,0,632,1, +447,4716,16,0,632, +1,166,4717,16,0, +632,1,462,4718,16, +0,632,1,277,4719, +16,0,632,1,1695, +4720,16,0,632,1, +2786,4721,16,0,632, +1,62,4722,16,0, +707,1,1153,4723,16, +0,632,1,2106,4724, +16,0,632,1,1335, +4725,16,0,632,1, +71,4726,16,0,632, +1,182,4727,16,0, +632,1,76,4728,16, +0,632,1,79,4729, +16,0,632,1,1933, +4730,16,0,632,1, +299,4731,16,0,632, +1,85,4732,16,0, +632,1,1515,4733,16, +0,632,1,2198,4734, +16,0,632,1,89, +4735,16,0,632,1, +1834,4736,16,0,632, +1,1622,4737,16,0, +632,1,2413,4738,16, +0,632,1,2075,4739, +16,0,632,1,1731, +4740,16,0,632,1, +97,4741,16,0,632, +1,1297,4742,16,0, +632,1,1189,4743,16, +0,632,1,102,4744, +16,0,632,1,1261, +4745,16,0,632,1, +322,4746,16,0,632, +1,1958,4747,16,0, +632,1,199,4748,16, +0,632,1,1371,4749, +16,0,632,1,217, +4750,16,0,632,1, +149,4751,19,725,1, +149,4752,5,2,1, +459,4753,16,0,723, +1,41,4754,16,0, +786,1,150,4755,19, +729,1,150,4756,5, +3,1,462,4757,16, +0,727,1,459,4758, +16,0,750,1,41, +4759,16,0,750,1, +151,4760,19,4761,4, +36,69,0,120,0, +112,0,114,0,101, +0,115,0,115,0, +105,0,111,0,110, +0,65,0,114,0, +103,0,117,0,109, +0,101,0,110,0, +116,0,1,151,4756, +1,152,4762,19,630, +1,152,4763,5,68, +1,1901,4764,16,0, +628,1,1479,4765,16, +0,628,1,112,4766, +16,0,628,1,2293, +4767,16,0,628,1, +1804,4768,16,0,628, +1,431,4769,16,0, +628,1,1443,4770,16, +0,628,1,1756,4771, +16,0,628,1,124, +4772,16,0,628,1, +525,4773,16,0,628, +1,236,4774,16,0, +628,1,346,4775,16, +0,628,1,1876,4776, +16,0,628,1,1659, +4777,16,0,628,1, +1225,4778,16,0,628, +1,1117,4779,16,0, +628,1,137,4780,16, +0,628,1,2318,4781, +16,0,628,1,1775, +4782,16,0,628,1, +32,4783,16,0,628, +1,1407,4784,16,0, +628,1,256,4785,16, +0,628,1,459,4786, +16,0,628,1,406, +4787,16,0,628,1, +41,4788,16,0,628, +1,151,4789,16,0, +628,1,43,4790,16, +0,628,1,1585,4791, +16,0,628,1,1990, +4792,16,0,628,1, +2337,4793,16,0,628, +1,509,4794,16,0, +628,1,52,4795,16, +0,628,1,381,4796, +16,0,628,1,447, +4797,16,0,628,1, +166,4798,16,0,628, +1,462,4799,16,0, +628,1,277,4800,16, +0,628,1,1695,4801, +16,0,628,1,2786, +4802,16,0,628,1, +62,4803,16,0,708, +1,1153,4804,16,0, +628,1,2106,4805,16, +0,628,1,1335,4806, +16,0,628,1,71, +4807,16,0,628,1, +182,4808,16,0,628, +1,76,4809,16,0, +628,1,79,4810,16, +0,628,1,1933,4811, +16,0,628,1,299, +4812,16,0,628,1, +85,4813,16,0,628, +1,1515,4814,16,0, +628,1,2198,4815,16, +0,628,1,89,4816, +16,0,628,1,1834, +4817,16,0,628,1, +1622,4818,16,0,628, +1,2413,4819,16,0, +628,1,2075,4820,16, +0,628,1,1731,4821, +16,0,628,1,97, +4822,16,0,628,1, +1297,4823,16,0,628, +1,1189,4824,16,0, +628,1,102,4825,16, +0,628,1,1261,4826, +16,0,628,1,322, +4827,16,0,628,1, +1958,4828,16,0,628, +1,199,4829,16,0, +628,1,1371,4830,16, +0,628,1,217,4831, +16,0,628,1,153, +4832,19,4833,4,28, +86,0,101,0,99, +0,116,0,111,0, +114,0,67,0,111, +0,110,0,115,0, +116,0,97,0,110, +0,116,0,1,153, +4763,1,154,4834,19, +4835,4,32,82,0, +111,0,116,0,97, +0,116,0,105,0, +111,0,110,0,67, 0,111,0,110,0, -65,0,114,0,103, -0,117,0,109,0, -101,0,110,0,116, -0,1,126,4269,1, -127,4275,19,544,1, -127,4276,5,68,1, -1901,4277,16,0,542, -1,1479,4278,16,0, -542,1,112,4279,16, -0,542,1,2293,4280, -16,0,542,1,1804, -4281,16,0,542,1, -431,4282,16,0,542, -1,1443,4283,16,0, -542,1,1756,4284,16, -0,542,1,124,4285, -16,0,542,1,525, -4286,16,0,542,1, -236,4287,16,0,542, -1,346,4288,16,0, -542,1,1876,4289,16, -0,542,1,1659,4290, -16,0,542,1,1225, -4291,16,0,542,1, -1117,4292,16,0,542, -1,137,4293,16,0, -542,1,2318,4294,16, -0,542,1,1775,4295, -16,0,542,1,32, -4296,16,0,542,1, -1407,4297,16,0,542, -1,256,4298,16,0, -542,1,459,4299,16, -0,542,1,406,4300, -16,0,542,1,41, -4301,16,0,542,1, -2658,4302,16,0,542, -1,43,4303,16,0, -542,1,1585,4304,16, -0,542,1,1990,4305, -16,0,542,1,2337, -4306,16,0,542,1, -509,4307,16,0,542, -1,52,4308,16,0, -542,1,151,4309,16, -0,542,1,447,4310, -16,0,542,1,166, -4311,16,0,542,1, -462,4312,16,0,542, -1,277,4313,16,0, -542,1,1695,4314,16, -0,542,1,62,4315, -16,0,587,1,1153, -4316,16,0,542,1, -381,4317,16,0,542, -1,2106,4318,16,0, -542,1,1335,4319,16, -0,542,1,71,4320, -16,0,542,1,182, -4321,16,0,542,1, -76,4322,16,0,542, -1,79,4323,16,0, -542,1,1933,4324,16, -0,542,1,299,4325, -16,0,542,1,85, -4326,16,0,542,1, -1515,4327,16,0,542, -1,2198,4328,16,0, -542,1,89,4329,16, -0,542,1,1834,4330, -16,0,542,1,1622, -4331,16,0,542,1, -2413,4332,16,0,542, -1,2075,4333,16,0, -542,1,1731,4334,16, -0,542,1,97,4335, -16,0,542,1,1297, -4336,16,0,542,1, -1189,4337,16,0,542, -1,102,4338,16,0, -542,1,1261,4339,16, -0,542,1,322,4340, -16,0,542,1,1958, -4341,16,0,542,1, -199,4342,16,0,542, -1,1371,4343,16,0, -542,1,217,4344,16, -0,542,1,128,4345, -19,4346,4,28,86, -0,101,0,99,0, -116,0,111,0,114, -0,67,0,111,0, -110,0,115,0,116, -0,97,0,110,0, -116,0,1,128,4276, -1,129,4347,19,4348, -4,32,82,0,111, -0,116,0,97,0, -116,0,105,0,111, -0,110,0,67,0, +115,0,116,0,97, +0,110,0,116,0, +1,154,4763,1,155, +4836,19,4837,4,24, +76,0,105,0,115, +0,116,0,67,0, 111,0,110,0,115, 0,116,0,97,0, 110,0,116,0,1, -129,4276,1,130,4349, -19,4350,4,24,76, -0,105,0,115,0, -116,0,67,0,111, -0,110,0,115,0, -116,0,97,0,110, -0,116,0,1,130, -4276,1,131,4351,19, -169,1,131,4352,5, -67,1,1901,4353,16, -0,585,1,1479,4354, -16,0,533,1,112, -4355,16,0,249,1, -2293,4356,16,0,273, -1,1804,4357,16,0, -585,1,431,4358,16, -0,580,1,1443,4359, -16,0,468,1,1756, -4360,16,0,673,1, -124,4361,16,0,258, -1,525,4362,16,0, -305,1,236,4363,16, -0,341,1,346,4364, -16,0,496,1,1876, -4365,16,0,318,1, -1659,4366,16,0,673, -1,1225,4367,16,0, -248,1,1117,4368,16, -0,219,1,137,4369, -16,0,272,1,2318, -4370,16,0,673,1, -1775,4371,16,0,585, -1,32,4372,16,0, -585,1,1407,4373,16, -0,487,1,256,4374, -16,0,395,1,459, -4375,16,0,167,1, -406,4376,16,0,562, -1,41,4377,16,0, -167,1,2658,4378,16, -0,659,1,43,4379, -16,0,640,1,1990, -4380,16,0,585,1, -2337,4381,16,0,585, -1,509,4382,16,0, -655,1,52,4383,16, -0,594,1,151,4384, -16,0,282,1,447, -4385,16,0,305,1, -166,4386,16,0,293, -1,462,4387,16,0, -167,1,277,4388,16, -0,434,1,1695,4389, -16,0,270,1,1261, -4390,16,0,281,1, -1153,4391,16,0,174, -1,381,4392,16,0, -550,1,2106,4393,16, -0,585,1,1335,4394, -16,0,326,1,71, -4395,16,0,203,1, -182,4396,16,0,305, -1,76,4397,16,0, -549,1,79,4398,16, -0,218,1,1933,4399, -16,0,407,1,299, -4400,16,0,444,1, -85,4401,16,0,457, -1,1515,4402,16,0, -556,1,2198,4403,16, -0,585,1,89,4404, -16,0,227,1,1834, -4405,16,0,292,1, -1622,4406,16,0,654, -1,2413,4407,16,0, -585,1,2075,4408,16, -0,585,1,1731,4409, -16,0,250,1,97, -4410,16,0,411,1, -1297,4411,16,0,328, -1,1189,4412,16,0, -217,1,102,4413,16, -0,238,1,1585,4414, -16,0,663,1,322, -4415,16,0,458,1, -1958,4416,16,0,585, -1,199,4417,16,0, -316,1,1371,4418,16, -0,396,1,217,4419, -16,0,325,1,132, -4420,19,4421,4,36, -67,0,111,0,110, -0,115,0,116,0, -97,0,110,0,116, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,1,132,4352,1, -133,4422,19,4423,4, -30,73,0,100,0, -101,0,110,0,116, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,1,133,4352,1, -134,4424,19,4425,4, -36,73,0,100,0, -101,0,110,0,116, -0,68,0,111,0, +155,4763,1,156,4838, +19,185,1,156,4839, +5,67,1,1901,4840, +16,0,705,1,1479, +4841,16,0,619,1, +112,4842,16,0,273, +1,2293,4843,16,0, +306,1,1804,4844,16, +0,705,1,431,4845, +16,0,700,1,1443, +4846,16,0,550,1, +1756,4847,16,0,796, +1,124,4848,16,0, +285,1,525,4849,16, +0,345,1,236,4850, +16,0,387,1,346, +4851,16,0,582,1, +1876,4852,16,0,361, +1,1659,4853,16,0, +796,1,1225,4854,16, +0,272,1,1117,4855, +16,0,242,1,137, +4856,16,0,305,1, +2318,4857,16,0,796, +1,1775,4858,16,0, +705,1,32,4859,16, +0,705,1,1407,4860, +16,0,571,1,256, +4861,16,0,441,1, +459,4862,16,0,183, +1,406,4863,16,0, +662,1,41,4864,16, +0,183,1,151,4865, +16,0,317,1,43, +4866,16,0,751,1, +1990,4867,16,0,705, +1,2337,4868,16,0, +705,1,509,4869,16, +0,774,1,52,4870, +16,0,717,1,381, +4871,16,0,639,1, +447,4872,16,0,345, +1,166,4873,16,0, +332,1,462,4874,16, +0,183,1,277,4875, +16,0,488,1,1695, +4876,16,0,302,1, +2786,4877,16,0,254, +1,1261,4878,16,0, +316,1,1153,4879,16, +0,190,1,2106,4880, +16,0,705,1,1335, +4881,16,0,372,1, +71,4882,16,0,226, +1,182,4883,16,0, +345,1,76,4884,16, +0,635,1,79,4885, +16,0,241,1,1933, +4886,16,0,453,1, +299,4887,16,0,517, +1,85,4888,16,0, +541,1,1515,4889,16, +0,657,1,2198,4890, +16,0,705,1,89, +4891,16,0,253,1, +1834,4892,16,0,330, +1,1622,4893,16,0, +773,1,2413,4894,16, +0,705,1,2075,4895, +16,0,705,1,1731, +4896,16,0,274,1, +97,4897,16,0,457, +1,1297,4898,16,0, +374,1,1189,4899,16, +0,240,1,102,4900, +16,0,262,1,1585, +4901,16,0,783,1, +322,4902,16,0,543, +1,1958,4903,16,0, +705,1,199,4904,16, +0,356,1,1371,4905, +16,0,442,1,217, +4906,16,0,368,1, +157,4907,19,4908,4, +36,67,0,111,0, +110,0,115,0,116, +0,97,0,110,0, 116,0,69,0,120, 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,1,134,4352, -1,135,4426,19,4427, -4,44,70,0,117, -0,110,0,99,0, -116,0,105,0,111, -0,110,0,67,0, -97,0,108,0,108, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,1,135,4352,1, -136,4428,19,4429,4, -32,66,0,105,0, -110,0,97,0,114, -0,121,0,69,0, -120,0,112,0,114, -0,101,0,115,0, -115,0,105,0,111, -0,110,0,1,136, -4352,1,137,4430,19, -4431,4,30,85,0, -110,0,97,0,114, -0,121,0,69,0, +110,0,1,157,4839, +1,158,4909,19,4910, +4,30,73,0,100, +0,101,0,110,0, +116,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,1,158,4839, +1,159,4911,19,4912, +4,36,73,0,100, +0,101,0,110,0, +116,0,68,0,111, +0,116,0,69,0, 120,0,112,0,114, 0,101,0,115,0, 115,0,105,0,111, -0,110,0,1,137, -4352,1,138,4432,19, -4433,4,36,84,0, -121,0,112,0,101, -0,99,0,97,0, -115,0,116,0,69, +0,110,0,1,159, +4839,1,160,4913,19, +4914,4,44,70,0, +117,0,110,0,99, +0,116,0,105,0, +111,0,110,0,67, +0,97,0,108,0, +108,0,69,0,120, +0,112,0,114,0, +101,0,115,0,115, +0,105,0,111,0, +110,0,1,160,4839, +1,161,4915,19,4916, +4,32,66,0,105, +0,110,0,97,0, +114,0,121,0,69, 0,120,0,112,0, 114,0,101,0,115, 0,115,0,105,0, 111,0,110,0,1, -138,4352,1,139,4434, -19,4435,4,42,80, -0,97,0,114,0, -101,0,110,0,116, -0,104,0,101,0, -115,0,105,0,115, -0,69,0,120,0, -112,0,114,0,101, -0,115,0,115,0, -105,0,111,0,110, -0,1,139,4352,1, -140,4436,19,4437,4, -56,73,0,110,0, -99,0,114,0,101, -0,109,0,101,0, -110,0,116,0,68, -0,101,0,99,0, -114,0,101,0,109, +161,4839,1,162,4917, +19,4918,4,30,85, +0,110,0,97,0, +114,0,121,0,69, +0,120,0,112,0, +114,0,101,0,115, +0,115,0,105,0, +111,0,110,0,1, +162,4839,1,163,4919, +19,4920,4,36,84, +0,121,0,112,0, +101,0,99,0,97, +0,115,0,116,0, +69,0,120,0,112, +0,114,0,101,0, +115,0,115,0,105, +0,111,0,110,0, +1,163,4839,1,164, +4921,19,4922,4,42, +80,0,97,0,114, 0,101,0,110,0, -116,0,69,0,120, +116,0,104,0,101, +0,115,0,105,0, +115,0,69,0,120, 0,112,0,114,0, 101,0,115,0,115, 0,105,0,111,0, -110,0,1,140,4352, -1,142,4438,19,683, -1,142,3911,1,143, -4439,19,705,1,143, -3911,1,144,4440,19, -3192,1,144,3914,1, -145,4441,19,3187,1, -145,3914,1,146,4442, -19,3198,1,146,3914, -1,147,4443,19,3209, -1,147,3914,1,148, -4444,19,3220,1,148, -3917,1,149,4445,19, -3226,1,149,3917,1, -150,4446,19,3214,1, -150,3921,1,151,4447, -19,3204,1,151,3921, -1,152,4448,19,689, -1,152,3925,1,153, -4449,19,710,1,153, -3925,1,154,4450,19, -695,1,154,3929,1, -155,4451,19,700,1, -155,3929,1,156,4452, -19,1636,1,156,3935, -1,157,4453,19,1631, -1,157,3935,1,158, -4454,19,1622,1,158, -3939,1,159,4455,19, -1680,1,159,3945,1, -160,4456,19,1657,1, -160,3945,1,161,4457, -19,1117,1,161,3950, -1,162,4458,19,902, -1,162,3995,1,163, -4459,19,886,1,163, -3995,1,164,4460,19, -892,1,164,4011,1, -165,4461,19,880,1, -165,4011,1,166,4462, -19,1145,1,166,4027, -1,167,4463,19,782, -1,167,4014,1,168, -4464,19,897,1,168, -4014,1,169,4465,19, -777,1,169,4014,1, -170,4466,19,802,1, -170,4014,1,171,4467, -19,771,1,171,4014, -1,172,4468,19,765, -1,172,4014,1,173, -4469,19,760,1,173, -4014,1,174,4470,19, -755,1,174,4014,1, -175,4471,19,749,1, -175,4014,1,176,4472, -19,744,1,176,4014, -1,177,4473,19,739, -1,177,4014,1,178, -4474,19,734,1,178, -4014,1,179,4475,19, -729,1,179,4014,1, -180,4476,19,1152,1, -180,4099,1,181,4477, -19,1290,1,181,4112, -1,182,4478,19,1139, -1,182,4125,1,183, -4479,19,1278,1,183, -4125,1,184,4480,19, -919,1,184,4138,1, -185,4481,19,722,1, -185,4138,1,186,4482, -19,817,1,186,4138, -1,187,4483,19,845, -1,187,4138,1,188, -4484,19,865,1,188, -4151,1,189,4485,19, -911,1,189,4151,1, -190,4486,19,825,1, -190,4164,1,191,4487, -19,838,1,191,4164, -1,192,4488,19,791, -1,192,4177,1,193, -4489,19,830,1,193, -4177,1,194,4490,19, -1477,1,194,4190,1, -195,4491,19,1158,1, -195,4190,1,196,4492, -19,1509,1,196,4190, -1,197,4493,19,1541, -1,197,4190,1,198, -4494,19,1406,1,198, -4040,1,199,4495,19, -1466,1,199,4040,1, -200,4496,19,1133,1, -200,4053,1,201,4497, -19,1573,1,201,4053, -1,202,4498,19,1504, -1,202,4053,1,203, -4499,19,1451,1,203, -4053,1,204,4500,19, -1374,1,204,4053,1, -205,4501,19,1300,1, -205,4053,1,206,4502, -19,1310,1,206,4053, -1,207,4503,19,1128, -1,207,4053,1,208, -4504,19,1557,1,208, -4053,1,209,4505,19, -1499,1,209,4053,1, -210,4506,19,1441,1, -210,4053,1,211,4507, -19,1363,1,211,4053, -1,212,4508,19,1326, -1,212,4053,1,213, -4509,19,1111,1,213, -4053,1,214,4510,19, -1461,1,214,4053,1, -215,4511,19,1487,1, -215,4053,1,216,4512, -19,1434,1,216,4053, -1,217,4513,19,1456, -1,217,4053,1,218, -4514,19,1266,1,218, -4053,1,219,4515,19, -1170,1,219,4053,1, -220,4516,19,1100,1, -220,4053,1,221,4517, -19,1531,1,221,4053, -1,222,4518,19,1482, -1,222,4053,1,223, -4519,19,1429,1,223, -4053,1,224,4520,19, -1295,1,224,4086,1, -225,4521,19,1273,1, -225,4086,1,226,4522, -19,1562,1,226,4276, -1,227,4523,19,1586, -1,227,4276,1,228, -4524,19,1552,1,228, -4276,1,229,4525,19, -1547,1,229,4276,1, -230,4526,19,1568,1, -230,4276,1,231,4527, -19,1515,1,231,4276, -1,232,4528,19,1220, -1,232,4276,1,233, -4529,19,1395,1,233, -4352,1,234,4530,19, -1181,1,234,4352,1, -235,4531,19,1188,1, -235,4352,1,236,4532, -19,1209,1,236,4352, -1,237,4533,19,1204, -1,237,4352,1,238, -4534,19,1199,1,238, -4352,1,239,4535,19, -1194,1,239,4352,1, -240,4536,19,1384,1, -240,4352,1,241,4537, -19,1412,1,241,4352, -1,242,4538,19,1389, -1,242,4352,1,243, -4539,19,1379,1,243, -4352,1,244,4540,19, -1369,1,244,4352,1, -245,4541,19,1352,1, -245,4352,1,246,4542, -19,1305,1,246,4352, -1,247,4543,19,1214, -1,247,4352,1,248, -4544,19,1175,1,248, -4352,1,249,4545,19, -1123,1,249,4352,1, -250,4546,19,1581,1, -250,4352,1,251,4547, -19,1536,1,251,4352, -1,252,4548,19,1526, -1,252,4352,1,253, -4549,19,1521,1,253, -4352,1,254,4550,19, -1472,1,254,4352,1, -255,4551,19,1446,1, -255,4352,1,256,4552, -19,1422,1,256,4352, -1,257,4553,19,1417, -1,257,4352,1,258, -4554,19,1358,1,258, -4352,1,259,4555,19, -1334,1,259,4352,1, -260,4556,19,1400,1, -260,4352,1,261,4557, -19,1493,1,261,4352, -1,262,4558,19,1347, -1,262,4352,1,263, -4559,19,1341,1,263, -4352,1,264,4560,19, -1321,1,264,4352,1, -265,4561,19,1284,1, -265,4352,1,266,4562, -19,1261,1,266,4352, -1,267,4563,19,1106, -1,267,4352,1,268, -4564,19,1596,1,268, -4352,1,269,4565,19, -1226,1,269,4352,1, -270,4566,19,1231,1, -270,4352,1,271,4567, -19,1251,1,271,4352, -1,272,4568,19,1241, -1,272,4352,1,273, -4569,19,1246,1,273, -4352,1,274,4570,19, -1236,1,274,4352,1, -275,4571,19,1591,1, -275,4352,1,276,4572, -19,1256,1,276,4352, -1,277,4573,19,1316, -1,277,4195,1,278, -4574,19,1650,1,278, -4265,1,279,4575,19, -1686,1,279,4265,1, -280,4576,19,1666,1, -280,4269,1,281,4577, -19,1985,1,281,3969, -1,282,4578,19,1980, -1,282,3969,1,283, -4579,19,1975,1,283, -3969,1,284,4580,19, -1970,1,284,3969,1, -285,4581,19,1965,1, -285,3969,1,286,4582, -19,1960,1,286,3969, -1,287,4583,19,1955, -1,287,3969,1,288, -4584,19,1944,1,288, -3989,1,289,4585,19, -1939,1,289,3989,1, -290,4586,19,1934,1, -290,3989,1,291,4587, -19,1929,1,291,3989, -1,292,4588,19,1924, -1,292,3989,1,293, -4589,19,1919,1,293, -3989,1,294,4590,19, -1914,1,294,3989,1, -295,4591,19,1909,1, -295,3989,1,296,4592, -19,1904,1,296,3989, -1,297,4593,19,1739, -1,297,3989,1,298, -4594,19,1898,1,298, -3989,1,299,4595,19, -1893,1,299,3989,1, -300,4596,19,1888,1, -300,3989,1,301,4597, -19,1732,1,301,3989, -1,302,4598,19,1883, -1,302,3989,1,303, -4599,19,1878,1,303, -3989,1,304,4600,19, -1873,1,304,3989,1, -305,4601,19,1868,1, -305,3989,1,306,4602, -19,1863,1,306,3989, -1,307,4603,19,1858, -1,307,3989,1,308, -4604,19,1725,1,308, -3989,1,309,4605,19, -1852,1,309,3989,1, -310,4606,19,1847,1, -310,3989,1,311,4607, -19,1842,1,311,3989, -1,312,4608,19,1719, -1,312,3989,1,313, -4609,19,1836,1,313, -3989,1,314,4610,19, -1767,1,314,3989,1, -315,4611,19,1831,1, -315,3989,1,316,4612, -19,1826,1,316,3989, -1,317,4613,19,1821, -1,317,3989,1,318, -4614,19,1816,1,318, -3989,1,319,4615,19, -1811,1,319,3989,1, -320,4616,19,1806,1, -320,3989,1,321,4617, -19,1801,1,321,3989, -1,322,4618,19,4619, -4,50,65,0,114, -0,103,0,117,0, +110,0,1,164,4839, +1,165,4923,19,4924, +4,56,73,0,110, +0,99,0,114,0, +101,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,114,0,101,0, 109,0,101,0,110, -0,116,0,68,0, -101,0,99,0,108, -0,97,0,114,0, -97,0,116,0,105, -0,111,0,110,0, +0,116,0,69,0, +120,0,112,0,114, +0,101,0,115,0, +115,0,105,0,111, +0,110,0,1,165, +4839,1,167,4925,19, +830,1,167,4269,1, +168,4926,19,808,1, +168,4269,1,169,4927, +19,3557,1,169,4272, +1,170,4928,19,3547, +1,170,4272,1,171, +4929,19,3552,1,171, +4272,1,172,4930,19, +3542,1,172,4272,1, +173,4931,19,3527,1, +173,4275,1,174,4932, +19,3562,1,174,4275, +1,175,4933,19,3521, +1,175,4279,1,176, +4934,19,3535,1,176, +4279,1,177,4935,19, +814,1,177,4283,1, +178,4936,19,825,1, +178,4283,1,179,4937, +19,820,1,179,4287, +1,180,4938,19,835, +1,180,4287,1,181, +4939,19,1777,1,181, +4293,1,182,4940,19, +1881,1,182,4293,1, +183,4941,19,1844,1, +183,4293,1,184,4942, +19,1765,1,184,4293, +1,185,4943,19,1839, +1,185,4293,1,186, +4944,19,1802,1,186, +4293,1,187,4945,19, +1834,1,187,4293,1, +188,4946,19,1797,1, +188,4293,1,189,4947, +19,1829,1,189,4293, +1,190,4948,19,1792, +1,190,4293,1,191, +4949,19,1824,1,191, +4293,1,192,4950,19, +1760,1,192,4293,1, +193,4951,19,1819,1, +193,4293,1,194,4952, +19,1787,1,194,4293, +1,195,4953,19,1814, +1,195,4293,1,196, +4954,19,1782,1,196, +4293,1,197,4955,19, +1875,1,197,4297,1, +198,4956,19,1862,1, +198,4303,1,199,4957, +19,1850,1,199,4309, +1,200,4958,19,1809, +1,200,4315,1,201, +4959,19,1868,1,201, +4321,1,202,4960,19, +1856,1,202,4327,1, +203,4961,19,1754,1, +203,4333,1,204,4962, +19,1771,1,204,4339, +1,205,4963,19,1945, +1,205,4345,1,206, +4964,19,1904,1,206, +4345,1,207,4965,19, +2337,1,207,4350,1, +208,4966,19,2308,1, +208,4353,1,209,4967, +19,2302,1,209,4356, +1,210,4968,19,2294, +1,210,4359,1,211, +4969,19,2287,1,211, +4362,1,212,4970,19, +2319,1,212,4365,1, +213,4971,19,1242,1, +213,4368,1,214,4972, +19,1964,1,214,4387, +1,215,4973,19,1890, +1,215,4391,1,216, +4974,19,1931,1,216, +4398,1,217,4975,19, +1910,1,217,4403,1, +218,4976,19,1027,1, +218,4475,1,219,4977, +19,1011,1,219,4475, +1,220,4978,19,1017, +1,220,4498,1,221, +4979,19,1005,1,221, +4498,1,222,4980,19, +1270,1,222,4514,1, +223,4981,19,907,1, +223,4501,1,224,4982, +19,1022,1,224,4501, +1,225,4983,19,902, +1,225,4501,1,226, +4984,19,927,1,226, +4501,1,227,4985,19, +896,1,227,4501,1, +228,4986,19,890,1, +228,4501,1,229,4987, +19,885,1,229,4501, +1,230,4988,19,880, +1,230,4501,1,231, +4989,19,874,1,231, +4501,1,232,4990,19, +869,1,232,4501,1, +233,4991,19,864,1, +233,4501,1,234,4992, +19,859,1,234,4501, +1,235,4993,19,854, +1,235,4501,1,236, +4994,19,1277,1,236, +4586,1,237,4995,19, +1417,1,237,4599,1, +238,4996,19,1264,1, +238,4612,1,239,4997, +19,1405,1,239,4612, +1,240,4998,19,1044, +1,240,4625,1,241, +4999,19,847,1,241, +4625,1,242,5000,19, +942,1,242,4625,1, +243,5001,19,971,1, +243,4625,1,244,5002, +19,990,1,244,4638, +1,245,5003,19,1036, +1,245,4638,1,246, +5004,19,950,1,246, +4651,1,247,5005,19, +964,1,247,4651,1, +248,5006,19,916,1, +248,4664,1,249,5007, +19,955,1,249,4664, +1,250,5008,19,1603, +1,250,4677,1,251, +5009,19,1283,1,251, +4677,1,252,5010,19, +1635,1,252,4677,1, +253,5011,19,1667,1, +253,4677,1,254,5012, +19,1532,1,254,4527, +1,255,5013,19,1592, +1,255,4527,1,256, +5014,19,1258,1,256, +4540,1,257,5015,19, +1699,1,257,4540,1, +258,5016,19,1630,1, +258,4540,1,259,5017, +19,1576,1,259,4540, +1,260,5018,19,1500, +1,260,4540,1,261, +5019,19,1427,1,261, +4540,1,262,5020,19, +1437,1,262,4540,1, +263,5021,19,1253,1, +263,4540,1,264,5022, +19,1683,1,264,4540, +1,265,5023,19,1625, +1,265,4540,1,266, +5024,19,1566,1,266, +4540,1,267,5025,19, +1489,1,267,4540,1, +268,5026,19,1453,1, +268,4540,1,269,5027, +19,1236,1,269,4540, +1,270,5028,19,1586, +1,270,4540,1,271, +5029,19,1613,1,271, +4540,1,272,5030,19, +1559,1,272,4540,1, +273,5031,19,1581,1, +273,4540,1,274,5032, +19,1393,1,274,4540, +1,275,5033,19,1297, +1,275,4540,1,276, +5034,19,1225,1,276, +4540,1,277,5035,19, +1657,1,277,4540,1, +278,5036,19,1608,1, +278,4540,1,279,5037, +19,1554,1,279,4540, +1,280,5038,19,1422, +1,280,4573,1,281, +5039,19,1400,1,281, +4573,1,282,5040,19, +1688,1,282,4763,1, +283,5041,19,1711,1, +283,4763,1,284,5042, +19,1678,1,284,4763, +1,285,5043,19,1673, +1,285,4763,1,286, +5044,19,1694,1,286, +4763,1,287,5045,19, +1641,1,287,4763,1, +288,5046,19,1347,1, +288,4763,1,289,5047, +19,1521,1,289,4839, +1,290,5048,19,1308, +1,290,4839,1,291, +5049,19,1315,1,291, +4839,1,292,5050,19, +1336,1,292,4839,1, +293,5051,19,1331,1, +293,4839,1,294,5052, +19,1326,1,294,4839, +1,295,5053,19,1321, +1,295,4839,1,296, +5054,19,1510,1,296, +4839,1,297,5055,19, +1538,1,297,4839,1, +298,5056,19,1515,1, +298,4839,1,299,5057, +19,1505,1,299,4839, +1,300,5058,19,1495, +1,300,4839,1,301, +5059,19,1478,1,301, +4839,1,302,5060,19, +1432,1,302,4839,1, +303,5061,19,1341,1, +303,4839,1,304,5062, +19,1302,1,304,4839, +1,305,5063,19,1248, +1,305,4839,1,306, +5064,19,1706,1,306, +4839,1,307,5065,19, +1662,1,307,4839,1, +308,5066,19,1652,1, +308,4839,1,309,5067, +19,1647,1,309,4839, +1,310,5068,19,1598, +1,310,4839,1,311, +5069,19,1571,1,311, +4839,1,312,5070,19, +1548,1,312,4839,1, +313,5071,19,1543,1, +313,4839,1,314,5072, +19,1484,1,314,4839, +1,315,5073,19,1460, +1,315,4839,1,316, +5074,19,1526,1,316, +4839,1,317,5075,19, +1619,1,317,4839,1, +318,5076,19,1473,1, +318,4839,1,319,5077, +19,1467,1,319,4839, +1,320,5078,19,1448, +1,320,4839,1,321, +5079,19,1411,1,321, +4839,1,322,5080,19, +1388,1,322,4839,1, +323,5081,19,1231,1, +323,4839,1,324,5082, +19,1721,1,324,4839, +1,325,5083,19,1353, +1,325,4839,1,326, +5084,19,1358,1,326, +4839,1,327,5085,19, +1378,1,327,4839,1, +328,5086,19,1368,1, +328,4839,1,329,5087, +19,1373,1,329,4839, +1,330,5088,19,1363, +1,330,4839,1,331, +5089,19,1716,1,331, +4839,1,332,5090,19, +1383,1,332,4839,1, +333,5091,19,1443,1, +333,4682,1,334,5092, +19,1958,1,334,4752, +1,335,5093,19,1951, +1,335,4752,1,336, +5094,19,1921,1,336, +4756,1,337,5095,19, +2278,1,337,4407,1, +338,5096,19,2273,1, +338,4407,1,339,5097, +19,2268,1,339,4407, +1,340,5098,19,2263, +1,340,4407,1,341, +5099,19,2258,1,341, +4407,1,342,5100,19, +2253,1,342,4407,1, +343,5101,19,2248,1, +343,4407,1,344,5102, +19,2237,1,344,4427, +1,345,5103,19,2232, +1,345,4427,1,346, +5104,19,2227,1,346, +4427,1,347,5105,19, +2222,1,347,4427,1, +348,5106,19,2217,1, +348,4427,1,349,5107, +19,2212,1,349,4427, +1,350,5108,19,2207, +1,350,4427,1,351, +5109,19,2202,1,351, +4427,1,352,5110,19, +2197,1,352,4427,1, +353,5111,19,2191,1, +353,4433,1,354,5112, +19,2019,1,354,4433, +1,355,5113,19,2185, +1,355,4433,1,356, +5114,19,2180,1,356, +4433,1,357,5115,19, +2175,1,357,4433,1, +358,5116,19,2012,1, +358,4433,1,359,5117, +19,2170,1,359,4433, +1,360,5118,19,2165, +1,360,4433,1,361, +5119,19,2160,1,361, +4439,1,362,5120,19, +2155,1,362,4439,1, +363,5121,19,2149,1, +363,4445,1,364,5122, +19,2144,1,364,4445, +1,365,5123,19,2004, +1,365,4445,1,366, +5124,19,2138,1,366, +4445,1,367,5125,19, +2133,1,367,4445,1, +368,5126,19,2128,1, +368,4445,1,369,5127, +19,1997,1,369,4445, +1,370,5128,19,2122, +1,370,4445,1,371, +5129,19,2049,1,371, +4445,1,372,5130,19, +2117,1,372,4445,1, +373,5131,19,2112,1, +373,4451,1,374,5132, +19,2107,1,374,4451, +1,375,5133,19,2102, +1,375,4451,1,376, +5134,19,2096,1,376, +4457,1,377,5135,19, +2090,1,377,4463,1, +378,5136,19,2084,1, +378,4469,1,379,5137, +19,5138,4,50,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, +68,0,101,0,99, +0,108,0,97,0, +114,0,97,0,116, +0,105,0,111,0, +110,0,76,0,105, +0,115,0,116,0, +95,0,51,0,1, +379,4345,1,380,5139, +19,5140,4,28,65, +0,114,0,103,0, +117,0,109,0,101, +0,110,0,116,0, 76,0,105,0,115, 0,116,0,95,0, -51,0,1,322,3945, -1,323,4620,19,4621, +51,0,1,380,4752, +1,381,5141,19,5142, 4,28,65,0,114, 0,103,0,117,0, 109,0,101,0,110, 0,116,0,76,0, 105,0,115,0,116, -0,95,0,51,0, -1,323,4265,1,324, -4622,19,4623,4,50, +0,95,0,52,0, +1,381,4752,1,382, +5143,19,5144,4,50, 65,0,114,0,103, 0,117,0,109,0, 101,0,110,0,116, @@ -10759,32 +12939,29 @@ public yyLSLSyntax 0,110,0,76,0, 105,0,115,0,116, 0,95,0,52,0, -1,324,3945,1,325, -4624,19,4625,4,28, +1,382,4345,1,383, +5145,19,5146,4,50, 65,0,114,0,103, 0,117,0,109,0, 101,0,110,0,116, -0,76,0,105,0, -115,0,116,0,95, -0,52,0,1,325, -4265,1,326,4626,19, -4627,4,50,65,0, -114,0,103,0,117, -0,109,0,101,0, -110,0,116,0,68, -0,101,0,99,0, -108,0,97,0,114, -0,97,0,116,0, -105,0,111,0,110, -0,76,0,105,0, -115,0,116,0,95, -0,53,0,1,326, -3945,2,0,0}; +0,68,0,101,0, +99,0,108,0,97, +0,114,0,97,0, +116,0,105,0,111, +0,110,0,76,0, +105,0,115,0,116, +0,95,0,53,0, +1,383,4345,2,0,0}; new Sfactory(this,"ExpressionArgument_1",new SCreator(ExpressionArgument_1_factory)); -new Sfactory(this,"SimpleAssignment_8",new SCreator(SimpleAssignment_8_factory)); +new Sfactory(this,"VectorArgStateEvent",new SCreator(VectorArgStateEvent_factory)); +new Sfactory(this,"IntVecVecArgStateEvent",new SCreator(IntVecVecArgStateEvent_factory)); +new Sfactory(this,"IntArgStateEvent_1",new SCreator(IntArgStateEvent_1_factory)); +new Sfactory(this,"SimpleAssignment_9",new SCreator(SimpleAssignment_9_factory)); new Sfactory(this,"StatementList_1",new SCreator(StatementList_1_factory)); +new Sfactory(this,"RotDeclaration_1",new SCreator(RotDeclaration_1_factory)); +new Sfactory(this,"IntRotRotArgEvent_1",new SCreator(IntRotRotArgEvent_1_factory)); new Sfactory(this,"StateChange_1",new SCreator(StateChange_1_factory)); -new Sfactory(this,"StateChange_2",new SCreator(StateChange_2_factory)); +new Sfactory(this,"EmptyStatement",new SCreator(EmptyStatement_factory)); new Sfactory(this,"Declaration",new SCreator(Declaration_factory)); new Sfactory(this,"IdentExpression",new SCreator(IdentExpression_factory)); new Sfactory(this,"error",new SCreator(error_factory)); @@ -10797,20 +12974,25 @@ new Sfactory(this,"SimpleAssignment_19",new SCreator(SimpleAssignment_19_factory new Sfactory(this,"BinaryExpression_9",new SCreator(BinaryExpression_9_factory)); new Sfactory(this,"VectorConstant_1",new SCreator(VectorConstant_1_factory)); new Sfactory(this,"ParenthesisExpression",new SCreator(ParenthesisExpression_factory)); +new Sfactory(this,"StatementList",new SCreator(StatementList_factory)); +new Sfactory(this,"IntRotRotArgEvent",new SCreator(IntRotRotArgEvent_factory)); new Sfactory(this,"UnaryExpression",new SCreator(UnaryExpression_factory)); new Sfactory(this,"IdentDotExpression_1",new SCreator(IdentDotExpression_1_factory)); new Sfactory(this,"ArgumentList_4",new SCreator(ArgumentList_4_factory)); new Sfactory(this,"Typename",new SCreator(Typename_factory)); new Sfactory(this,"IfStatement_1",new SCreator(IfStatement_1_factory)); +new Sfactory(this,"RotationConstant_1",new SCreator(RotationConstant_1_factory)); new Sfactory(this,"Assignment",new SCreator(Assignment_factory)); +new Sfactory(this,"IfStatement_4",new SCreator(IfStatement_4_factory)); new Sfactory(this,"CompoundStatement_1",new SCreator(CompoundStatement_1_factory)); new Sfactory(this,"CompoundStatement_2",new SCreator(CompoundStatement_2_factory)); +new Sfactory(this,"KeyIntIntArgumentDeclarationList_1",new SCreator(KeyIntIntArgumentDeclarationList_1_factory)); new Sfactory(this,"BinaryExpression_8",new SCreator(BinaryExpression_8_factory)); +new Sfactory(this,"VectorArgEvent",new SCreator(VectorArgEvent_factory)); new Sfactory(this,"ReturnStatement_1",new SCreator(ReturnStatement_1_factory)); new Sfactory(this,"IdentDotExpression",new SCreator(IdentDotExpression_factory)); new Sfactory(this,"Argument",new SCreator(Argument_factory)); new Sfactory(this,"State_2",new SCreator(State_2_factory)); -new Sfactory(this,"WhileStatement_1",new SCreator(WhileStatement_1_factory)); new Sfactory(this,"GlobalDefinitions_3",new SCreator(GlobalDefinitions_3_factory)); new Sfactory(this,"GlobalDefinitions_4",new SCreator(GlobalDefinitions_4_factory)); new Sfactory(this,"Event_1",new SCreator(Event_1_factory)); @@ -10820,9 +13002,9 @@ new Sfactory(this,"Event_4",new SCreator(Event_4_factory)); new Sfactory(this,"Event_5",new SCreator(Event_5_factory)); new Sfactory(this,"SimpleAssignment_5",new SCreator(SimpleAssignment_5_factory)); new Sfactory(this,"Typename_1",new SCreator(Typename_1_factory)); -new Sfactory(this,"Typename_2",new SCreator(Typename_2_factory)); +new Sfactory(this,"VoidArgStateEvent_1",new SCreator(VoidArgStateEvent_1_factory)); new Sfactory(this,"Typename_3",new SCreator(Typename_3_factory)); -new Sfactory(this,"Typename_4",new SCreator(Typename_4_factory)); +new Sfactory(this,"IntRotRotArgStateEvent",new SCreator(IntRotRotArgStateEvent_factory)); new Sfactory(this,"Typename_5",new SCreator(Typename_5_factory)); new Sfactory(this,"Typename_6",new SCreator(Typename_6_factory)); new Sfactory(this,"Typename_7",new SCreator(Typename_7_factory)); @@ -10830,10 +13012,16 @@ new Sfactory(this,"ArgumentDeclarationList",new SCreator(ArgumentDeclarationList new Sfactory(this,"ConstantExpression",new SCreator(ConstantExpression_factory)); new Sfactory(this,"LSLProgramRoot_1",new SCreator(LSLProgramRoot_1_factory)); new Sfactory(this,"LSLProgramRoot_2",new SCreator(LSLProgramRoot_2_factory)); +new Sfactory(this,"KeyIntIntArgEvent_1",new SCreator(KeyIntIntArgEvent_1_factory)); new Sfactory(this,"States_1",new SCreator(States_1_factory)); new Sfactory(this,"States_2",new SCreator(States_2_factory)); new Sfactory(this,"FunctionCallExpression_1",new SCreator(FunctionCallExpression_1_factory)); +new Sfactory(this,"KeyArgEvent_1",new SCreator(KeyArgEvent_1_factory)); new Sfactory(this,"ForLoopStatement",new SCreator(ForLoopStatement_factory)); +new Sfactory(this,"IntArgStateEvent",new SCreator(IntArgStateEvent_factory)); +new Sfactory(this,"StateBody_15",new SCreator(StateBody_15_factory)); +new Sfactory(this,"IntRotRotArgumentDeclarationList_1",new SCreator(IntRotRotArgumentDeclarationList_1_factory)); +new Sfactory(this,"IntArgEvent_9",new SCreator(IntArgEvent_9_factory)); new Sfactory(this,"DoWhileStatement_1",new SCreator(DoWhileStatement_1_factory)); new Sfactory(this,"DoWhileStatement_2",new SCreator(DoWhileStatement_2_factory)); new Sfactory(this,"ForLoopStatement_4",new SCreator(ForLoopStatement_4_factory)); @@ -10842,74 +13030,93 @@ new Sfactory(this,"SimpleAssignment_12",new SCreator(SimpleAssignment_12_factory new Sfactory(this,"SimpleAssignment_13",new SCreator(SimpleAssignment_13_factory)); new Sfactory(this,"JumpLabel",new SCreator(JumpLabel_factory)); new Sfactory(this,"SimpleAssignment_15",new SCreator(SimpleAssignment_15_factory)); -new Sfactory(this,"SimpleAssignment_17",new SCreator(SimpleAssignment_17_factory)); -new Sfactory(this,"SimpleAssignment_18",new SCreator(SimpleAssignment_18_factory)); -new Sfactory(this,"JumpStatement_1",new SCreator(JumpStatement_1_factory)); +new Sfactory(this,"IntVecVecArgEvent",new SCreator(IntVecVecArgEvent_factory)); +new Sfactory(this,"VecDeclaration",new SCreator(VecDeclaration_factory)); +new Sfactory(this,"StateBody_14",new SCreator(StateBody_14_factory)); new Sfactory(this,"GlobalDefinitions",new SCreator(GlobalDefinitions_factory)); +new Sfactory(this,"StateBody_16",new SCreator(StateBody_16_factory)); +new Sfactory(this,"KeyIntIntArgumentDeclarationList",new SCreator(KeyIntIntArgumentDeclarationList_factory)); +new Sfactory(this,"ConstantExpression_1",new SCreator(ConstantExpression_1_factory)); +new Sfactory(this,"VoidArgEvent_4",new SCreator(VoidArgEvent_4_factory)); new Sfactory(this,"FunctionCall_1",new SCreator(FunctionCall_1_factory)); -new Sfactory(this,"ArgumentList_3",new SCreator(ArgumentList_3_factory)); +new Sfactory(this,"Assignment_1",new SCreator(Assignment_1_factory)); new Sfactory(this,"Assignment_2",new SCreator(Assignment_2_factory)); +new Sfactory(this,"IntVecVecArgEvent_1",new SCreator(IntVecVecArgEvent_1_factory)); new Sfactory(this,"TypecastExpression_1",new SCreator(TypecastExpression_1_factory)); new Sfactory(this,"SimpleAssignment_21",new SCreator(SimpleAssignment_21_factory)); new Sfactory(this,"SimpleAssignment_22",new SCreator(SimpleAssignment_22_factory)); -new Sfactory(this,"SimpleAssignment_23",new SCreator(SimpleAssignment_23_factory)); +new Sfactory(this,"KeyIntIntArgStateEvent",new SCreator(KeyIntIntArgStateEvent_factory)); new Sfactory(this,"TypecastExpression_9",new SCreator(TypecastExpression_9_factory)); +new Sfactory(this,"VoidArgEvent_2",new SCreator(VoidArgEvent_2_factory)); +new Sfactory(this,"Event_9",new SCreator(Event_9_factory)); new Sfactory(this,"ArgumentDeclarationList_1",new SCreator(ArgumentDeclarationList_1_factory)); new Sfactory(this,"ArgumentDeclarationList_2",new SCreator(ArgumentDeclarationList_2_factory)); -new Sfactory(this,"ArgumentDeclarationList_3",new SCreator(ArgumentDeclarationList_3_factory)); new Sfactory(this,"GlobalDefinitions_1",new SCreator(GlobalDefinitions_1_factory)); new Sfactory(this,"GlobalDefinitions_2",new SCreator(GlobalDefinitions_2_factory)); new Sfactory(this,"IncrementDecrementExpression",new SCreator(IncrementDecrementExpression_factory)); new Sfactory(this,"GlobalVariableDeclaration",new SCreator(GlobalVariableDeclaration_factory)); -new Sfactory(this,"Event_11",new SCreator(Event_11_factory)); +new Sfactory(this,"IntArgumentDeclarationList_1",new SCreator(IntArgumentDeclarationList_1_factory)); +new Sfactory(this,"IntDeclaration_1",new SCreator(IntDeclaration_1_factory)); +new Sfactory(this,"ArgumentDeclarationList_5",new SCreator(ArgumentDeclarationList_5_factory)); +new Sfactory(this,"IntVecVecArgumentDeclarationList",new SCreator(IntVecVecArgumentDeclarationList_factory)); +new Sfactory(this,"VectorArgumentDeclarationList_1",new SCreator(VectorArgumentDeclarationList_1_factory)); +new Sfactory(this,"KeyArgumentDeclarationList",new SCreator(KeyArgumentDeclarationList_factory)); new Sfactory(this,"TypecastExpression_2",new SCreator(TypecastExpression_2_factory)); -new Sfactory(this,"TypecastExpression_3",new SCreator(TypecastExpression_3_factory)); +new Sfactory(this,"KeyArgStateEvent",new SCreator(KeyArgStateEvent_factory)); new Sfactory(this,"TypecastExpression_5",new SCreator(TypecastExpression_5_factory)); new Sfactory(this,"TypecastExpression_8",new SCreator(TypecastExpression_8_factory)); new Sfactory(this,"Constant_1",new SCreator(Constant_1_factory)); new Sfactory(this,"Expression",new SCreator(Expression_factory)); new Sfactory(this,"Constant_3",new SCreator(Constant_3_factory)); new Sfactory(this,"Constant_4",new SCreator(Constant_4_factory)); +new Sfactory(this,"IntArgEvent_5",new SCreator(IntArgEvent_5_factory)); new Sfactory(this,"BinaryExpression_1",new SCreator(BinaryExpression_1_factory)); new Sfactory(this,"IfStatement_2",new SCreator(IfStatement_2_factory)); new Sfactory(this,"IfStatement_3",new SCreator(IfStatement_3_factory)); -new Sfactory(this,"IfStatement_4",new SCreator(IfStatement_4_factory)); -new Sfactory(this,"ReturnStatement",new SCreator(ReturnStatement_factory)); +new Sfactory(this,"KeyArgEvent",new SCreator(KeyArgEvent_factory)); new Sfactory(this,"Event_2",new SCreator(Event_2_factory)); +new Sfactory(this,"JumpLabel_1",new SCreator(JumpLabel_1_factory)); new Sfactory(this,"RotationConstant",new SCreator(RotationConstant_factory)); new Sfactory(this,"Statement_12",new SCreator(Statement_12_factory)); +new Sfactory(this,"Statement_13",new SCreator(Statement_13_factory)); new Sfactory(this,"UnaryExpression_1",new SCreator(UnaryExpression_1_factory)); new Sfactory(this,"UnaryExpression_2",new SCreator(UnaryExpression_2_factory)); new Sfactory(this,"UnaryExpression_3",new SCreator(UnaryExpression_3_factory)); new Sfactory(this,"ArgumentList_1",new SCreator(ArgumentList_1_factory)); -new Sfactory(this,"ArgumentList_2",new SCreator(ArgumentList_2_factory)); +new Sfactory(this,"KeyIntIntArgEvent",new SCreator(KeyIntIntArgEvent_factory)); +new Sfactory(this,"ArgumentList_3",new SCreator(ArgumentList_3_factory)); new Sfactory(this,"Constant",new SCreator(Constant_factory)); new Sfactory(this,"State",new SCreator(State_factory)); -new Sfactory(this,"Event_13",new SCreator(Event_13_factory)); +new Sfactory(this,"StateBody_13",new SCreator(StateBody_13_factory)); +new Sfactory(this,"KeyArgStateEvent_1",new SCreator(KeyArgStateEvent_1_factory)); +new Sfactory(this,"SimpleAssignment_8",new SCreator(SimpleAssignment_8_factory)); new Sfactory(this,"LSLProgramRoot",new SCreator(LSLProgramRoot_factory)); new Sfactory(this,"StateChange",new SCreator(StateChange_factory)); -new Sfactory(this,"IncrementDecrementExpression_2",new SCreator(IncrementDecrementExpression_2_factory)); +new Sfactory(this,"VecDeclaration_1",new SCreator(VecDeclaration_1_factory)); new Sfactory(this,"GlobalVariableDeclaration_1",new SCreator(GlobalVariableDeclaration_1_factory)); new Sfactory(this,"GlobalVariableDeclaration_2",new SCreator(GlobalVariableDeclaration_2_factory)); new Sfactory(this,"IncrementDecrementExpression_5",new SCreator(IncrementDecrementExpression_5_factory)); -new Sfactory(this,"GlobalFunctionDefinition_2",new SCreator(GlobalFunctionDefinition_2_factory)); -new Sfactory(this,"IncrementDecrementExpression_7",new SCreator(IncrementDecrementExpression_7_factory)); -new Sfactory(this,"IncrementDecrementExpression_8",new SCreator(IncrementDecrementExpression_8_factory)); -new Sfactory(this,"Assignment_1",new SCreator(Assignment_1_factory)); -new Sfactory(this,"Event_21",new SCreator(Event_21_factory)); -new Sfactory(this,"Event_22",new SCreator(Event_22_factory)); +new Sfactory(this,"ReturnStatement",new SCreator(ReturnStatement_factory)); +new Sfactory(this,"StateBody_10",new SCreator(StateBody_10_factory)); +new Sfactory(this,"StateBody_11",new SCreator(StateBody_11_factory)); +new Sfactory(this,"StateBody_12",new SCreator(StateBody_12_factory)); +new Sfactory(this,"IntVecVecArgStateEvent_1",new SCreator(IntVecVecArgStateEvent_1_factory)); +new Sfactory(this,"KeyDeclaration",new SCreator(KeyDeclaration_factory)); +new Sfactory(this,"IntArgEvent_6",new SCreator(IntArgEvent_6_factory)); +new Sfactory(this,"ArgumentDeclarationList_3",new SCreator(ArgumentDeclarationList_3_factory)); +new Sfactory(this,"ArgumentList_2",new SCreator(ArgumentList_2_factory)); +new Sfactory(this,"IntArgEvent_10",new SCreator(IntArgEvent_10_factory)); new Sfactory(this,"CompoundStatement",new SCreator(CompoundStatement_factory)); -new Sfactory(this,"RotationConstant_1",new SCreator(RotationConstant_1_factory)); -new Sfactory(this,"TypecastExpression",new SCreator(TypecastExpression_factory)); +new Sfactory(this,"TypecastExpression_3",new SCreator(TypecastExpression_3_factory)); +new Sfactory(this,"IntArgumentDeclarationList",new SCreator(IntArgumentDeclarationList_factory)); +new Sfactory(this,"ArgumentDeclarationList_4",new SCreator(ArgumentDeclarationList_4_factory)); new Sfactory(this,"SimpleAssignment_3",new SCreator(SimpleAssignment_3_factory)); new Sfactory(this,"SimpleAssignment_4",new SCreator(SimpleAssignment_4_factory)); new Sfactory(this,"Statement_1",new SCreator(Statement_1_factory)); new Sfactory(this,"Statement_2",new SCreator(Statement_2_factory)); -new Sfactory(this,"Statement_3",new SCreator(Statement_3_factory)); new Sfactory(this,"Statement_4",new SCreator(Statement_4_factory)); new Sfactory(this,"Statement_5",new SCreator(Statement_5_factory)); new Sfactory(this,"Statement_6",new SCreator(Statement_6_factory)); -new Sfactory(this,"Statement_7",new SCreator(Statement_7_factory)); new Sfactory(this,"Statement_8",new SCreator(Statement_8_factory)); new Sfactory(this,"Statement_9",new SCreator(Statement_9_factory)); new Sfactory(this,"ExpressionArgument",new SCreator(ExpressionArgument_factory)); @@ -10922,27 +13129,35 @@ new Sfactory(this,"StateBody",new SCreator(StateBody_factory)); new Sfactory(this,"Event_7",new SCreator(Event_7_factory)); new Sfactory(this,"Event_8",new SCreator(Event_8_factory)); new Sfactory(this,"IncrementDecrementExpression_1",new SCreator(IncrementDecrementExpression_1_factory)); -new Sfactory(this,"IncrementDecrementExpression_3",new SCreator(IncrementDecrementExpression_3_factory)); +new Sfactory(this,"IncrementDecrementExpression_2",new SCreator(IncrementDecrementExpression_2_factory)); +new Sfactory(this,"IntVecVecArgumentDeclarationList_1",new SCreator(IntVecVecArgumentDeclarationList_1_factory)); new Sfactory(this,"IncrementDecrementExpression_4",new SCreator(IncrementDecrementExpression_4_factory)); new Sfactory(this,"IncrementDecrementExpression_6",new SCreator(IncrementDecrementExpression_6_factory)); +new Sfactory(this,"IncrementDecrementExpression_7",new SCreator(IncrementDecrementExpression_7_factory)); new Sfactory(this,"StateEvent",new SCreator(StateEvent_factory)); -new Sfactory(this,"Event_20",new SCreator(Event_20_factory)); -new Sfactory(this,"Event_23",new SCreator(Event_23_factory)); -new Sfactory(this,"Event_24",new SCreator(Event_24_factory)); -new Sfactory(this,"Event_26",new SCreator(Event_26_factory)); +new Sfactory(this,"IntArgEvent_3",new SCreator(IntArgEvent_3_factory)); +new Sfactory(this,"IntArgEvent_4",new SCreator(IntArgEvent_4_factory)); +new Sfactory(this,"KeyDeclaration_1",new SCreator(KeyDeclaration_1_factory)); +new Sfactory(this,"Statement_3",new SCreator(Statement_3_factory)); +new Sfactory(this,"IntArgEvent_7",new SCreator(IntArgEvent_7_factory)); +new Sfactory(this,"IntArgEvent_8",new SCreator(IntArgEvent_8_factory)); new Sfactory(this,"SimpleAssignment_10",new SCreator(SimpleAssignment_10_factory)); +new Sfactory(this,"StatementList_2",new SCreator(StatementList_2_factory)); +new Sfactory(this,"IntRotRotArgStateEvent_1",new SCreator(IntRotRotArgStateEvent_1_factory)); +new Sfactory(this,"VectorArgEvent_2",new SCreator(VectorArgEvent_2_factory)); new Sfactory(this,"Event",new SCreator(Event_factory)); new Sfactory(this,"SimpleAssignment_14",new SCreator(SimpleAssignment_14_factory)); new Sfactory(this,"SimpleAssignment_16",new SCreator(SimpleAssignment_16_factory)); +new Sfactory(this,"SimpleAssignment_17",new SCreator(SimpleAssignment_17_factory)); +new Sfactory(this,"SimpleAssignment_18",new SCreator(SimpleAssignment_18_factory)); new Sfactory(this,"Statement_10",new SCreator(Statement_10_factory)); new Sfactory(this,"Statement_11",new SCreator(Statement_11_factory)); new Sfactory(this,"SimpleAssignment",new SCreator(SimpleAssignment_factory)); -new Sfactory(this,"Statement_13",new SCreator(Statement_13_factory)); -new Sfactory(this,"Event_15",new SCreator(Event_15_factory)); -new Sfactory(this,"Event_16",new SCreator(Event_16_factory)); -new Sfactory(this,"Event_32",new SCreator(Event_32_factory)); -new Sfactory(this,"Event_34",new SCreator(Event_34_factory)); +new Sfactory(this,"TypecastExpression",new SCreator(TypecastExpression_factory)); +new Sfactory(this,"JumpStatement_1",new SCreator(JumpStatement_1_factory)); new Sfactory(this,"SimpleAssignment_20",new SCreator(SimpleAssignment_20_factory)); +new Sfactory(this,"Statement_7",new SCreator(Statement_7_factory)); +new Sfactory(this,"SimpleAssignment_23",new SCreator(SimpleAssignment_23_factory)); new Sfactory(this,"SimpleAssignment_24",new SCreator(SimpleAssignment_24_factory)); new Sfactory(this,"SimpleAssignment_1",new SCreator(SimpleAssignment_1_factory)); new Sfactory(this,"SimpleAssignment_2",new SCreator(SimpleAssignment_2_factory)); @@ -10950,73 +13165,91 @@ new Sfactory(this,"BinaryExpression",new SCreator(BinaryExpression_factory)); new Sfactory(this,"FunctionCallExpression",new SCreator(FunctionCallExpression_factory)); new Sfactory(this,"SimpleAssignment_6",new SCreator(SimpleAssignment_6_factory)); new Sfactory(this,"StateBody_1",new SCreator(StateBody_1_factory)); -new Sfactory(this,"StatementList_2",new SCreator(StatementList_2_factory)); -new Sfactory(this,"SimpleAssignment_9",new SCreator(SimpleAssignment_9_factory)); -new Sfactory(this,"BinaryExpression_15",new SCreator(BinaryExpression_15_factory)); -new Sfactory(this,"BinaryExpression_16",new SCreator(BinaryExpression_16_factory)); -new Sfactory(this,"BinaryExpression_17",new SCreator(BinaryExpression_17_factory)); -new Sfactory(this,"BinaryExpression_18",new SCreator(BinaryExpression_18_factory)); -new Sfactory(this,"Event_25",new SCreator(Event_25_factory)); -new Sfactory(this,"Event_9",new SCreator(Event_9_factory)); +new Sfactory(this,"StateBody_2",new SCreator(StateBody_2_factory)); +new Sfactory(this,"StateBody_3",new SCreator(StateBody_3_factory)); +new Sfactory(this,"StateBody_4",new SCreator(StateBody_4_factory)); +new Sfactory(this,"StateBody_5",new SCreator(StateBody_5_factory)); +new Sfactory(this,"StateBody_6",new SCreator(StateBody_6_factory)); +new Sfactory(this,"StateBody_7",new SCreator(StateBody_7_factory)); +new Sfactory(this,"StateBody_8",new SCreator(StateBody_8_factory)); +new Sfactory(this,"StateBody_9",new SCreator(StateBody_9_factory)); new Sfactory(this,"Statement",new SCreator(Statement_factory)); +new Sfactory(this,"IncrementDecrementExpression_3",new SCreator(IncrementDecrementExpression_3_factory)); new Sfactory(this,"JumpStatement",new SCreator(JumpStatement_factory)); new Sfactory(this,"BinaryExpression_11",new SCreator(BinaryExpression_11_factory)); -new Sfactory(this,"BinaryExpression_12",new SCreator(BinaryExpression_12_factory)); -new Sfactory(this,"BinaryExpression_13",new SCreator(BinaryExpression_13_factory)); +new Sfactory(this,"IntArgEvent",new SCreator(IntArgEvent_factory)); +new Sfactory(this,"IncrementDecrementExpression_8",new SCreator(IncrementDecrementExpression_8_factory)); new Sfactory(this,"BinaryExpression_14",new SCreator(BinaryExpression_14_factory)); +new Sfactory(this,"BinaryExpression_15",new SCreator(BinaryExpression_15_factory)); +new Sfactory(this,"BinaryExpression_16",new SCreator(BinaryExpression_16_factory)); new Sfactory(this,"BinaryExpression_6",new SCreator(BinaryExpression_6_factory)); new Sfactory(this,"BinaryExpression_7",new SCreator(BinaryExpression_7_factory)); +new Sfactory(this,"Typename_2",new SCreator(Typename_2_factory)); +new Sfactory(this,"Typename_4",new SCreator(Typename_4_factory)); new Sfactory(this,"ArgumentList",new SCreator(ArgumentList_factory)); -new Sfactory(this,"Event_10",new SCreator(Event_10_factory)); -new Sfactory(this,"ConstantExpression_1",new SCreator(ConstantExpression_1_factory)); -new Sfactory(this,"Event_12",new SCreator(Event_12_factory)); -new Sfactory(this,"Event_14",new SCreator(Event_14_factory)); -new Sfactory(this,"Event_17",new SCreator(Event_17_factory)); -new Sfactory(this,"Event_18",new SCreator(Event_18_factory)); -new Sfactory(this,"Event_19",new SCreator(Event_19_factory)); +new Sfactory(this,"BinaryExpression_12",new SCreator(BinaryExpression_12_factory)); +new Sfactory(this,"BinaryExpression_13",new SCreator(BinaryExpression_13_factory)); +new Sfactory(this,"GlobalFunctionDefinition_2",new SCreator(GlobalFunctionDefinition_2_factory)); +new Sfactory(this,"StateChange_2",new SCreator(StateChange_2_factory)); +new Sfactory(this,"VoidArgEvent_1",new SCreator(VoidArgEvent_1_factory)); +new Sfactory(this,"VoidArgEvent_3",new SCreator(VoidArgEvent_3_factory)); new Sfactory(this,"BinaryExpression_10",new SCreator(BinaryExpression_10_factory)); +new Sfactory(this,"VoidArgEvent_5",new SCreator(VoidArgEvent_5_factory)); +new Sfactory(this,"VoidArgEvent_6",new SCreator(VoidArgEvent_6_factory)); +new Sfactory(this,"VoidArgEvent_7",new SCreator(VoidArgEvent_7_factory)); +new Sfactory(this,"VoidArgEvent_8",new SCreator(VoidArgEvent_8_factory)); +new Sfactory(this,"BinaryExpression_17",new SCreator(BinaryExpression_17_factory)); new Sfactory(this,"StateEvent_1",new SCreator(StateEvent_1_factory)); new Sfactory(this,"VectorConstant",new SCreator(VectorConstant_factory)); -new Sfactory(this,"EmptyStatement_1",new SCreator(EmptyStatement_1_factory)); +new Sfactory(this,"VectorArgEvent_1",new SCreator(VectorArgEvent_1_factory)); +new Sfactory(this,"IntDeclaration",new SCreator(IntDeclaration_factory)); +new Sfactory(this,"VectorArgEvent_3",new SCreator(VectorArgEvent_3_factory)); new Sfactory(this,"TypecastExpression_4",new SCreator(TypecastExpression_4_factory)); new Sfactory(this,"TypecastExpression_6",new SCreator(TypecastExpression_6_factory)); new Sfactory(this,"TypecastExpression_7",new SCreator(TypecastExpression_7_factory)); new Sfactory(this,"FunctionCall",new SCreator(FunctionCall_factory)); -new Sfactory(this,"Event_27",new SCreator(Event_27_factory)); -new Sfactory(this,"Event_28",new SCreator(Event_28_factory)); -new Sfactory(this,"Event_29",new SCreator(Event_29_factory)); new Sfactory(this,"ListConstant_1",new SCreator(ListConstant_1_factory)); +new Sfactory(this,"BinaryExpression_18",new SCreator(BinaryExpression_18_factory)); new Sfactory(this,"Event_6",new SCreator(Event_6_factory)); +new Sfactory(this,"KeyArgEvent_2",new SCreator(KeyArgEvent_2_factory)); new Sfactory(this,"Declaration_1",new SCreator(Declaration_1_factory)); +new Sfactory(this,"EmptyStatement_1",new SCreator(EmptyStatement_1_factory)); new Sfactory(this,"SimpleAssignment_7",new SCreator(SimpleAssignment_7_factory)); new Sfactory(this,"ForLoop",new SCreator(ForLoop_factory)); new Sfactory(this,"ForLoop_2",new SCreator(ForLoop_2_factory)); -new Sfactory(this,"Event_30",new SCreator(Event_30_factory)); -new Sfactory(this,"Event_31",new SCreator(Event_31_factory)); -new Sfactory(this,"Event_33",new SCreator(Event_33_factory)); +new Sfactory(this,"KeyIntIntArgStateEvent_1",new SCreator(KeyIntIntArgStateEvent_1_factory)); +new Sfactory(this,"KeyArgumentDeclarationList_1",new SCreator(KeyArgumentDeclarationList_1_factory)); new Sfactory(this,"GlobalFunctionDefinition_1",new SCreator(GlobalFunctionDefinition_1_factory)); -new Sfactory(this,"JumpLabel_1",new SCreator(JumpLabel_1_factory)); new Sfactory(this,"IfStatement",new SCreator(IfStatement_factory)); new Sfactory(this,"ForLoopStatement_1",new SCreator(ForLoopStatement_1_factory)); new Sfactory(this,"ForLoopStatement_2",new SCreator(ForLoopStatement_2_factory)); new Sfactory(this,"ForLoopStatement_3",new SCreator(ForLoopStatement_3_factory)); -new Sfactory(this,"ArgumentDeclarationList_4",new SCreator(ArgumentDeclarationList_4_factory)); -new Sfactory(this,"ArgumentDeclarationList_5",new SCreator(ArgumentDeclarationList_5_factory)); -new Sfactory(this,"EmptyStatement",new SCreator(EmptyStatement_factory)); +new Sfactory(this,"IntRotRotArgumentDeclarationList",new SCreator(IntRotRotArgumentDeclarationList_factory)); +new Sfactory(this,"IntArgEvent_1",new SCreator(IntArgEvent_1_factory)); +new Sfactory(this,"IntArgEvent_2",new SCreator(IntArgEvent_2_factory)); new Sfactory(this,"WhileStatement",new SCreator(WhileStatement_factory)); new Sfactory(this,"ForLoop_1",new SCreator(ForLoop_1_factory)); new Sfactory(this,"Constant_2",new SCreator(Constant_2_factory)); -new Sfactory(this,"StatementList",new SCreator(StatementList_factory)); -new Sfactory(this,"StateBody_2",new SCreator(StateBody_2_factory)); +new Sfactory(this,"VoidArgEvent",new SCreator(VoidArgEvent_factory)); +new Sfactory(this,"RotDeclaration",new SCreator(RotDeclaration_factory)); +new Sfactory(this,"WhileStatement_1",new SCreator(WhileStatement_1_factory)); new Sfactory(this,"WhileStatement_2",new SCreator(WhileStatement_2_factory)); +new Sfactory(this,"VectorArgStateEvent_1",new SCreator(VectorArgStateEvent_1_factory)); new Sfactory(this,"IdentExpression_1",new SCreator(IdentExpression_1_factory)); +new Sfactory(this,"VectorArgumentDeclarationList",new SCreator(VectorArgumentDeclarationList_factory)); new Sfactory(this,"States",new SCreator(States_factory)); +new Sfactory(this,"VoidArgStateEvent",new SCreator(VoidArgStateEvent_factory)); } public static object ExpressionArgument_1_factory(Parser yyp) { return new ExpressionArgument_1(yyp); } -public static object SimpleAssignment_8_factory(Parser yyp) { return new SimpleAssignment_8(yyp); } +public static object VectorArgStateEvent_factory(Parser yyp) { return new VectorArgStateEvent(yyp); } +public static object IntVecVecArgStateEvent_factory(Parser yyp) { return new IntVecVecArgStateEvent(yyp); } +public static object IntArgStateEvent_1_factory(Parser yyp) { return new IntArgStateEvent_1(yyp); } +public static object SimpleAssignment_9_factory(Parser yyp) { return new SimpleAssignment_9(yyp); } public static object StatementList_1_factory(Parser yyp) { return new StatementList_1(yyp); } +public static object RotDeclaration_1_factory(Parser yyp) { return new RotDeclaration_1(yyp); } +public static object IntRotRotArgEvent_1_factory(Parser yyp) { return new IntRotRotArgEvent_1(yyp); } public static object StateChange_1_factory(Parser yyp) { return new StateChange_1(yyp); } -public static object StateChange_2_factory(Parser yyp) { return new StateChange_2(yyp); } +public static object EmptyStatement_factory(Parser yyp) { return new EmptyStatement(yyp); } public static object Declaration_factory(Parser yyp) { return new Declaration(yyp); } public static object IdentExpression_factory(Parser yyp) { return new IdentExpression(yyp); } public static object error_factory(Parser yyp) { return new error(yyp); } @@ -11029,20 +13262,25 @@ public static object SimpleAssignment_19_factory(Parser yyp) { return new Simple public static object BinaryExpression_9_factory(Parser yyp) { return new BinaryExpression_9(yyp); } public static object VectorConstant_1_factory(Parser yyp) { return new VectorConstant_1(yyp); } public static object ParenthesisExpression_factory(Parser yyp) { return new ParenthesisExpression(yyp); } +public static object StatementList_factory(Parser yyp) { return new StatementList(yyp); } +public static object IntRotRotArgEvent_factory(Parser yyp) { return new IntRotRotArgEvent(yyp); } public static object UnaryExpression_factory(Parser yyp) { return new UnaryExpression(yyp); } public static object IdentDotExpression_1_factory(Parser yyp) { return new IdentDotExpression_1(yyp); } public static object ArgumentList_4_factory(Parser yyp) { return new ArgumentList_4(yyp); } public static object Typename_factory(Parser yyp) { return new Typename(yyp); } public static object IfStatement_1_factory(Parser yyp) { return new IfStatement_1(yyp); } +public static object RotationConstant_1_factory(Parser yyp) { return new RotationConstant_1(yyp); } public static object Assignment_factory(Parser yyp) { return new Assignment(yyp); } +public static object IfStatement_4_factory(Parser yyp) { return new IfStatement_4(yyp); } public static object CompoundStatement_1_factory(Parser yyp) { return new CompoundStatement_1(yyp); } public static object CompoundStatement_2_factory(Parser yyp) { return new CompoundStatement_2(yyp); } +public static object KeyIntIntArgumentDeclarationList_1_factory(Parser yyp) { return new KeyIntIntArgumentDeclarationList_1(yyp); } public static object BinaryExpression_8_factory(Parser yyp) { return new BinaryExpression_8(yyp); } +public static object VectorArgEvent_factory(Parser yyp) { return new VectorArgEvent(yyp); } public static object ReturnStatement_1_factory(Parser yyp) { return new ReturnStatement_1(yyp); } public static object IdentDotExpression_factory(Parser yyp) { return new IdentDotExpression(yyp); } public static object Argument_factory(Parser yyp) { return new Argument(yyp); } public static object State_2_factory(Parser yyp) { return new State_2(yyp); } -public static object WhileStatement_1_factory(Parser yyp) { return new WhileStatement_1(yyp); } public static object GlobalDefinitions_3_factory(Parser yyp) { return new GlobalDefinitions_3(yyp); } public static object GlobalDefinitions_4_factory(Parser yyp) { return new GlobalDefinitions_4(yyp); } public static object Event_1_factory(Parser yyp) { return new Event_1(yyp); } @@ -11052,9 +13290,9 @@ public static object Event_4_factory(Parser yyp) { return new Event_4(yyp); } public static object Event_5_factory(Parser yyp) { return new Event_5(yyp); } public static object SimpleAssignment_5_factory(Parser yyp) { return new SimpleAssignment_5(yyp); } public static object Typename_1_factory(Parser yyp) { return new Typename_1(yyp); } -public static object Typename_2_factory(Parser yyp) { return new Typename_2(yyp); } +public static object VoidArgStateEvent_1_factory(Parser yyp) { return new VoidArgStateEvent_1(yyp); } public static object Typename_3_factory(Parser yyp) { return new Typename_3(yyp); } -public static object Typename_4_factory(Parser yyp) { return new Typename_4(yyp); } +public static object IntRotRotArgStateEvent_factory(Parser yyp) { return new IntRotRotArgStateEvent(yyp); } public static object Typename_5_factory(Parser yyp) { return new Typename_5(yyp); } public static object Typename_6_factory(Parser yyp) { return new Typename_6(yyp); } public static object Typename_7_factory(Parser yyp) { return new Typename_7(yyp); } @@ -11062,10 +13300,16 @@ public static object ArgumentDeclarationList_factory(Parser yyp) { return new Ar public static object ConstantExpression_factory(Parser yyp) { return new ConstantExpression(yyp); } public static object LSLProgramRoot_1_factory(Parser yyp) { return new LSLProgramRoot_1(yyp); } public static object LSLProgramRoot_2_factory(Parser yyp) { return new LSLProgramRoot_2(yyp); } +public static object KeyIntIntArgEvent_1_factory(Parser yyp) { return new KeyIntIntArgEvent_1(yyp); } public static object States_1_factory(Parser yyp) { return new States_1(yyp); } public static object States_2_factory(Parser yyp) { return new States_2(yyp); } public static object FunctionCallExpression_1_factory(Parser yyp) { return new FunctionCallExpression_1(yyp); } +public static object KeyArgEvent_1_factory(Parser yyp) { return new KeyArgEvent_1(yyp); } public static object ForLoopStatement_factory(Parser yyp) { return new ForLoopStatement(yyp); } +public static object IntArgStateEvent_factory(Parser yyp) { return new IntArgStateEvent(yyp); } +public static object StateBody_15_factory(Parser yyp) { return new StateBody_15(yyp); } +public static object IntRotRotArgumentDeclarationList_1_factory(Parser yyp) { return new IntRotRotArgumentDeclarationList_1(yyp); } +public static object IntArgEvent_9_factory(Parser yyp) { return new IntArgEvent_9(yyp); } public static object DoWhileStatement_1_factory(Parser yyp) { return new DoWhileStatement_1(yyp); } public static object DoWhileStatement_2_factory(Parser yyp) { return new DoWhileStatement_2(yyp); } public static object ForLoopStatement_4_factory(Parser yyp) { return new ForLoopStatement_4(yyp); } @@ -11074,74 +13318,93 @@ public static object SimpleAssignment_12_factory(Parser yyp) { return new Simple public static object SimpleAssignment_13_factory(Parser yyp) { return new SimpleAssignment_13(yyp); } public static object JumpLabel_factory(Parser yyp) { return new JumpLabel(yyp); } public static object SimpleAssignment_15_factory(Parser yyp) { return new SimpleAssignment_15(yyp); } -public static object SimpleAssignment_17_factory(Parser yyp) { return new SimpleAssignment_17(yyp); } -public static object SimpleAssignment_18_factory(Parser yyp) { return new SimpleAssignment_18(yyp); } -public static object JumpStatement_1_factory(Parser yyp) { return new JumpStatement_1(yyp); } +public static object IntVecVecArgEvent_factory(Parser yyp) { return new IntVecVecArgEvent(yyp); } +public static object VecDeclaration_factory(Parser yyp) { return new VecDeclaration(yyp); } +public static object StateBody_14_factory(Parser yyp) { return new StateBody_14(yyp); } public static object GlobalDefinitions_factory(Parser yyp) { return new GlobalDefinitions(yyp); } +public static object StateBody_16_factory(Parser yyp) { return new StateBody_16(yyp); } +public static object KeyIntIntArgumentDeclarationList_factory(Parser yyp) { return new KeyIntIntArgumentDeclarationList(yyp); } +public static object ConstantExpression_1_factory(Parser yyp) { return new ConstantExpression_1(yyp); } +public static object VoidArgEvent_4_factory(Parser yyp) { return new VoidArgEvent_4(yyp); } public static object FunctionCall_1_factory(Parser yyp) { return new FunctionCall_1(yyp); } -public static object ArgumentList_3_factory(Parser yyp) { return new ArgumentList_3(yyp); } +public static object Assignment_1_factory(Parser yyp) { return new Assignment_1(yyp); } public static object Assignment_2_factory(Parser yyp) { return new Assignment_2(yyp); } +public static object IntVecVecArgEvent_1_factory(Parser yyp) { return new IntVecVecArgEvent_1(yyp); } public static object TypecastExpression_1_factory(Parser yyp) { return new TypecastExpression_1(yyp); } public static object SimpleAssignment_21_factory(Parser yyp) { return new SimpleAssignment_21(yyp); } public static object SimpleAssignment_22_factory(Parser yyp) { return new SimpleAssignment_22(yyp); } -public static object SimpleAssignment_23_factory(Parser yyp) { return new SimpleAssignment_23(yyp); } +public static object KeyIntIntArgStateEvent_factory(Parser yyp) { return new KeyIntIntArgStateEvent(yyp); } public static object TypecastExpression_9_factory(Parser yyp) { return new TypecastExpression_9(yyp); } +public static object VoidArgEvent_2_factory(Parser yyp) { return new VoidArgEvent_2(yyp); } +public static object Event_9_factory(Parser yyp) { return new Event_9(yyp); } public static object ArgumentDeclarationList_1_factory(Parser yyp) { return new ArgumentDeclarationList_1(yyp); } public static object ArgumentDeclarationList_2_factory(Parser yyp) { return new ArgumentDeclarationList_2(yyp); } -public static object ArgumentDeclarationList_3_factory(Parser yyp) { return new ArgumentDeclarationList_3(yyp); } public static object GlobalDefinitions_1_factory(Parser yyp) { return new GlobalDefinitions_1(yyp); } public static object GlobalDefinitions_2_factory(Parser yyp) { return new GlobalDefinitions_2(yyp); } public static object IncrementDecrementExpression_factory(Parser yyp) { return new IncrementDecrementExpression(yyp); } public static object GlobalVariableDeclaration_factory(Parser yyp) { return new GlobalVariableDeclaration(yyp); } -public static object Event_11_factory(Parser yyp) { return new Event_11(yyp); } +public static object IntArgumentDeclarationList_1_factory(Parser yyp) { return new IntArgumentDeclarationList_1(yyp); } +public static object IntDeclaration_1_factory(Parser yyp) { return new IntDeclaration_1(yyp); } +public static object ArgumentDeclarationList_5_factory(Parser yyp) { return new ArgumentDeclarationList_5(yyp); } +public static object IntVecVecArgumentDeclarationList_factory(Parser yyp) { return new IntVecVecArgumentDeclarationList(yyp); } +public static object VectorArgumentDeclarationList_1_factory(Parser yyp) { return new VectorArgumentDeclarationList_1(yyp); } +public static object KeyArgumentDeclarationList_factory(Parser yyp) { return new KeyArgumentDeclarationList(yyp); } public static object TypecastExpression_2_factory(Parser yyp) { return new TypecastExpression_2(yyp); } -public static object TypecastExpression_3_factory(Parser yyp) { return new TypecastExpression_3(yyp); } +public static object KeyArgStateEvent_factory(Parser yyp) { return new KeyArgStateEvent(yyp); } public static object TypecastExpression_5_factory(Parser yyp) { return new TypecastExpression_5(yyp); } public static object TypecastExpression_8_factory(Parser yyp) { return new TypecastExpression_8(yyp); } public static object Constant_1_factory(Parser yyp) { return new Constant_1(yyp); } public static object Expression_factory(Parser yyp) { return new Expression(yyp); } public static object Constant_3_factory(Parser yyp) { return new Constant_3(yyp); } public static object Constant_4_factory(Parser yyp) { return new Constant_4(yyp); } +public static object IntArgEvent_5_factory(Parser yyp) { return new IntArgEvent_5(yyp); } public static object BinaryExpression_1_factory(Parser yyp) { return new BinaryExpression_1(yyp); } public static object IfStatement_2_factory(Parser yyp) { return new IfStatement_2(yyp); } public static object IfStatement_3_factory(Parser yyp) { return new IfStatement_3(yyp); } -public static object IfStatement_4_factory(Parser yyp) { return new IfStatement_4(yyp); } -public static object ReturnStatement_factory(Parser yyp) { return new ReturnStatement(yyp); } +public static object KeyArgEvent_factory(Parser yyp) { return new KeyArgEvent(yyp); } public static object Event_2_factory(Parser yyp) { return new Event_2(yyp); } +public static object JumpLabel_1_factory(Parser yyp) { return new JumpLabel_1(yyp); } public static object RotationConstant_factory(Parser yyp) { return new RotationConstant(yyp); } public static object Statement_12_factory(Parser yyp) { return new Statement_12(yyp); } +public static object Statement_13_factory(Parser yyp) { return new Statement_13(yyp); } public static object UnaryExpression_1_factory(Parser yyp) { return new UnaryExpression_1(yyp); } public static object UnaryExpression_2_factory(Parser yyp) { return new UnaryExpression_2(yyp); } public static object UnaryExpression_3_factory(Parser yyp) { return new UnaryExpression_3(yyp); } public static object ArgumentList_1_factory(Parser yyp) { return new ArgumentList_1(yyp); } -public static object ArgumentList_2_factory(Parser yyp) { return new ArgumentList_2(yyp); } +public static object KeyIntIntArgEvent_factory(Parser yyp) { return new KeyIntIntArgEvent(yyp); } +public static object ArgumentList_3_factory(Parser yyp) { return new ArgumentList_3(yyp); } public static object Constant_factory(Parser yyp) { return new Constant(yyp); } public static object State_factory(Parser yyp) { return new State(yyp); } -public static object Event_13_factory(Parser yyp) { return new Event_13(yyp); } +public static object StateBody_13_factory(Parser yyp) { return new StateBody_13(yyp); } +public static object KeyArgStateEvent_1_factory(Parser yyp) { return new KeyArgStateEvent_1(yyp); } +public static object SimpleAssignment_8_factory(Parser yyp) { return new SimpleAssignment_8(yyp); } public static object LSLProgramRoot_factory(Parser yyp) { return new LSLProgramRoot(yyp); } public static object StateChange_factory(Parser yyp) { return new StateChange(yyp); } -public static object IncrementDecrementExpression_2_factory(Parser yyp) { return new IncrementDecrementExpression_2(yyp); } +public static object VecDeclaration_1_factory(Parser yyp) { return new VecDeclaration_1(yyp); } public static object GlobalVariableDeclaration_1_factory(Parser yyp) { return new GlobalVariableDeclaration_1(yyp); } public static object GlobalVariableDeclaration_2_factory(Parser yyp) { return new GlobalVariableDeclaration_2(yyp); } public static object IncrementDecrementExpression_5_factory(Parser yyp) { return new IncrementDecrementExpression_5(yyp); } -public static object GlobalFunctionDefinition_2_factory(Parser yyp) { return new GlobalFunctionDefinition_2(yyp); } -public static object IncrementDecrementExpression_7_factory(Parser yyp) { return new IncrementDecrementExpression_7(yyp); } -public static object IncrementDecrementExpression_8_factory(Parser yyp) { return new IncrementDecrementExpression_8(yyp); } -public static object Assignment_1_factory(Parser yyp) { return new Assignment_1(yyp); } -public static object Event_21_factory(Parser yyp) { return new Event_21(yyp); } -public static object Event_22_factory(Parser yyp) { return new Event_22(yyp); } +public static object ReturnStatement_factory(Parser yyp) { return new ReturnStatement(yyp); } +public static object StateBody_10_factory(Parser yyp) { return new StateBody_10(yyp); } +public static object StateBody_11_factory(Parser yyp) { return new StateBody_11(yyp); } +public static object StateBody_12_factory(Parser yyp) { return new StateBody_12(yyp); } +public static object IntVecVecArgStateEvent_1_factory(Parser yyp) { return new IntVecVecArgStateEvent_1(yyp); } +public static object KeyDeclaration_factory(Parser yyp) { return new KeyDeclaration(yyp); } +public static object IntArgEvent_6_factory(Parser yyp) { return new IntArgEvent_6(yyp); } +public static object ArgumentDeclarationList_3_factory(Parser yyp) { return new ArgumentDeclarationList_3(yyp); } +public static object ArgumentList_2_factory(Parser yyp) { return new ArgumentList_2(yyp); } +public static object IntArgEvent_10_factory(Parser yyp) { return new IntArgEvent_10(yyp); } public static object CompoundStatement_factory(Parser yyp) { return new CompoundStatement(yyp); } -public static object RotationConstant_1_factory(Parser yyp) { return new RotationConstant_1(yyp); } -public static object TypecastExpression_factory(Parser yyp) { return new TypecastExpression(yyp); } +public static object TypecastExpression_3_factory(Parser yyp) { return new TypecastExpression_3(yyp); } +public static object IntArgumentDeclarationList_factory(Parser yyp) { return new IntArgumentDeclarationList(yyp); } +public static object ArgumentDeclarationList_4_factory(Parser yyp) { return new ArgumentDeclarationList_4(yyp); } public static object SimpleAssignment_3_factory(Parser yyp) { return new SimpleAssignment_3(yyp); } public static object SimpleAssignment_4_factory(Parser yyp) { return new SimpleAssignment_4(yyp); } public static object Statement_1_factory(Parser yyp) { return new Statement_1(yyp); } public static object Statement_2_factory(Parser yyp) { return new Statement_2(yyp); } -public static object Statement_3_factory(Parser yyp) { return new Statement_3(yyp); } public static object Statement_4_factory(Parser yyp) { return new Statement_4(yyp); } public static object Statement_5_factory(Parser yyp) { return new Statement_5(yyp); } public static object Statement_6_factory(Parser yyp) { return new Statement_6(yyp); } -public static object Statement_7_factory(Parser yyp) { return new Statement_7(yyp); } public static object Statement_8_factory(Parser yyp) { return new Statement_8(yyp); } public static object Statement_9_factory(Parser yyp) { return new Statement_9(yyp); } public static object ExpressionArgument_factory(Parser yyp) { return new ExpressionArgument(yyp); } @@ -11154,27 +13417,35 @@ public static object StateBody_factory(Parser yyp) { return new StateBody(yyp); public static object Event_7_factory(Parser yyp) { return new Event_7(yyp); } public static object Event_8_factory(Parser yyp) { return new Event_8(yyp); } public static object IncrementDecrementExpression_1_factory(Parser yyp) { return new IncrementDecrementExpression_1(yyp); } -public static object IncrementDecrementExpression_3_factory(Parser yyp) { return new IncrementDecrementExpression_3(yyp); } +public static object IncrementDecrementExpression_2_factory(Parser yyp) { return new IncrementDecrementExpression_2(yyp); } +public static object IntVecVecArgumentDeclarationList_1_factory(Parser yyp) { return new IntVecVecArgumentDeclarationList_1(yyp); } public static object IncrementDecrementExpression_4_factory(Parser yyp) { return new IncrementDecrementExpression_4(yyp); } public static object IncrementDecrementExpression_6_factory(Parser yyp) { return new IncrementDecrementExpression_6(yyp); } +public static object IncrementDecrementExpression_7_factory(Parser yyp) { return new IncrementDecrementExpression_7(yyp); } public static object StateEvent_factory(Parser yyp) { return new StateEvent(yyp); } -public static object Event_20_factory(Parser yyp) { return new Event_20(yyp); } -public static object Event_23_factory(Parser yyp) { return new Event_23(yyp); } -public static object Event_24_factory(Parser yyp) { return new Event_24(yyp); } -public static object Event_26_factory(Parser yyp) { return new Event_26(yyp); } +public static object IntArgEvent_3_factory(Parser yyp) { return new IntArgEvent_3(yyp); } +public static object IntArgEvent_4_factory(Parser yyp) { return new IntArgEvent_4(yyp); } +public static object KeyDeclaration_1_factory(Parser yyp) { return new KeyDeclaration_1(yyp); } +public static object Statement_3_factory(Parser yyp) { return new Statement_3(yyp); } +public static object IntArgEvent_7_factory(Parser yyp) { return new IntArgEvent_7(yyp); } +public static object IntArgEvent_8_factory(Parser yyp) { return new IntArgEvent_8(yyp); } public static object SimpleAssignment_10_factory(Parser yyp) { return new SimpleAssignment_10(yyp); } +public static object StatementList_2_factory(Parser yyp) { return new StatementList_2(yyp); } +public static object IntRotRotArgStateEvent_1_factory(Parser yyp) { return new IntRotRotArgStateEvent_1(yyp); } +public static object VectorArgEvent_2_factory(Parser yyp) { return new VectorArgEvent_2(yyp); } public static object Event_factory(Parser yyp) { return new Event(yyp); } public static object SimpleAssignment_14_factory(Parser yyp) { return new SimpleAssignment_14(yyp); } public static object SimpleAssignment_16_factory(Parser yyp) { return new SimpleAssignment_16(yyp); } +public static object SimpleAssignment_17_factory(Parser yyp) { return new SimpleAssignment_17(yyp); } +public static object SimpleAssignment_18_factory(Parser yyp) { return new SimpleAssignment_18(yyp); } public static object Statement_10_factory(Parser yyp) { return new Statement_10(yyp); } public static object Statement_11_factory(Parser yyp) { return new Statement_11(yyp); } public static object SimpleAssignment_factory(Parser yyp) { return new SimpleAssignment(yyp); } -public static object Statement_13_factory(Parser yyp) { return new Statement_13(yyp); } -public static object Event_15_factory(Parser yyp) { return new Event_15(yyp); } -public static object Event_16_factory(Parser yyp) { return new Event_16(yyp); } -public static object Event_32_factory(Parser yyp) { return new Event_32(yyp); } -public static object Event_34_factory(Parser yyp) { return new Event_34(yyp); } +public static object TypecastExpression_factory(Parser yyp) { return new TypecastExpression(yyp); } +public static object JumpStatement_1_factory(Parser yyp) { return new JumpStatement_1(yyp); } public static object SimpleAssignment_20_factory(Parser yyp) { return new SimpleAssignment_20(yyp); } +public static object Statement_7_factory(Parser yyp) { return new Statement_7(yyp); } +public static object SimpleAssignment_23_factory(Parser yyp) { return new SimpleAssignment_23(yyp); } public static object SimpleAssignment_24_factory(Parser yyp) { return new SimpleAssignment_24(yyp); } public static object SimpleAssignment_1_factory(Parser yyp) { return new SimpleAssignment_1(yyp); } public static object SimpleAssignment_2_factory(Parser yyp) { return new SimpleAssignment_2(yyp); } @@ -11182,67 +13453,80 @@ public static object BinaryExpression_factory(Parser yyp) { return new BinaryExp public static object FunctionCallExpression_factory(Parser yyp) { return new FunctionCallExpression(yyp); } public static object SimpleAssignment_6_factory(Parser yyp) { return new SimpleAssignment_6(yyp); } public static object StateBody_1_factory(Parser yyp) { return new StateBody_1(yyp); } -public static object StatementList_2_factory(Parser yyp) { return new StatementList_2(yyp); } -public static object SimpleAssignment_9_factory(Parser yyp) { return new SimpleAssignment_9(yyp); } -public static object BinaryExpression_15_factory(Parser yyp) { return new BinaryExpression_15(yyp); } -public static object BinaryExpression_16_factory(Parser yyp) { return new BinaryExpression_16(yyp); } -public static object BinaryExpression_17_factory(Parser yyp) { return new BinaryExpression_17(yyp); } -public static object BinaryExpression_18_factory(Parser yyp) { return new BinaryExpression_18(yyp); } -public static object Event_25_factory(Parser yyp) { return new Event_25(yyp); } -public static object Event_9_factory(Parser yyp) { return new Event_9(yyp); } +public static object StateBody_2_factory(Parser yyp) { return new StateBody_2(yyp); } +public static object StateBody_3_factory(Parser yyp) { return new StateBody_3(yyp); } +public static object StateBody_4_factory(Parser yyp) { return new StateBody_4(yyp); } +public static object StateBody_5_factory(Parser yyp) { return new StateBody_5(yyp); } +public static object StateBody_6_factory(Parser yyp) { return new StateBody_6(yyp); } +public static object StateBody_7_factory(Parser yyp) { return new StateBody_7(yyp); } +public static object StateBody_8_factory(Parser yyp) { return new StateBody_8(yyp); } +public static object StateBody_9_factory(Parser yyp) { return new StateBody_9(yyp); } public static object Statement_factory(Parser yyp) { return new Statement(yyp); } +public static object IncrementDecrementExpression_3_factory(Parser yyp) { return new IncrementDecrementExpression_3(yyp); } public static object JumpStatement_factory(Parser yyp) { return new JumpStatement(yyp); } public static object BinaryExpression_11_factory(Parser yyp) { return new BinaryExpression_11(yyp); } -public static object BinaryExpression_12_factory(Parser yyp) { return new BinaryExpression_12(yyp); } -public static object BinaryExpression_13_factory(Parser yyp) { return new BinaryExpression_13(yyp); } +public static object IntArgEvent_factory(Parser yyp) { return new IntArgEvent(yyp); } +public static object IncrementDecrementExpression_8_factory(Parser yyp) { return new IncrementDecrementExpression_8(yyp); } public static object BinaryExpression_14_factory(Parser yyp) { return new BinaryExpression_14(yyp); } +public static object BinaryExpression_15_factory(Parser yyp) { return new BinaryExpression_15(yyp); } +public static object BinaryExpression_16_factory(Parser yyp) { return new BinaryExpression_16(yyp); } public static object BinaryExpression_6_factory(Parser yyp) { return new BinaryExpression_6(yyp); } public static object BinaryExpression_7_factory(Parser yyp) { return new BinaryExpression_7(yyp); } +public static object Typename_2_factory(Parser yyp) { return new Typename_2(yyp); } +public static object Typename_4_factory(Parser yyp) { return new Typename_4(yyp); } public static object ArgumentList_factory(Parser yyp) { return new ArgumentList(yyp); } -public static object Event_10_factory(Parser yyp) { return new Event_10(yyp); } -public static object ConstantExpression_1_factory(Parser yyp) { return new ConstantExpression_1(yyp); } -public static object Event_12_factory(Parser yyp) { return new Event_12(yyp); } -public static object Event_14_factory(Parser yyp) { return new Event_14(yyp); } -public static object Event_17_factory(Parser yyp) { return new Event_17(yyp); } -public static object Event_18_factory(Parser yyp) { return new Event_18(yyp); } -public static object Event_19_factory(Parser yyp) { return new Event_19(yyp); } +public static object BinaryExpression_12_factory(Parser yyp) { return new BinaryExpression_12(yyp); } +public static object BinaryExpression_13_factory(Parser yyp) { return new BinaryExpression_13(yyp); } +public static object GlobalFunctionDefinition_2_factory(Parser yyp) { return new GlobalFunctionDefinition_2(yyp); } +public static object StateChange_2_factory(Parser yyp) { return new StateChange_2(yyp); } +public static object VoidArgEvent_1_factory(Parser yyp) { return new VoidArgEvent_1(yyp); } +public static object VoidArgEvent_3_factory(Parser yyp) { return new VoidArgEvent_3(yyp); } public static object BinaryExpression_10_factory(Parser yyp) { return new BinaryExpression_10(yyp); } +public static object VoidArgEvent_5_factory(Parser yyp) { return new VoidArgEvent_5(yyp); } +public static object VoidArgEvent_6_factory(Parser yyp) { return new VoidArgEvent_6(yyp); } +public static object VoidArgEvent_7_factory(Parser yyp) { return new VoidArgEvent_7(yyp); } +public static object VoidArgEvent_8_factory(Parser yyp) { return new VoidArgEvent_8(yyp); } +public static object BinaryExpression_17_factory(Parser yyp) { return new BinaryExpression_17(yyp); } public static object StateEvent_1_factory(Parser yyp) { return new StateEvent_1(yyp); } public static object VectorConstant_factory(Parser yyp) { return new VectorConstant(yyp); } -public static object EmptyStatement_1_factory(Parser yyp) { return new EmptyStatement_1(yyp); } +public static object VectorArgEvent_1_factory(Parser yyp) { return new VectorArgEvent_1(yyp); } +public static object IntDeclaration_factory(Parser yyp) { return new IntDeclaration(yyp); } +public static object VectorArgEvent_3_factory(Parser yyp) { return new VectorArgEvent_3(yyp); } public static object TypecastExpression_4_factory(Parser yyp) { return new TypecastExpression_4(yyp); } public static object TypecastExpression_6_factory(Parser yyp) { return new TypecastExpression_6(yyp); } public static object TypecastExpression_7_factory(Parser yyp) { return new TypecastExpression_7(yyp); } public static object FunctionCall_factory(Parser yyp) { return new FunctionCall(yyp); } -public static object Event_27_factory(Parser yyp) { return new Event_27(yyp); } -public static object Event_28_factory(Parser yyp) { return new Event_28(yyp); } -public static object Event_29_factory(Parser yyp) { return new Event_29(yyp); } public static object ListConstant_1_factory(Parser yyp) { return new ListConstant_1(yyp); } +public static object BinaryExpression_18_factory(Parser yyp) { return new BinaryExpression_18(yyp); } public static object Event_6_factory(Parser yyp) { return new Event_6(yyp); } +public static object KeyArgEvent_2_factory(Parser yyp) { return new KeyArgEvent_2(yyp); } public static object Declaration_1_factory(Parser yyp) { return new Declaration_1(yyp); } +public static object EmptyStatement_1_factory(Parser yyp) { return new EmptyStatement_1(yyp); } public static object SimpleAssignment_7_factory(Parser yyp) { return new SimpleAssignment_7(yyp); } public static object ForLoop_factory(Parser yyp) { return new ForLoop(yyp); } public static object ForLoop_2_factory(Parser yyp) { return new ForLoop_2(yyp); } -public static object Event_30_factory(Parser yyp) { return new Event_30(yyp); } -public static object Event_31_factory(Parser yyp) { return new Event_31(yyp); } -public static object Event_33_factory(Parser yyp) { return new Event_33(yyp); } +public static object KeyIntIntArgStateEvent_1_factory(Parser yyp) { return new KeyIntIntArgStateEvent_1(yyp); } +public static object KeyArgumentDeclarationList_1_factory(Parser yyp) { return new KeyArgumentDeclarationList_1(yyp); } public static object GlobalFunctionDefinition_1_factory(Parser yyp) { return new GlobalFunctionDefinition_1(yyp); } -public static object JumpLabel_1_factory(Parser yyp) { return new JumpLabel_1(yyp); } public static object IfStatement_factory(Parser yyp) { return new IfStatement(yyp); } public static object ForLoopStatement_1_factory(Parser yyp) { return new ForLoopStatement_1(yyp); } public static object ForLoopStatement_2_factory(Parser yyp) { return new ForLoopStatement_2(yyp); } public static object ForLoopStatement_3_factory(Parser yyp) { return new ForLoopStatement_3(yyp); } -public static object ArgumentDeclarationList_4_factory(Parser yyp) { return new ArgumentDeclarationList_4(yyp); } -public static object ArgumentDeclarationList_5_factory(Parser yyp) { return new ArgumentDeclarationList_5(yyp); } -public static object EmptyStatement_factory(Parser yyp) { return new EmptyStatement(yyp); } +public static object IntRotRotArgumentDeclarationList_factory(Parser yyp) { return new IntRotRotArgumentDeclarationList(yyp); } +public static object IntArgEvent_1_factory(Parser yyp) { return new IntArgEvent_1(yyp); } +public static object IntArgEvent_2_factory(Parser yyp) { return new IntArgEvent_2(yyp); } public static object WhileStatement_factory(Parser yyp) { return new WhileStatement(yyp); } public static object ForLoop_1_factory(Parser yyp) { return new ForLoop_1(yyp); } public static object Constant_2_factory(Parser yyp) { return new Constant_2(yyp); } -public static object StatementList_factory(Parser yyp) { return new StatementList(yyp); } -public static object StateBody_2_factory(Parser yyp) { return new StateBody_2(yyp); } +public static object VoidArgEvent_factory(Parser yyp) { return new VoidArgEvent(yyp); } +public static object RotDeclaration_factory(Parser yyp) { return new RotDeclaration(yyp); } +public static object WhileStatement_1_factory(Parser yyp) { return new WhileStatement_1(yyp); } public static object WhileStatement_2_factory(Parser yyp) { return new WhileStatement_2(yyp); } +public static object VectorArgStateEvent_1_factory(Parser yyp) { return new VectorArgStateEvent_1(yyp); } public static object IdentExpression_1_factory(Parser yyp) { return new IdentExpression_1(yyp); } +public static object VectorArgumentDeclarationList_factory(Parser yyp) { return new VectorArgumentDeclarationList(yyp); } public static object States_factory(Parser yyp) { return new States(yyp); } +public static object VoidArgStateEvent_factory(Parser yyp) { return new VoidArgStateEvent(yyp); } } public class LSLSyntax : Parser { diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 5a58f73..e02d35e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs @@ -81,6 +81,24 @@ namespace OpenSim.Region.ScriptEngine.Shared } } + /// + /// Used to signal when the script is stopping in co-operation with the script engine + /// (instead of through Thread.Abort()). + /// + [Serializable] + public class ScriptCoopStopException : Exception + { + public ScriptCoopStopException() + { + } + + protected ScriptCoopStopException( + SerializationInfo info, + StreamingContext context) + { + } + } + public class DetectParams { public const int AGENT = 1; diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs index 470e1a1..b7c4bab 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.8.3.*")] + diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 01a5e34..fa6e6fc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -51,6 +51,7 @@ using OpenSim.Region.ScriptEngine.Shared.Api.Runtime; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Region.ScriptEngine.Shared.CodeTools; using OpenSim.Region.ScriptEngine.Interfaces; +using System.Diagnostics; namespace OpenSim.Region.ScriptEngine.Shared.Instance { @@ -58,6 +59,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public bool StatePersistedHere { get { return m_AttachedAvatar == UUID.Zero; } } + /// /// The current work item if an event for this script is running or waiting to run, /// @@ -71,14 +74,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance private bool m_TimerQueued; private DateTime m_EventStart; private bool m_InEvent; - private string m_Assembly; + private string m_assemblyPath; + private string m_dataPath; private string m_CurrentEvent = String.Empty; private bool m_InSelfDelete; private int m_MaxScriptQueue; - private bool m_SaveState = true; + private bool m_SaveState; private int m_ControlEventsInQueue; private int m_LastControlLevel; private bool m_CollisionInQueue; + private bool m_StateChangeInProgress; // The following is for setting a minimum delay between events private double m_minEventDelay; @@ -95,6 +100,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public int DebugLevel { get; set; } + public WaitHandle CoopWaitHandle { get; private set; } + public Stopwatch ExecutionTimer { get; private set; } + public Dictionary, KeyValuePair> LineMap { get; set; } private Dictionary m_Apis = new Dictionary(); @@ -121,7 +129,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance } } - public bool Running { get; set; } + public bool Running + { + get { return m_running; } + + set + { + m_running = value; + if (m_running) + StayStopped = false; + } + } + private bool m_running; public bool Suspended { @@ -153,23 +172,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public string State { get; set; } + public bool StayStopped { get; set; } + public IScriptEngine Engine { get; private set; } public UUID AppDomain { get; set; } + public SceneObjectPart Part { get; private set; } + public string PrimName { get; private set; } public string ScriptName { get; private set; } public UUID ItemID { get; private set; } - public UUID ObjectID { get; private set; } + public UUID ObjectID { get { return Part.UUID; } } - public uint LocalID { get; private set; } + public uint LocalID { get { return Part.LocalId; } } - public UUID RootObjectID { get; private set; } + public UUID RootObjectID { get { return Part.ParentGroup.UUID; } } - public uint RootLocalID { get; private set; } + public uint RootLocalID { get { return Part.ParentGroup.LocalId; } } public UUID AssetID { get; private set; } @@ -192,83 +215,92 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public DateTime TimeStarted { get; private set; } - public long MeasurementPeriodTickStart { get; private set; } + public MetricsCollectorTime ExecutionTime { get; private set; } - public long MeasurementPeriodExecutionTime { get; private set; } + private static readonly int MeasurementWindow = 30 * 1000; // show the *recent* time used by the script, to find currently active scripts - public static readonly long MaxMeasurementPeriod = 30 * TimeSpan.TicksPerMinute; + private bool m_coopTermination; + + private EventWaitHandle m_coopSleepHandle; public void ClearQueue() { m_TimerQueued = false; + m_StateChangeInProgress = false; EventQueue.Clear(); } - public ScriptInstance(IScriptEngine engine, SceneObjectPart part, - UUID itemID, UUID assetID, string assembly, - AppDomain dom, string primName, string scriptName, - int startParam, bool postOnRez, StateSource stateSource, - int maxScriptQueue) + public ScriptInstance( + IScriptEngine engine, SceneObjectPart part, TaskInventoryItem item, + int startParam, bool postOnRez, + int maxScriptQueue) { State = "default"; EventQueue = new Queue(32); + ExecutionTimer = new Stopwatch(); Engine = engine; - LocalID = part.LocalId; - ObjectID = part.UUID; - RootLocalID = part.ParentGroup.LocalId; - RootObjectID = part.ParentGroup.UUID; - ItemID = itemID; - AssetID = assetID; - PrimName = primName; - ScriptName = scriptName; - m_Assembly = assembly; + Part = part; + ScriptTask = item; + + // This is currently only here to allow regression tests to get away without specifying any inventory + // item when they are testing script logic that doesn't require an item. + if (ScriptTask != null) + { + ScriptName = ScriptTask.Name; + ItemID = ScriptTask.ItemID; + AssetID = ScriptTask.AssetID; + } + + PrimName = part.ParentGroup.Name; StartParam = startParam; m_MaxScriptQueue = maxScriptQueue; - m_stateSource = stateSource; m_postOnRez = postOnRez; - m_AttachedAvatar = part.ParentGroup.AttachedAvatar; - m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; + m_AttachedAvatar = Part.ParentGroup.AttachedAvatar; + m_RegionID = Part.ParentGroup.Scene.RegionInfo.RegionID; - if (part != null) - { - lock (part.TaskInventory) - { - if (part.TaskInventory.ContainsKey(ItemID)) - { - ScriptTask = part.TaskInventory[ItemID]; - } - } - } + m_SaveState = StatePersistedHere; + + ExecutionTime = new MetricsCollectorTime(MeasurementWindow, 10); + +// m_log.DebugFormat( +// "[SCRIPT INSTANCE]: Instantiated script instance {0} (id {1}) in part {2} (id {3}) in object {4} attached avatar {5} in {6}", +// ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, m_AttachedAvatar, Engine.World.Name); + } + + /// + /// Load the script from an assembly into an AppDomain. + /// + /// + /// + /// + /// Path for all script associated data (state, etc.). In a multi-region set up + /// with all scripts loading into the same AppDomain this may not be the same place as the DLL itself. + /// + /// + /// false if load failed, true if suceeded + public bool Load( + IScript script, EventWaitHandle coopSleepHandle, string assemblyPath, + string dataPath, StateSource stateSource, bool coopTermination) + { + m_Script = script; + m_coopSleepHandle = coopSleepHandle; + m_assemblyPath = assemblyPath; + m_dataPath = dataPath; + m_stateSource = stateSource; + m_coopTermination = coopTermination; + + if (m_coopTermination) + CoopWaitHandle = coopSleepHandle; + else + CoopWaitHandle = null; ApiManager am = new ApiManager(); foreach (string api in am.GetApis()) { m_Apis[api] = am.CreateApi(api); - m_Apis[api].Initialize(engine, part, ScriptTask); - } - - try - { - if (dom != System.AppDomain.CurrentDomain) - m_Script = (IScript)dom.CreateInstanceAndUnwrap( - Path.GetFileNameWithoutExtension(assembly), - "SecondLife.Script"); - else - m_Script = (IScript)Assembly.Load( - Path.GetFileNameWithoutExtension(assembly)).CreateInstance( - "SecondLife.Script"); - - //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); - //RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); -// lease.Register(this); - } - catch (Exception e) - { - m_log.ErrorFormat( - "[SCRIPT INSTANCE]: Error loading assembly {0}. Exception {1}{2}", - assembly, e.Message, e.StackTrace); + m_Apis[api].Initialize(Engine, Part, ScriptTask); } try @@ -278,26 +310,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance m_Script.InitApi(kv.Key, kv.Value); } -// // m_log.Debug("[Script] Script instance created"); + // // m_log.Debug("[Script] Script instance created"); - part.SetScriptEvents(ItemID, - (int)m_Script.GetStateEventFlags(State)); + Part.SetScriptEvents(ItemID, (int)m_Script.GetStateEventFlags(State)); } catch (Exception e) { m_log.ErrorFormat( - "[SCRIPT INSTANCE]: Error loading script instance from assembly {0}. Exception {1}{2}", - assembly, e.Message, e.StackTrace); + "[SCRIPT INSTANCE]: Not starting script {0} (id {1}) in part {2} (id {3}) in object {4} in {5}. Error initializing script instance. Exception {6}{7}", + ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name, e.Message, e.StackTrace); - return; + return false; } - m_SaveState = true; + // For attachments, XEngine saves the state into a .state file when XEngine.SetXMLState() is called. + string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state"); - string savedState = Path.Combine(Path.GetDirectoryName(assembly), - ItemID.ToString() + ".state"); if (File.Exists(savedState)) { + // m_log.DebugFormat( + // "[SCRIPT INSTANCE]: Found state for script {0} for {1} ({2}) at {3} in {4}", + // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); + string xml = String.Empty; try @@ -317,13 +351,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance ScriptSerializer.Deserialize(xml, this); AsyncCommandManager.CreateFromData(Engine, - LocalID, ItemID, ObjectID, - PluginData); + LocalID, ItemID, ObjectID, + PluginData); -// m_log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", PrimName, m_ScriptName); + // m_log.DebugFormat("[Script] Successfully retrieved state for script {0}.{1}", PrimName, m_ScriptName); - part.SetScriptEvents(ItemID, - (int)m_Script.GetStateEventFlags(State)); + Part.SetScriptEvents(ItemID, + (int)m_Script.GetStateEventFlags(State)); if (!Running) m_startOnInit = false; @@ -338,29 +372,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance m_SaveState = false; m_startedFromSavedState = true; } + + // If this script is in an attachment then we no longer need the state file. + if (!StatePersistedHere) + RemoveState(); } - else - { - m_log.WarnFormat( - "[SCRIPT INSTANCE]: Unable to load script state file {0} for script {1} {2} in {3} {4} (assembly {5}). Memory limit exceeded", - savedState, ScriptName, ItemID, PrimName, ObjectID, assembly); - } + // else + // { + // m_log.WarnFormat( + // "[SCRIPT INSTANCE]: Not starting script {0} (id {1}) in part {2} (id {3}) in object {4} in {5}. Unable to load script state file {6}. Memory limit exceeded.", + // ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name, savedState); + // } } catch (Exception e) { - m_log.ErrorFormat( - "[SCRIPT INSTANCE]: Unable to load script state file {0} for script {1} {2} in {3} {4} (assembly {5}). XML is {6}. Exception {7}{8}", - savedState, ScriptName, ItemID, PrimName, ObjectID, assembly, xml, e.Message, e.StackTrace); + m_log.ErrorFormat( + "[SCRIPT INSTANCE]: Not starting script {0} (id {1}) in part {2} (id {3}) in object {4} in {5}. Unable to load script state file {6}. XML is {7}. Exception {8}{9}", + ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name, savedState, xml, e.Message, e.StackTrace); } } -// else -// { -// ScenePresence presence = Engine.World.GetScenePresence(part.OwnerID); + // else + // { + // m_log.DebugFormat( + // "[SCRIPT INSTANCE]: Did not find state for script {0} for {1} ({2}) at {3} in {4}", + // ItemID, savedState, Part.Name, Part.ParentGroup.Name, Part.ParentGroup.Scene.Name); + // } -// if (presence != null && (!postOnRez)) -// presence.ControllingClient.SendAgentAlertMessage("Compile successful", false); - -// } + return true; } public void Init() @@ -418,33 +456,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance PostEvent(new EventParams("attach", new object[] { new LSL_Types.LSLString(m_AttachedAvatar.ToString()) }, new DetectParams[0])); } - } } private void ReleaseControls() { - SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); - - if (part != null) + int permsMask; + UUID permsGranter; + lock (Part.TaskInventory) { - int permsMask; - UUID permsGranter; - lock (part.TaskInventory) - { - if (!part.TaskInventory.ContainsKey(ItemID)) - return; + if (!Part.TaskInventory.ContainsKey(ItemID)) + return; - permsGranter = part.TaskInventory[ItemID].PermsGranter; - permsMask = part.TaskInventory[ItemID].PermsMask; - } + permsGranter = Part.TaskInventory[ItemID].PermsGranter; + permsMask = Part.TaskInventory[ItemID].PermsMask; + } - if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) - { - ScenePresence presence = Engine.World.GetScenePresence(permsGranter); - if (presence != null) - presence.UnRegisterControlEventsToScript(LocalID, ItemID); - } + if ((permsMask & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) != 0) + { + ScenePresence presence = Engine.World.GetScenePresence(permsGranter); + if (presence != null) + presence.UnRegisterControlEventsToScript(LocalID, ItemID); } } @@ -456,15 +488,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public void RemoveState() { - string savedState = Path.Combine(Path.GetDirectoryName(m_Assembly), - ItemID.ToString() + ".state"); + string savedState = Path.Combine(m_dataPath, ItemID.ToString() + ".state"); + +// m_log.DebugFormat( +// "[SCRIPT INSTANCE]: Deleting state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}.", +// savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name); try { File.Delete(savedState); } - catch(Exception) + catch (Exception e) { + m_log.Warn( + string.Format( + "[SCRIPT INSTANCE]: Could not delete script state {0} for script {1} (id {2}) in part {3} (id {4}) in object {5} in {6}. Exception ", + savedState, ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name), + e); } } @@ -487,8 +527,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance Running = true; TimeStarted = DateTime.Now; - MeasurementPeriodTickStart = Util.EnvironmentTickCount(); - MeasurementPeriodExecutionTime = 0; + + // Note: we don't reset ExecutionTime. The reason is that runaway scripts are stopped and restarted + // automatically, and we *do* want to show that they had high CPU in that case. If we had reset + // ExecutionTime here then runaway scripts, paradoxically, would never show up in the "Top Scripts" dialog. if (EventQueue.Count > 0) { @@ -500,16 +542,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance } } - public bool Stop(int timeout) + public bool Stop(int timeout, bool clearEventQueue = false) { -// m_log.DebugFormat( -// "[SCRIPT INSTANCE]: Stopping script {0} {1} in {2} {3} with timeout {4} {5} {6}", -// ScriptName, ItemID, PrimName, ObjectID, timeout, m_InSelfDelete, DateTime.Now.Ticks); + if (DebugLevel >= 1) + m_log.DebugFormat( + "[SCRIPT INSTANCE]: Stopping script {0} {1} in {2} {3} with timeout {4} {5} {6}", + ScriptName, ItemID, PrimName, ObjectID, timeout, m_InSelfDelete, DateTime.Now.Ticks); IScriptWorkItem workItem; lock (EventQueue) { + if (clearEventQueue) + ClearQueue(); + if (!Running) return true; @@ -533,9 +579,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance } // Wait for the current event to complete. - if (!m_InSelfDelete && workItem.Wait(new TimeSpan((long)timeout * 100000))) + if (!m_InSelfDelete) { - return true; + if (!m_coopTermination) + { + // If we're not co-operative terminating then try and wait for the event to complete before stopping + if (workItem.Wait(timeout)) + return true; + } + else + { + if (DebugLevel >= 1) + m_log.DebugFormat( + "[SCRIPT INSTANCE]: Co-operatively stopping script {0} {1} in {2} {3}", + ScriptName, ItemID, PrimName, ObjectID); + + // This will terminate the event on next handle check by the script. + m_coopSleepHandle.Set(); + + // For now, we will wait forever since the event should always cleanly terminate once LSL loop + // checking is implemented. May want to allow a shorter timeout option later. + if (workItem.Wait(Timeout.Infinite)) + { + if (DebugLevel >= 1) + m_log.DebugFormat( + "[SCRIPT INSTANCE]: Co-operatively stopped script {0} {1} in {2} {3}", + ScriptName, ItemID, PrimName, ObjectID); + + return true; + } + } } lock (EventQueue) @@ -548,6 +621,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance // If the event still hasn't stopped and we the stop isn't the result of script or object removal, then // forcibly abort the work item (this aborts the underlying thread). + // Co-operative termination should never reach this point. if (!m_InSelfDelete) { m_log.DebugFormat( @@ -570,12 +644,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance if (state == State) return; - PostEvent(new EventParams("state_exit", new Object[0], - new DetectParams[0])); - PostEvent(new EventParams("state", new Object[] { state }, - new DetectParams[0])); - PostEvent(new EventParams("state_entry", new Object[0], - new DetectParams[0])); + EventParams lastTimerEv = null; + + lock (EventQueue) + { + // Remove all queued events, remembering the last timer event + while (EventQueue.Count > 0) + { + EventParams tempv = (EventParams)EventQueue.Dequeue(); + if (tempv.EventName == "timer") lastTimerEv = tempv; + } + + // Post events + PostEvent(new EventParams("state_exit", new Object[0], + new DetectParams[0])); + PostEvent(new EventParams("state", new Object[] { state }, + new DetectParams[0])); + PostEvent(new EventParams("state_entry", new Object[0], + new DetectParams[0])); + + // Requeue the timer event after the state changing events + if (lastTimerEv != null) EventQueue.Enqueue(lastTimerEv); + + // This will stop events from being queued and processed + // until the new state is started + m_StateChangeInProgress = true; + } throw new EventAbortException(); } @@ -607,6 +701,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance lock (EventQueue) { + // The only events that persist across state changes are timers + if (m_StateChangeInProgress && data.EventName != "timer") + return; + if (EventQueue.Count >= m_MaxScriptQueue) return; @@ -677,196 +775,222 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance if (Suspended) return 0; - EventParams data = null; + ExecutionTimer.Restart(); + + try + { + return EventProcessorInt(); + } + finally + { + ExecutionTimer.Stop(); + ExecutionTime.AddSample(ExecutionTimer); + Part.ParentGroup.Scene.AddScriptExecutionTime(ExecutionTimer.ElapsedTicks); + } + } + } + + private object EventProcessorInt() + { + EventParams data = null; - lock (EventQueue) + lock (EventQueue) + { + data = (EventParams)EventQueue.Dequeue(); + if (data == null) // Shouldn't happen { - data = (EventParams)EventQueue.Dequeue(); - if (data == null) // Shouldn't happen + if (EventQueue.Count > 0 && Running && !ShuttingDown) { - if (EventQueue.Count > 0 && Running && !ShuttingDown) - { - m_CurrentWorkItem = Engine.QueueEventHandler(this); - } - else - { - m_CurrentWorkItem = null; - } - return 0; + m_CurrentWorkItem = Engine.QueueEventHandler(this); } - - if (data.EventName == "timer") - m_TimerQueued = false; - if (data.EventName == "control") + else { - if (m_ControlEventsInQueue > 0) - m_ControlEventsInQueue--; + m_CurrentWorkItem = null; } - if (data.EventName == "collision") - m_CollisionInQueue = false; + return 0; } - SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); + if (data.EventName == "timer") + m_TimerQueued = false; + if (data.EventName == "control") + { + if (m_ControlEventsInQueue > 0) + m_ControlEventsInQueue--; + } + if (data.EventName == "collision") + m_CollisionInQueue = false; + } - if (DebugLevel >= 2) + if (DebugLevel >= 2) + m_log.DebugFormat( + "[SCRIPT INSTANCE]: Processing event {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}", + data.EventName, + ScriptName, + Part.Name, + Part.LocalId, + Part.ParentGroup.Name, + Part.ParentGroup.UUID, + Part.AbsolutePosition, + Part.ParentGroup.Scene.Name); + + m_DetectParams = data.DetectParams; + + if (data.EventName == "state") // Hardcoded state change + { + State = data.Params[0].ToString(); + + if (DebugLevel >= 1) m_log.DebugFormat( - "[SCRIPT INSTANCE]: Processing event {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}", - data.EventName, - ScriptName, - part.Name, - part.LocalId, - part.ParentGroup.Name, - part.ParentGroup.UUID, - part.AbsolutePosition, - part.ParentGroup.Scene.Name); - - m_DetectParams = data.DetectParams; - - if (data.EventName == "state") // Hardcoded state change + "[SCRIPT INSTANCE]: Changing state to {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}", + State, + ScriptName, + Part.Name, + Part.LocalId, + Part.ParentGroup.Name, + Part.ParentGroup.UUID, + Part.AbsolutePosition, + Part.ParentGroup.Scene.Name); + + AsyncCommandManager.StateChange(Engine, + LocalID, ItemID); + // we are effectively in the new state now, so we can resume queueing + // and processing other non-timer events + m_StateChangeInProgress = false; + + Part.SetScriptEvents(ItemID, (int)m_Script.GetStateEventFlags(State)); + } + else + { + if (Engine.World.PipeEventsForScript(LocalID) || + data.EventName == "control") // Don't freeze avies! { - State = data.Params[0].ToString(); + // m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}", + // PrimName, ScriptName, data.EventName, State); - if (DebugLevel >= 1) - m_log.DebugFormat( - "[SCRIPT INSTANCE]: Changing state to {0} for {1}/{2}({3})/{4}({5}) @ {6}/{7}", - State, - ScriptName, - part.Name, - part.LocalId, - part.ParentGroup.Name, - part.ParentGroup.UUID, - part.AbsolutePosition, - part.ParentGroup.Scene.Name); - - AsyncCommandManager.RemoveScript(Engine, - LocalID, ItemID); - - if (part != null) + try { - part.SetScriptEvents(ItemID, - (int)m_Script.GetStateEventFlags(State)); - } - } - else - { - if (Engine.World.PipeEventsForScript(LocalID) || - data.EventName == "control") // Don't freeze avies! - { - // m_log.DebugFormat("[Script] Delivered event {2} in state {3} to {0}.{1}", - // PrimName, ScriptName, data.EventName, State); + m_CurrentEvent = data.EventName; + m_EventStart = DateTime.Now; + m_InEvent = true; try { - m_CurrentEvent = data.EventName; - m_EventStart = DateTime.Now; - m_InEvent = true; - - int start = Util.EnvironmentTickCount(); - - // Reset the measurement period when we reach the end of the current one. - if (start - MeasurementPeriodTickStart > MaxMeasurementPeriod) - MeasurementPeriodTickStart = start; - m_Script.ExecuteEvent(State, data.EventName, data.Params); - - MeasurementPeriodExecutionTime += Util.EnvironmentTickCount() - start; - + } + finally + { m_InEvent = false; m_CurrentEvent = String.Empty; + } - if (m_SaveState) - { - // This will be the very first event we deliver - // (state_entry) in default state - // - SaveState(m_Assembly); + if (m_SaveState) + { + // This will be the very first event we deliver + // (state_entry) in default state + // + SaveState(); - m_SaveState = false; - } + m_SaveState = false; } - catch (Exception e) + } + catch (Exception e) + { + // m_log.DebugFormat( + // "[SCRIPT] Exception in script {0} {1}: {2}{3}", + // ScriptName, ItemID, e.Message, e.StackTrace); + + if ((!(e is TargetInvocationException) + || (!(e.InnerException is SelfDeleteException) + && !(e.InnerException is ScriptDeleteException) + && !(e.InnerException is ScriptCoopStopException))) + && !(e is ThreadAbortException)) { -// m_log.DebugFormat( -// "[SCRIPT] Exception in script {0} {1}: {2}{3}", -// ScriptName, ItemID, e.Message, e.StackTrace); - - m_InEvent = false; - m_CurrentEvent = String.Empty; - - if ((!(e is TargetInvocationException) || (!(e.InnerException is SelfDeleteException) && !(e.InnerException is ScriptDeleteException))) && !(e is ThreadAbortException)) + try { - try - { - // DISPLAY ERROR INWORLD - string text = FormatException(e); - - if (text.Length > 1000) - text = text.Substring(0, 1000); - Engine.World.SimChat(Utils.StringToBytes(text), - ChatTypeEnum.DebugChannel, 2147483647, - part.AbsolutePosition, - part.Name, part.UUID, false); - - - m_log.DebugFormat( - "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}", - ScriptName, - PrimName, - part.UUID, - part.AbsolutePosition, - part.ParentGroup.Scene.Name, - text.Replace("\n", "\\n"), - e.InnerException); - } - catch (Exception) - { - } - // catch (Exception e2) // LEGIT: User Scripting - // { - // m_log.Error("[SCRIPT]: "+ - // "Error displaying error in-world: " + - // e2.ToString()); - // m_log.Error("[SCRIPT]: " + - // "Errormessage: Error compiling script:\r\n" + - // e.ToString()); - // } + // DISPLAY ERROR INWORLD + string text = FormatException(e); + + if (text.Length > 1000) + text = text.Substring(0, 1000); + Engine.World.SimChat(Utils.StringToBytes(text), + ChatTypeEnum.DebugChannel, 2147483647, + Part.AbsolutePosition, + Part.Name, Part.UUID, false); + + + m_log.Debug(string.Format( + "[SCRIPT INSTANCE]: Runtime error in script {0} (event {1}), part {2} {3} at {4} in {5} ", + ScriptName, + data.EventName, + PrimName, + Part.UUID, + Part.AbsolutePosition, + Part.ParentGroup.Scene.Name), + e); } - else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) + catch (Exception) { - m_InSelfDelete = true; - if (part != null) - Engine.World.DeleteSceneObject(part.ParentGroup, false); - } - else if ((e is TargetInvocationException) && (e.InnerException is ScriptDeleteException)) - { - m_InSelfDelete = true; - if (part != null) - part.Inventory.RemoveInventoryItem(ItemID); } + // catch (Exception e2) // LEGIT: User Scripting + // { + // m_log.Error("[SCRIPT]: "+ + // "Error displaying error in-world: " + + // e2.ToString()); + // m_log.Error("[SCRIPT]: " + + // "Errormessage: Error compiling script:\r\n" + + // e.ToString()); + // } + } + else if ((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) + { + m_InSelfDelete = true; + Engine.World.DeleteSceneObject(Part.ParentGroup, false); + } + else if ((e is TargetInvocationException) && (e.InnerException is ScriptDeleteException)) + { + m_InSelfDelete = true; + Part.Inventory.RemoveInventoryItem(ItemID); + } + else if ((e is TargetInvocationException) && (e.InnerException is ScriptCoopStopException)) + { + if (DebugLevel >= 1) + m_log.DebugFormat( + "[SCRIPT INSTANCE]: Script {0}.{1} in event {2}, state {3} stopped co-operatively.", + PrimName, ScriptName, data.EventName, State); } } } + } - // If there are more events and we are currently running and not shutting down, then ask the - // script engine to run the next event. - lock (EventQueue) + // If there are more events and we are currently running and not shutting down, then ask the + // script engine to run the next event. + lock (EventQueue) + { + // Increase processed events counter and prevent wrap; + if (++EventsProcessed == 1000000) + EventsProcessed = 100000; + + if ((EventsProcessed % 100000) == 0 && DebugLevel > 0) { - EventsProcessed++; + m_log.DebugFormat("[SCRIPT INSTANCE]: Script \"{0}\" (Object \"{1}\" {2} @ {3}.{4}, Item ID {5}, Asset {6}) in event {7}: processed {8:n0} script events", + ScriptTask.Name, + Part.ParentGroup.Name, Part.ParentGroup.UUID, Part.ParentGroup.AbsolutePosition, Part.ParentGroup.Scene.Name, + ScriptTask.ItemID, ScriptTask.AssetID, data.EventName, EventsProcessed); + } - if (EventQueue.Count > 0 && Running && !ShuttingDown) - { - m_CurrentWorkItem = Engine.QueueEventHandler(this); - } - else - { - m_CurrentWorkItem = null; - } + if (EventQueue.Count > 0 && Running && !ShuttingDown) + { + m_CurrentWorkItem = Engine.QueueEventHandler(this); } + else + { + m_CurrentWorkItem = null; + } + } - m_DetectParams = null; + m_DetectParams = null; - return 0; - } + return 0; } public int EventTime() @@ -888,19 +1012,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance ReleaseControls(); Stop(timeout); - SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); - part.Inventory.GetInventoryItem(ItemID).PermsMask = 0; - part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; + Part.Inventory.GetInventoryItem(ItemID).PermsMask = 0; + Part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID); EventQueue.Clear(); m_Script.ResetVars(); + StartParam = 0; State = "default"; - part.SetScriptEvents(ItemID, + Part.SetScriptEvents(ItemID, (int)m_Script.GetStateEventFlags(State)); if (running) Start(); - m_SaveState = true; + + m_SaveState = StatePersistedHere; + PostEvent(new EventParams("state_entry", new Object[0], new DetectParams[0])); } @@ -913,21 +1039,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance ReleaseControls(); m_Script.ResetVars(); - SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID); - part.Inventory.GetInventoryItem(ItemID).PermsMask = 0; - part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; + Part.Inventory.GetInventoryItem(ItemID).PermsMask = 0; + Part.Inventory.GetInventoryItem(ItemID).PermsGranter = UUID.Zero; AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID); EventQueue.Clear(); m_Script.ResetVars(); + string oldState = State; + StartParam = 0; State = "default"; - part.SetScriptEvents(ItemID, + Part.SetScriptEvents(ItemID, (int)m_Script.GetStateEventFlags(State)); - if (m_CurrentEvent != "state_entry") + if (m_CurrentEvent != "state_entry" || oldState != "default") { - m_SaveState = true; + m_SaveState = StatePersistedHere; PostEvent(new EventParams("state_entry", new Object[0], new DetectParams[0])); throw new EventAbortException(); @@ -944,6 +1071,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public void SetVars(Dictionary vars) { +// foreach (KeyValuePair kvp in vars) +// m_log.DebugFormat("[SCRIPT INSTANCE]: Setting var {0}={1}", kvp.Key, kvp.Value); + m_Script.SetVars(vars); } @@ -967,42 +1097,63 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance return m_DetectParams[idx].Key; } - public void SaveState(string assembly) + public void SaveState() { - // If we're currently in an event, just tell it to save upon return - // - if (m_InEvent) - { - m_SaveState = true; + if (!Running && !StayStopped) return; - } + // We cannot call this inside the EventQueue lock since it will currently take AsyncCommandManager.staticLock. + // This may already be held by AsyncCommandManager.DoOneCmdHandlerPass() which in turn can take EventQueue + // lock via ScriptInstance.PostEvent(). PluginData = AsyncCommandManager.GetSerializationData(Engine, ItemID); - string xml = ScriptSerializer.Serialize(this); - - // Compare hash of the state we just just created with the state last written to disk - // If the state is different, update the disk file. - UUID hash = UUID.Parse(Utils.MD5String(xml)); - - if (hash != m_CurrentStateHash) + // We need to lock here to avoid any race with a thread that is removing this script. + lock (EventQueue) { - try + // Check again to avoid a race with a thread in Stop() + if (!Running && !StayStopped) + return; + + // If we're currently in an event, just tell it to save upon return + // + if (m_InEvent) { - FileStream fs = File.Create(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state")); - Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml); - fs.Write(buf, 0, buf.Length); - fs.Close(); + m_SaveState = true; + return; } - catch(Exception) + + // m_log.DebugFormat( + // "[SCRIPT INSTANCE]: Saving state for script {0} (id {1}) in part {2} (id {3}) in object {4} in {5}", + // ScriptTask.Name, ScriptTask.ItemID, Part.Name, Part.UUID, Part.ParentGroup.Name, Engine.World.Name); + + string xml = ScriptSerializer.Serialize(this); + + // Compare hash of the state we just just created with the state last written to disk + // If the state is different, update the disk file. + UUID hash = UUID.Parse(Utils.MD5String(xml)); + + if (hash != m_CurrentStateHash) { - // m_log.Error("Unable to save xml\n"+e.ToString()); + try + { + using (FileStream fs = File.Create(Path.Combine(m_dataPath, ItemID.ToString() + ".state"))) + { + Byte[] buf = Util.UTF8NoBomEncoding.GetBytes(xml); + fs.Write(buf, 0, buf.Length); + } + } + catch(Exception) + { + // m_log.Error("Unable to save xml\n"+e.ToString()); + } + //if (!File.Exists(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"))) + //{ + // throw new Exception("Completed persistence save, but no file was created"); + //} + m_CurrentStateHash = hash; } - //if (!File.Exists(Path.Combine(Path.GetDirectoryName(assembly), ItemID.ToString() + ".state"))) - //{ - // throw new Exception("Completed persistence save, but no file was created"); - //} - m_CurrentStateHash = hash; + + StayStopped = false; } } @@ -1072,7 +1223,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance public string GetAssemblyName() { - return m_Assembly; + return m_assemblyPath; } public string GetXMLState() @@ -1109,4 +1260,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance Suspended = false; } } + + /// + /// Xengine event wait handle. + /// + /// + /// This class exists becase XEngineScriptBase gets a reference to this wait handle. We need to make sure that + /// when scripts are running in different AppDomains the lease does not expire. + /// FIXME: Like LSL_Api, etc., this effectively leaks memory since the GC will never collect it. To avoid this, + /// proper remoting sponsorship needs to be implemented across the board. + /// + public class XEngineEventWaitHandle : EventWaitHandle + { + public XEngineEventWaitHandle(bool initialState, EventResetMode mode) : base(initialState, mode) {} + + public override Object InitializeLifetimeService() + { + return null; + } + } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs new file mode 100644 index 0000000..5b9794b --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/Tests/CoopTerminationTests.cs @@ -0,0 +1,513 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Threading; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Scripting.WorldComm; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.ScriptEngine.XEngine; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Shared.Instance.Tests +{ + /// + /// Test that co-operative script thread termination is working correctly. + /// + [TestFixture] + public class CoopTerminationTests : OpenSimTestCase + { + private TestScene m_scene; + private OpenSim.Region.ScriptEngine.XEngine.XEngine m_xEngine; + + private AutoResetEvent m_chatEvent; + private AutoResetEvent m_stoppedEvent; + + private OSChatMessage m_osChatMessageReceived; + + /// + /// Number of chat messages received so far. Reset before each test. + /// + private int m_chatMessagesReceived; + + /// + /// Number of chat messages expected. m_chatEvent is not fired until this number is reached or exceeded. + /// + private int m_chatMessagesThreshold; + + [SetUp] + public void Init() + { + m_osChatMessageReceived = null; + m_chatMessagesReceived = 0; + m_chatMessagesThreshold = 0; + m_chatEvent = new AutoResetEvent(false); + m_stoppedEvent = new AutoResetEvent(false); + + //AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory + "/bin"); +// Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + m_xEngine = new OpenSim.Region.ScriptEngine.XEngine.XEngine(); + m_xEngine.DebugLevel = 1; + + IniConfigSource configSource = new IniConfigSource(); + + IConfig startupConfig = configSource.AddConfig("Startup"); + startupConfig.Set("DefaultScriptEngine", "XEngine"); + + IConfig xEngineConfig = configSource.AddConfig("XEngine"); + xEngineConfig.Set("Enabled", "true"); + xEngineConfig.Set("StartDelay", "0"); + + // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call + // to AssemblyResolver.OnAssemblyResolve fails. + xEngineConfig.Set("AppDomainLoading", "false"); + + xEngineConfig.Set("ScriptStopStrategy", "co-op"); + + // Make sure loops aren't actually being terminated by a script delay wait. + xEngineConfig.Set("ScriptDelayFactor", 0); + + // This is really just set for debugging the test. + xEngineConfig.Set("WriteScriptSourceToDebugFile", true); + + // Set to false if we need to debug test so the old scripts don't get wiped before each separate test +// xEngineConfig.Set("DeleteScriptsOnStartup", false); + + // This is not currently used at all for co-op termination. Bumping up to demonstrate that co-op termination + // has an effect - without it tests will fail due to a 120 second wait for the event to finish. + xEngineConfig.Set("WaitForEventCompletionOnScriptStop", 120000); + + m_scene = new SceneHelpers().SetupScene("My Test", TestHelpers.ParseTail(0x9999), 1000, 1000, configSource); + SceneHelpers.SetupSceneModules(m_scene, configSource, m_xEngine); + m_scene.StartScripts(); + } + + /// + /// Test co-operative termination on derez of an object containing a script with a long-running event. + /// + /// + /// TODO: Actually compiling the script is incidental to this test. Really want a way to compile test scripts + /// within the build itself. + /// + [Test] + public void TestStopOnLongSleep() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + llSay(0, ""Thin Lizzy""); + llSleep(60); + } +}"; + + TestStop(script); + } + + [Test] + public void TestNoStopOnSingleStatementForLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + for (i = 0; i <= 1; i++) llSay(0, ""Iter "" + (string)i); + } +}"; + + TestSingleStatementNoStop(script); + } + + [Test] + public void TestStopOnLongSingleStatementForLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + for (i = 0; i < 2147483647; i++) llSay(0, ""Iter "" + (string)i); + } +}"; + + TestStop(script); + } + + [Test] + public void TestStopOnLongCompoundStatementForLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + for (i = 0; i < 2147483647; i++) + { + llSay(0, ""Iter "" + (string)i); + } + } +}"; + + TestStop(script); + } + + [Test] + public void TestNoStopOnSingleStatementWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + while (i < 2) llSay(0, ""Iter "" + (string)i++); + } +}"; + + TestSingleStatementNoStop(script); + } + + [Test] + public void TestStopOnLongSingleStatementWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + while (1 == 1) + llSay(0, ""Iter "" + (string)i++); + } +}"; + + TestStop(script); + } + + [Test] + public void TestStopOnLongCompoundStatementWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + while (1 == 1) + { + llSay(0, ""Iter "" + (string)i++); + } + } +}"; + + TestStop(script); + } + + [Test] + public void TestNoStopOnSingleStatementDoWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + + do llSay(0, ""Iter "" + (string)i++); + while (i < 2); + } +}"; + + TestSingleStatementNoStop(script); + } + + [Test] + public void TestStopOnLongSingleStatementDoWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + do llSay(0, ""Iter "" + (string)i++); + while (1 == 1); + } +}"; + + TestStop(script); + } + + [Test] + public void TestStopOnLongCompoundStatementDoWhileLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + do + { + llSay(0, ""Iter "" + (string)i++); + } while (1 == 1); + } +}"; + + TestStop(script); + } + + [Test] + public void TestStopOnInfiniteJumpLoop() + { + TestHelpers.InMethod(); + TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + @p1; + llSay(0, ""Iter "" + (string)i++); + jump p1; + } +}"; + + TestStop(script); + } + + // Disabling for now as these are not particularly useful tests (since they fail due to stack overflow before + // termination can even be tried. +// [Test] + public void TestStopOnInfiniteUserFunctionCallLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@" +integer i = 0; + +ufn1() +{ + llSay(0, ""Iter ufn1() "" + (string)i++); + ufn1(); +} + +default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + ufn1(); + } +}"; + + TestStop(script); + } + + // Disabling for now as these are not particularly useful tests (since they fail due to stack overflow before + // termination can even be tried. +// [Test] + public void TestStopOnInfiniteManualEventCallLoop() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + string script = +@"default +{ + state_entry() + { + integer i = 0; + llSay(0, ""Thin Lizzy""); + + llSay(0, ""Iter"" + (string)i++); + default_event_state_entry(); + } +}"; + + TestStop(script); + } + + private SceneObjectPart CreateScript(string script, string itemName, UUID userId) + { +// UUID objectId = TestHelpers.ParseTail(0x100); +// UUID itemId = TestHelpers.ParseTail(0x3); + + SceneObjectGroup so + = SceneHelpers.CreateSceneObject(1, userId, string.Format("Object for {0}", itemName), 0x100); + m_scene.AddNewSceneObject(so, true); + + InventoryItemBase itemTemplate = new InventoryItemBase(); +// itemTemplate.ID = itemId; + itemTemplate.Name = itemName; + itemTemplate.Folder = so.UUID; + itemTemplate.InvType = (int)InventoryType.LSL; + + m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; + + return m_scene.RezNewScript(userId, itemTemplate, script); + } + + private void TestSingleStatementNoStop(string script) + { + // In these tests we expect to see at least 2 chat messages to confirm that the loop is working properly. + m_chatMessagesThreshold = 2; + + UUID userId = TestHelpers.ParseTail(0x1); +// UUID objectId = TestHelpers.ParseTail(0x100); +// UUID itemId = TestHelpers.ParseTail(0x3); + string itemName = "TestNoStop"; + + SceneObjectPart partWhereRezzed = CreateScript(script, itemName, userId); + + // Wait for the script to start the event before we try stopping it. + m_chatEvent.WaitOne(60000); + + if (m_osChatMessageReceived == null) + Assert.Fail("Script did not start"); + else + Assert.That(m_chatMessagesReceived, Is.EqualTo(2)); + + bool running; + TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); + Assert.That( + SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); + Assert.That(running, Is.True); + } + + private void TestStop(string script) + { + // In these tests we're only interested in the first message to confirm that the script has started. + m_chatMessagesThreshold = 1; + + UUID userId = TestHelpers.ParseTail(0x1); +// UUID objectId = TestHelpers.ParseTail(0x100); +// UUID itemId = TestHelpers.ParseTail(0x3); + string itemName = "TestStop"; + + SceneObjectPart partWhereRezzed = CreateScript(script, itemName, userId); + TaskInventoryItem rezzedItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); + + // Wait for the script to start the event before we try stopping it. + m_chatEvent.WaitOne(60000); + + if (m_osChatMessageReceived != null) + Console.WriteLine("Script started with message [{0}]", m_osChatMessageReceived.Message); + else + Assert.Fail("Script did not start"); + + // FIXME: This is a very poor way of trying to avoid a low-probability race condition where the script + // executes llSay() but has not started the next statement before we try to stop it. + Thread.Sleep(1000); + + // We need a way of carrying on if StopScript() fail, since it won't return if the script isn't actually + // stopped. This kind of multi-threading is far from ideal in a regression test. + new Thread(() => { m_xEngine.StopScript(rezzedItem.ItemID); m_stoppedEvent.Set(); }).Start(); + + if (!m_stoppedEvent.WaitOne(30000)) + Assert.Fail("Script did not co-operatively stop."); + + bool running; + TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); + Assert.That( + SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); + Assert.That(running, Is.False); + } + + private void OnChatFromWorld(object sender, OSChatMessage oscm) + { + Console.WriteLine("Got chat [{0}]", oscm.Message); + m_osChatMessageReceived = oscm; + + if (++m_chatMessagesReceived >= m_chatMessagesThreshold) + { + m_scene.EventManager.OnChatFromWorld -= OnChatFromWorld; + m_chatEvent.Set(); + } + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index fcb98a5..0ca5ff3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -102,19 +102,19 @@ namespace OpenSim.Region.ScriptEngine.Shared public override string ToString() { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); + string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", x, y, z); return s; } public static explicit operator LSLString(Vector3 vec) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); + string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); return new LSLString(s); } public static explicit operator string(Vector3 vec) { - string s=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); + string s=String.Format(Culture.FormatProvider,"<{0:0.000000},{1:0.000000},{2:0.000000}>", vec.x, vec.y, vec.z); return s; } @@ -371,6 +371,31 @@ namespace OpenSim.Region.ScriptEngine.Shared #endregion + #region Methods + public Quaternion Normalize() + { + double length = Math.Sqrt(x * x + y * y + z * z + s * s); + if (length < float.Epsilon) + { + x = 0; + y = 0; + z = 0; + s = 1; + } + else + { + + double invLength = 1.0 / length; + x *= invLength; + y *= invLength; + z *= invLength; + s *= invLength; + } + + return this; + } + #endregion + #region Overriders public override int GetHashCode() @@ -477,7 +502,7 @@ namespace OpenSim.Region.ScriptEngine.Shared } [Serializable] - public class list + public struct list { private object[] m_data; @@ -544,111 +569,136 @@ namespace OpenSim.Region.ScriptEngine.Shared set {m_data = value; } } - // Function to obtain LSL type from an index. This is needed - // because LSL lists allow for multiple types, and safely - // iterating in them requires a type check. + + /// + /// Obtain LSL type from an index. + /// + /// + /// This is needed because LSL lists allow for multiple types, and safely + /// iterating in them requires a type check. + /// + /// + /// public Type GetLSLListItemType(int itemIndex) { - return m_data[itemIndex].GetType(); - } - - // Member functions to obtain item as specific types. - // For cases where implicit conversions would apply if items - // were not in a list (e.g. integer to float, but not float - // to integer) functions check for alternate types so as to - // down-cast from Object to the correct type. - // Note: no checks for item index being valid are performed - + return Data[itemIndex].GetType(); + } + + /// + /// Obtain float from an index. + /// + /// + /// For cases where implicit conversions would apply if items + /// were not in a list (e.g. integer to float, but not float + /// to integer) functions check for alternate types so as to + /// down-cast from Object to the correct type. + /// Note: no checks for item index being valid are performed + /// + /// + /// public LSL_Types.LSLFloat GetLSLFloatItem(int itemIndex) { - if (m_data[itemIndex] is LSL_Types.LSLInteger) + if (Data[itemIndex] is LSL_Types.LSLInteger) { - return (LSL_Types.LSLInteger)m_data[itemIndex]; + return (LSL_Types.LSLInteger)Data[itemIndex]; } - else if (m_data[itemIndex] is Int32) + else if (Data[itemIndex] is Int32) { - return new LSL_Types.LSLFloat((int)m_data[itemIndex]); + return new LSL_Types.LSLFloat((int)Data[itemIndex]); } - else if (m_data[itemIndex] is float) + else if (Data[itemIndex] is float) { - return new LSL_Types.LSLFloat((float)m_data[itemIndex]); + return new LSL_Types.LSLFloat((float)Data[itemIndex]); } - else if (m_data[itemIndex] is Double) + else if (Data[itemIndex] is Double) { - return new LSL_Types.LSLFloat((Double)m_data[itemIndex]); + return new LSL_Types.LSLFloat((Double)Data[itemIndex]); } - else if (m_data[itemIndex] is LSL_Types.LSLString) + else if (Data[itemIndex] is LSL_Types.LSLString) { - return new LSL_Types.LSLFloat(m_data[itemIndex].ToString()); + return new LSL_Types.LSLFloat(Data[itemIndex].ToString()); } else { - return (LSL_Types.LSLFloat)m_data[itemIndex]; + return (LSL_Types.LSLFloat)Data[itemIndex]; } } public LSL_Types.LSLString GetLSLStringItem(int itemIndex) { - if (m_data[itemIndex] is LSL_Types.key) - { - return (LSL_Types.key)m_data[itemIndex]; - } - else if (m_data[itemIndex] is String) - { - return new LSL_Types.LSLString((string)m_data[itemIndex]); - } - else if (m_data[itemIndex] is LSL_Types.LSLFloat) - { - return new LSL_Types.LSLString((LSLFloat)m_data[itemIndex]); - } - else if (m_data[itemIndex] is LSL_Types.LSLInteger) - { - return new LSL_Types.LSLString((LSLInteger)m_data[itemIndex]); - } - else - { - return (LSL_Types.LSLString)m_data[itemIndex]; - } + if (Data[itemIndex] is LSL_Types.key) + { + return (LSL_Types.key)Data[itemIndex]; + } + else + { + return new LSL_Types.LSLString(Data[itemIndex].ToString()); + } } public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex) { - if (m_data[itemIndex] is LSL_Types.LSLInteger) - return (LSL_Types.LSLInteger)m_data[itemIndex]; - if (m_data[itemIndex] is LSL_Types.LSLFloat) - return new LSLInteger((int)m_data[itemIndex]); - else if (m_data[itemIndex] is Int32) - return new LSLInteger((int)m_data[itemIndex]); - else if (m_data[itemIndex] is LSL_Types.LSLString) - return new LSLInteger(m_data[itemIndex].ToString()); + if (Data[itemIndex] is LSL_Types.LSLInteger) + return (LSL_Types.LSLInteger)Data[itemIndex]; + if (Data[itemIndex] is LSL_Types.LSLFloat) + return new LSLInteger((int)Data[itemIndex]); + else if (Data[itemIndex] is Int32) + return new LSLInteger((int)Data[itemIndex]); + else if (Data[itemIndex] is LSL_Types.LSLString) + return new LSLInteger(Data[itemIndex].ToString()); else throw new InvalidCastException(string.Format( "{0} expected but {1} given", typeof(LSL_Types.LSLInteger).Name, - m_data[itemIndex] != null ? - m_data[itemIndex].GetType().Name : "null")); + Data[itemIndex] != null ? + Data[itemIndex].GetType().Name : "null")); } public LSL_Types.Vector3 GetVector3Item(int itemIndex) { - if(m_data[itemIndex] is LSL_Types.Vector3) - return (LSL_Types.Vector3)m_data[itemIndex]; + if (Data[itemIndex] is LSL_Types.Vector3) + { + return (LSL_Types.Vector3)Data[itemIndex]; + } + else if(Data[itemIndex] is OpenMetaverse.Vector3) + { + return new LSL_Types.Vector3( + (OpenMetaverse.Vector3)Data[itemIndex]); + } else + { throw new InvalidCastException(string.Format( "{0} expected but {1} given", typeof(LSL_Types.Vector3).Name, - m_data[itemIndex] != null ? - m_data[itemIndex].GetType().Name : "null")); + Data[itemIndex] != null ? + Data[itemIndex].GetType().Name : "null")); + } } public LSL_Types.Quaternion GetQuaternionItem(int itemIndex) { - return (LSL_Types.Quaternion)m_data[itemIndex]; + if (Data[itemIndex] is LSL_Types.Quaternion) + { + return (LSL_Types.Quaternion)Data[itemIndex]; + } + else if(Data[itemIndex] is OpenMetaverse.Quaternion) + { + return new LSL_Types.Quaternion( + (OpenMetaverse.Quaternion)Data[itemIndex]); + } + else + { + throw new InvalidCastException(string.Format( + "{0} expected but {1} given", + typeof(LSL_Types.Quaternion).Name, + Data[itemIndex] != null ? + Data[itemIndex].GetType().Name : "null")); + } } public LSL_Types.key GetKeyItem(int itemIndex) { - return (LSL_Types.key)m_data[itemIndex]; + return (LSL_Types.key)Data[itemIndex]; } public static list operator +(list a, list b) @@ -662,8 +712,11 @@ namespace OpenSim.Region.ScriptEngine.Shared private void ExtendAndAdd(object o) { - Array.Resize(ref m_data, Length + 1); - m_data.SetValue(o, Length - 1); + object[] tmp; + tmp = new object[Data.Length + 1]; + Data.CopyTo(tmp, 0); + tmp.SetValue(o, tmp.Length - 1); + Data = tmp; } public static list operator +(list a, LSLString s) @@ -711,10 +764,10 @@ namespace OpenSim.Region.ScriptEngine.Shared public void Add(object o) { object[] tmp; - tmp = new object[m_data.Length + 1]; - m_data.CopyTo(tmp, 0); - tmp[m_data.Length] = o; - m_data = tmp; + tmp = new object[Data.Length + 1]; + Data.CopyTo(tmp, 0); + tmp[Data.Length] = o; // Since this is tmp.Length - 1 + Data = tmp; } public bool Contains(object o) @@ -741,53 +794,53 @@ namespace OpenSim.Region.ScriptEngine.Shared Object[] ret; if (start < 0) - start=m_data.Length+start; + start=Data.Length+start; if (start < 0) start=0; if (end < 0) - end=m_data.Length+end; + end=Data.Length+end; if (end < 0) end=0; if (start > end) { - if (end >= m_data.Length) + if (end >= Data.Length) return new list(new Object[0]); - if (start >= m_data.Length) - start=m_data.Length-1; + if (start >= Data.Length) + start=Data.Length-1; return GetSublist(end, start); } // start >= 0 && end >= 0 here - if (start >= m_data.Length) + if (start >= Data.Length) { - ret=new Object[m_data.Length]; - Array.Copy(m_data, 0, ret, 0, m_data.Length); + ret=new Object[Data.Length]; + Array.Copy(Data, 0, ret, 0, Data.Length); return new list(ret); } - if (end >= m_data.Length) - end=m_data.Length-1; + if (end >= Data.Length) + end=Data.Length-1; // now, this makes the math easier int remove=end+1-start; - ret=new Object[m_data.Length-remove]; + ret=new Object[Data.Length-remove]; if (ret.Length == 0) return new list(ret); int src; int dest=0; - for (src = 0; src < m_data.Length; src++) + for (src = 0; src < Data.Length; src++) { if (src < start || src > end) - ret[dest++]=m_data[src]; + ret[dest++]=Data[src]; } return new list(ret); @@ -807,12 +860,12 @@ namespace OpenSim.Region.ScriptEngine.Shared if (start < 0) { - start = m_data.Length + start; + start = Data.Length + start; } if (end < 0) { - end = m_data.Length + end; + end = Data.Length + end; } // The conventional case is start <= end @@ -826,15 +879,15 @@ namespace OpenSim.Region.ScriptEngine.Shared // Start sublist beyond length // Also deals with start AND end still negative - if (start >= m_data.Length || end < 0) + if (start >= Data.Length || end < 0) { return new list(); } // Sublist extends beyond the end of the supplied list - if (end >= m_data.Length) + if (end >= Data.Length) { - end = m_data.Length - 1; + end = Data.Length - 1; } // Sublist still starts before the beginning of the list @@ -845,7 +898,7 @@ namespace OpenSim.Region.ScriptEngine.Shared ret = new object[end - start + 1]; - Array.Copy(m_data, start, ret, 0, end - start + 1); + Array.Copy(Data, start, ret, 0, end - start + 1); return new list(ret); @@ -856,7 +909,7 @@ namespace OpenSim.Region.ScriptEngine.Shared else { - list result = null; + list result; // If end is negative, then prefix list is empty if (end < 0) @@ -878,7 +931,7 @@ namespace OpenSim.Region.ScriptEngine.Shared // If start is outside of list, then just return // the prefix, whatever it is. - if (start >= m_data.Length) + if (start >= Data.Length) { return result; } @@ -1056,11 +1109,11 @@ namespace OpenSim.Region.ScriptEngine.Shared { string output; output = String.Empty; - if (m_data.Length == 0) + if (Data.Length == 0) { return String.Empty; } - foreach (object o in m_data) + foreach (object o in Data) { output = output + o.ToString(); } @@ -1255,12 +1308,12 @@ namespace OpenSim.Region.ScriptEngine.Shared public string ToPrettyString() { string output; - if (m_data.Length == 0) + if (Data.Length == 0) { return "[]"; } output = "["; - foreach (object o in m_data) + foreach (object o in Data) { if (o is String) { @@ -1327,27 +1380,6 @@ namespace OpenSim.Region.ScriptEngine.Shared } } - // - // BELOW IS WORK IN PROGRESS... IT WILL CHANGE, SO DON'T USE YET! :) - // - - public struct StringTest - { - // Our own little string - internal string actualString; - public static implicit operator bool(StringTest mString) - { - if (mString.actualString.Length == 0) - return true; - return false; - } - public override string ToString() - { - return actualString; - } - - } - [Serializable] public struct key { @@ -1401,6 +1433,16 @@ namespace OpenSim.Region.ScriptEngine.Shared return false; } } + + public static bool operator true(key k) + { + return (Boolean)k; + } + + public static bool operator false(key k) + { + return !(Boolean)k; + } static public implicit operator key(string s) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs index e6e8777..d08b0a6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs new file mode 100644 index 0000000..af1da7c --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiAvatarTests.cs @@ -0,0 +1,158 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using log4net; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenMetaverse.Assets; +using OpenMetaverse.StructuredData; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Avatar.AvatarFactory; +using OpenSim.Region.OptionalModules.World.NPC; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + /// + /// Tests relating directly to avatars + /// + [TestFixture] + public class LSL_ApiAvatarTests : OpenSimTestCase + { + protected Scene m_scene; + protected XEngine.XEngine m_engine; + + [SetUp] + public override void SetUp() + { + base.SetUp(); + + IConfigSource initConfigSource = new IniConfigSource(); + IConfig config = initConfigSource.AddConfig("XEngine"); + config.Set("Enabled", "true"); + + m_scene = new SceneHelpers().SetupScene(); + SceneHelpers.SetupSceneModules(m_scene, initConfigSource); + + m_engine = new XEngine.XEngine(); + m_engine.Initialise(initConfigSource); + m_engine.AddRegion(m_scene); + } + + /// + /// Test llSetLinkPrimtiveParams for agents. + /// + /// + /// Also testing entity updates here as well. Possibly that's putting 2 different concerns into one test and + /// this should be separated. + /// + [Test] + public void TestllSetLinkPrimitiveParamsForAgent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID userId = TestHelpers.ParseTail(0x1); + + SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; + part.RotationOffset = new Quaternion(0.7071068f, 0, 0, 0.7071068f); + + LSL_Api apiGrp1 = new LSL_Api(); + apiGrp1.Initialize(m_engine, part, null); + + ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); + + // sp has to be less than 10 meters away from 0, 0, 0 (default part position) + Vector3 startPos = new Vector3(3, 2, 1); + sp.AbsolutePosition = startPos; + + sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, part.UUID, Vector3.Zero); + + int entityUpdates = 0; + ((TestClient)sp.ControllingClient).OnReceivedEntityUpdate += (entity, flags) => { if (entity is ScenePresence) { entityUpdates++; }}; + + // Test position + { + Vector3 newPos = new Vector3(1, 2, 3); + apiGrp1.llSetLinkPrimitiveParams(2, new LSL_Types.list(ScriptBaseClass.PRIM_POSITION, newPos)); + + Assert.That(sp.OffsetPosition, Is.EqualTo(newPos)); + + m_scene.Update(1); + Assert.That(entityUpdates, Is.EqualTo(1)); + } + + // Test small reposition + { + Vector3 newPos = new Vector3(1.001f, 2, 3); + apiGrp1.llSetLinkPrimitiveParams(2, new LSL_Types.list(ScriptBaseClass.PRIM_POSITION, newPos)); + + Assert.That(sp.OffsetPosition, Is.EqualTo(newPos)); + + m_scene.Update(1); + Assert.That(entityUpdates, Is.EqualTo(2)); + } + + // Test world rotation + { + Quaternion newRot = new Quaternion(0, 0.7071068f, 0, 0.7071068f); + apiGrp1.llSetLinkPrimitiveParams(2, new LSL_Types.list(ScriptBaseClass.PRIM_ROTATION, newRot)); + + Assert.That( + sp.Rotation, new QuaternionToleranceConstraint(part.GetWorldRotation() * newRot, 0.000001)); + + m_scene.Update(1); + Assert.That(entityUpdates, Is.EqualTo(3)); + } + + // Test local rotation + { + Quaternion newRot = new Quaternion(0, 0.7071068f, 0, 0.7071068f); + apiGrp1.llSetLinkPrimitiveParams(2, new LSL_Types.list(ScriptBaseClass.PRIM_ROT_LOCAL, newRot)); + + Assert.That( + sp.Rotation, new QuaternionToleranceConstraint(newRot, 0.000001)); + + m_scene.Update(1); + Assert.That(entityUpdates, Is.EqualTo(4)); + } + } + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs new file mode 100644 index 0000000..9a5ebce --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs @@ -0,0 +1,248 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Reflection; +using System.Text; +using log4net; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Servers; +using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Region.CoreModules.Scripting.LSLHttp; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + /// + /// Tests for HTTP related functions in LSL + /// + [TestFixture] + public class LSL_ApiHttpTests : OpenSimTestCase + { + private Scene m_scene; + private MockScriptEngine m_engine; + private UrlModule m_urlModule; + + private TaskInventoryItem m_scriptItem; + private LSL_Api m_lslApi; + + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. + Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest; + } + + [TestFixtureTearDown] + public void TestFixureTearDown() + { + // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple + // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression + // tests really shouldn't). + Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; + } + + [SetUp] + public override void SetUp() + { + base.SetUp(); + + // This is an unfortunate bit of clean up we have to do because MainServer manages things through static + // variables and the VM is not restarted between tests. + uint port = 9999; + MainServer.RemoveHttpServer(port); + + BaseHttpServer server = new BaseHttpServer(port, false, 0, ""); + MainServer.AddHttpServer(server); + MainServer.Instance = server; + + server.Start(); + + m_engine = new MockScriptEngine(); + m_urlModule = new UrlModule(); + + m_scene = new SceneHelpers().SetupScene(); + SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine, m_urlModule); + + SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene); + m_scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, so.RootPart); + + // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. + // Possibly this could be done and we could obtain it directly from the MockScriptEngine. + m_lslApi = new LSL_Api(); + m_lslApi.Initialize(m_engine, so.RootPart, m_scriptItem); + } + + [TearDown] + public void TearDown() + { + MainServer.Instance.Stop(); + } + + [Test] + public void TestLlReleaseUrl() + { + TestHelpers.InMethod(); + + m_lslApi.llRequestURL(); + string returnedUri = m_engine.PostedEvents[m_scriptItem.ItemID][0].Params[2].ToString(); + + { + // Check that the initial number of URLs is correct + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); + } + + { + // Check releasing a non-url + m_lslApi.llReleaseURL("GARBAGE"); + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); + } + + { + // Check releasing a non-existing url + m_lslApi.llReleaseURL("http://example.com"); + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); + } + + { + // Check URL release + m_lslApi.llReleaseURL(returnedUri); + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls)); + + HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri); + + bool gotExpectedException = false; + + try + { + using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse()) + {} + } + catch (WebException e) + { + using (HttpWebResponse response = (HttpWebResponse)e.Response) + gotExpectedException = response.StatusCode == HttpStatusCode.NotFound; + } + + Assert.That(gotExpectedException, Is.True); + } + + { + // Check releasing the same URL again + m_lslApi.llReleaseURL(returnedUri); + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls)); + } + } + + [Test] + public void TestLlRequestUrl() + { + TestHelpers.InMethod(); + + string requestId = m_lslApi.llRequestURL(); + Assert.That(requestId, Is.Not.EqualTo(UUID.Zero.ToString())); + string returnedUri; + + { + // Check that URL is correctly set up + Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); + + Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); + + List events = m_engine.PostedEvents[m_scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("http_request")); + + UUID returnKey; + string rawReturnKey = eventParams.Params[0].ToString(); + string method = eventParams.Params[1].ToString(); + returnedUri = eventParams.Params[2].ToString(); + + Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True); + Assert.That(method, Is.EqualTo(ScriptBaseClass.URL_REQUEST_GRANTED)); + Assert.That(Uri.IsWellFormedUriString(returnedUri, UriKind.Absolute), Is.True); + } + + { + // Check that request to URL works. + string testResponse = "Hello World"; + + m_engine.ClearPostedEvents(); + m_engine.PostEventHook + += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); + +// Console.WriteLine("Trying {0}", returnedUri); + + AssertHttpResponse(returnedUri, testResponse); + + Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); + + List events = m_engine.PostedEvents[m_scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("http_request")); + + UUID returnKey; + string rawReturnKey = eventParams.Params[0].ToString(); + string method = eventParams.Params[1].ToString(); + string body = eventParams.Params[2].ToString(); + + Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True); + Assert.That(method, Is.EqualTo("GET")); + Assert.That(body, Is.EqualTo("")); + } + } + + private void AssertHttpResponse(string uri, string expectedResponse) + { + HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri); + + using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse()) + { + using (Stream stream = webResponse.GetResponseStream()) + { + using (StreamReader reader = new StreamReader(stream)) + { + Assert.That(reader.ReadToEnd(), Is.EqualTo(expectedResponse)); + } + } + } + } + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index cb7291a..9b7cab2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs @@ -41,9 +41,10 @@ using OpenSim.Region.OptionalModules.World.NPC; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -90,7 +91,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // Create an object embedded inside the first UUID itemId = TestHelpers.ParseTail(0x20); - TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId); + TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, userId); LSL_Api api = new LSL_Api(); api.Initialize(m_engine, so1.RootPart, null); @@ -130,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // Create an object embedded inside the first UUID itemId = TestHelpers.ParseTail(0x20); - TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, user1Id); + TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); // Create a second object SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); @@ -166,5 +167,122 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests Assert.That(copiedItems[0].Name, Is.EqualTo(inventoryItemName)); } } + + /// + /// Test giving inventory from an object to an avatar that is not the object's owner. + /// + [Test] + public void TestLlGiveInventoryO2DifferentAvatar() + { + TestHelpers.InMethod(); + // TestHelpers.EnableLogging(); + + UUID user1Id = TestHelpers.ParseTail(0x1); + UUID user2Id = TestHelpers.ParseTail(0x2); + string inventoryItemName = "item1"; + + SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); + m_scene.AddSceneObject(so1); + LSL_Api api = new LSL_Api(); + api.Initialize(m_engine, so1.RootPart, null); + + // Create an object embedded inside the first + UUID itemId = TestHelpers.ParseTail(0x20); + TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); + + UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); + + api.llGiveInventory(user2Id.ToString(), inventoryItemName); + + InventoryItemBase receivedItem + = UserInventoryHelpers.GetInventoryItem( + m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); + + Assert.IsNotNull(receivedItem); + } + + /// + /// Test giving inventory from an object to an avatar that is not the object's owner and where the next + /// permissions do not include mod. + /// + [Test] + public void TestLlGiveInventoryO2DifferentAvatarNoMod() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID user1Id = TestHelpers.ParseTail(0x1); + UUID user2Id = TestHelpers.ParseTail(0x2); + string inventoryItemName = "item1"; + + SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); + m_scene.AddSceneObject(so1); + LSL_Api api = new LSL_Api(); + api.Initialize(m_engine, so1.RootPart, null); + + // Create an object embedded inside the first + UUID itemId = TestHelpers.ParseTail(0x20); + TaskInventoryItem tii + = TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, so1.RootPart, inventoryItemName, itemId, user1Id); + tii.NextPermissions &= ~((uint)PermissionMask.Modify); + + UserAccountHelpers.CreateUserWithInventory(m_scene, user2Id); + + api.llGiveInventory(user2Id.ToString(), inventoryItemName); + + InventoryItemBase receivedItem + = UserInventoryHelpers.GetInventoryItem( + m_scene.InventoryService, user2Id, string.Format("Objects/{0}", inventoryItemName)); + + Assert.IsNotNull(receivedItem); + Assert.AreEqual(0, receivedItem.CurrentPermissions & (uint)PermissionMask.Modify); + } + + [Test] + public void TestLlRemoteLoadScriptPin() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID user1Id = TestHelpers.ParseTail(0x1); + UUID user2Id = TestHelpers.ParseTail(0x2); + + SceneObjectGroup sourceSo = SceneHelpers.AddSceneObject(m_scene, "sourceSo", user1Id); + m_scene.AddSceneObject(sourceSo); + LSL_Api api = new LSL_Api(); + api.Initialize(m_engine, sourceSo.RootPart, null); + TaskInventoryHelpers.AddScript(m_scene.AssetService, sourceSo.RootPart, "script", "Hello World"); + + SceneObjectGroup targetSo = SceneHelpers.AddSceneObject(m_scene, "targetSo", user1Id); + SceneObjectGroup otherOwnedTargetSo = SceneHelpers.AddSceneObject(m_scene, "otherOwnedTargetSo", user2Id); + + // Test that we cannot load a script when the target pin has never been set (i.e. it is zero) + api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 0, 0, 0); + Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script")); + + // Test that we cannot load a script when the given pin does not match the target + targetSo.RootPart.ScriptAccessPin = 5; + api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 3, 0, 0); + Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script")); + + // Test that we cannot load into a prim with a different owner + otherOwnedTargetSo.RootPart.ScriptAccessPin = 3; + api.llRemoteLoadScriptPin(otherOwnedTargetSo.UUID.ToString(), "script", 3, 0, 0); + Assert.IsNull(otherOwnedTargetSo.RootPart.Inventory.GetInventoryItem("script")); + + // Test that we can load a script when given pin and dest pin match. + targetSo.RootPart.ScriptAccessPin = 3; + api.llRemoteLoadScriptPin(targetSo.UUID.ToString(), "script", 3, 0, 0); + TaskInventoryItem insertedItem = targetSo.RootPart.Inventory.GetInventoryItem("script"); + Assert.IsNotNull(insertedItem); + + // Test that we can no longer load if access pin is unset + targetSo.RootPart.Inventory.RemoveInventoryItem(insertedItem.ItemID); + Assert.IsNull(targetSo.RootPart.Inventory.GetInventoryItem("script")); + + targetSo.RootPart.ScriptAccessPin = 0; + api.llRemoteLoadScriptPin(otherOwnedTargetSo.UUID.ToString(), "script", 3, 0, 0); + Assert.IsNull(otherOwnedTargetSo.RootPart.Inventory.GetInventoryItem("script")); + } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index d9b17d7..14b1890 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs @@ -41,10 +41,10 @@ using OpenSim.Region.OptionalModules.World.NPC; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // FIXME: This should really be a script item (with accompanying script) TaskInventoryItem grp1Item = TaskInventoryHelpers.AddNotecard( - m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900)); + m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; SceneObjectGroup grp2 = SceneHelpers.CreateSceneObject(2, ownerId, "grp2-", 0x20); @@ -126,7 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // FIXME: This should really be a script item (with accompanying script) TaskInventoryItem grp1Item = TaskInventoryHelpers.AddNotecard( - m_scene, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900)); + m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; @@ -140,5 +140,47 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests SceneObjectGroup grp2 = m_scene.GetSceneObjectGroup("grp1-Part1"); Assert.That(grp2, Is.Not.Null); } + + [Test] + public void TestllBreakAllLinks() + { + TestHelpers.InMethod(); + + UUID ownerId = TestHelpers.ParseTail(0x1); + + SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(3, ownerId, "grp1-", 0x10); + grp1.AbsolutePosition = new Vector3(10, 10, 10); + m_scene.AddSceneObject(grp1); + + // FIXME: This should really be a script item (with accompanying script) + TaskInventoryItem grp1Item + = TaskInventoryHelpers.AddNotecard( + m_scene.AssetService, grp1.RootPart, "ncItem", TestHelpers.ParseTail(0x800), TestHelpers.ParseTail(0x900), "Hello World!"); + + grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; + + LSL_Api apiGrp1 = new LSL_Api(); + apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item); + + apiGrp1.llBreakAllLinks(); + + { + SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part1"); + Assert.That(nowGrp, Is.Not.Null); + Assert.That(nowGrp.Parts.Length, Is.EqualTo(1)); + } + + { + SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part2"); + Assert.That(nowGrp, Is.Not.Null); + Assert.That(nowGrp.Parts.Length, Is.EqualTo(1)); + } + + { + SceneObjectGroup nowGrp = m_scene.GetSceneObjectGroup("grp1-Part3"); + Assert.That(nowGrp, Is.Not.Null); + Assert.That(nowGrp.Parts.Length, Is.EqualTo(1)); + } + } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs index 98017d8..34a29e6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs @@ -34,9 +34,9 @@ using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.Framework.Scenes; using Nini.Config; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenMetaverse; -using OpenSim.Tests.Common.Mock; using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat; using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; @@ -133,4 +133,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests } } } - } \ No newline at end of file + } diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs new file mode 100644 index 0000000..9ab3115 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiNotecardTests.cs @@ -0,0 +1,269 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Reflection; +using System.Text; +using log4net; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Servers; +using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Region.CoreModules.Scripting.LSLHttp; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + /// + /// Tests for notecard related functions in LSL + /// + [TestFixture] + public class LSL_ApiNotecardTests : OpenSimTestCase + { + private Scene m_scene; + private MockScriptEngine m_engine; + + private SceneObjectGroup m_so; + private TaskInventoryItem m_scriptItem; + private LSL_Api m_lslApi; + + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. + Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest; + } + + [TestFixtureTearDown] + public void TestFixureTearDown() + { + // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple + // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression + // tests really shouldn't). + Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; + } + + [SetUp] + public override void SetUp() + { + base.SetUp(); + + m_engine = new MockScriptEngine(); + + m_scene = new SceneHelpers().SetupScene(); + SceneHelpers.SetupSceneModules(m_scene, new IniConfigSource(), m_engine); + + m_so = SceneHelpers.AddSceneObject(m_scene); + m_scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart); + + // This is disconnected from the actual script - the mock engine does not set up any LSL_Api atm. + // Possibly this could be done and we could obtain it directly from the MockScriptEngine. + m_lslApi = new LSL_Api(); + m_lslApi.Initialize(m_engine, m_so.RootPart, m_scriptItem); + } + + [Test] + public void TestLlGetNotecardLine() + { + TestHelpers.InMethod(); + + string[] ncLines = { "One", "Twoè", "Three" }; + + TaskInventoryItem ncItem + = TaskInventoryHelpers.AddNotecard(m_scene.AssetService, m_so.RootPart, "nc", "1", "10", string.Join("\n", ncLines)); + + AssertValidNotecardLine(ncItem.Name, 0, ncLines[0]); + AssertValidNotecardLine(ncItem.Name, 2, ncLines[2]); + AssertValidNotecardLine(ncItem.Name, 3, ScriptBaseClass.EOF); + AssertValidNotecardLine(ncItem.Name, 4, ScriptBaseClass.EOF); + + // XXX: Is this correct or do we really expect no dataserver event to fire at all? + AssertValidNotecardLine(ncItem.Name, -1, ""); + AssertValidNotecardLine(ncItem.Name, -2, ""); + } + + [Test] + public void TestLlGetNotecardLine_NoNotecard() + { + TestHelpers.InMethod(); + + AssertInValidNotecardLine("nc", 0); + } + + [Test] + public void TestLlGetNotecardLine_NotANotecard() + { + TestHelpers.InMethod(); + + TaskInventoryItem ncItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, m_so.RootPart, "nc1", "Not important"); + + AssertInValidNotecardLine(ncItem.Name, 0); + } + + private void AssertValidNotecardLine(string ncName, int lineNumber, string assertLine) + { + string key = m_lslApi.llGetNotecardLine(ncName, lineNumber); + Assert.That(key, Is.Not.EqualTo(UUID.Zero.ToString())); + + Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(1)); + Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); + + List events = m_engine.PostedEvents[m_scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + + Assert.That(eventParams.EventName, Is.EqualTo("dataserver")); + Assert.That(eventParams.Params[0].ToString(), Is.EqualTo(key)); + Assert.That(eventParams.Params[1].ToString(), Is.EqualTo(assertLine)); + + m_engine.ClearPostedEvents(); + } + + private void AssertInValidNotecardLine(string ncName, int lineNumber) + { + string key = m_lslApi.llGetNotecardLine(ncName, lineNumber); + Assert.That(key, Is.EqualTo(UUID.Zero.ToString())); + + Assert.That(m_engine.PostedEvents.Count, Is.EqualTo(0)); + } + +// [Test] +// public void TestLlReleaseUrl() +// { +// TestHelpers.InMethod(); +// +// m_lslApi.llRequestURL(); +// string returnedUri = m_engine.PostedEvents[m_scriptItem.ItemID][0].Params[2].ToString(); +// +// { +// // Check that the initial number of URLs is correct +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); +// } +// +// { +// // Check releasing a non-url +// m_lslApi.llReleaseURL("GARBAGE"); +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); +// } +// +// { +// // Check releasing a non-existing url +// m_lslApi.llReleaseURL("http://example.com"); +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); +// } +// +// { +// // Check URL release +// m_lslApi.llReleaseURL(returnedUri); +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls)); +// +// HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri); +// +// bool gotExpectedException = false; +// +// try +// { +// using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse()) +// {} +// } +// catch (WebException e) +// { +// using (HttpWebResponse response = (HttpWebResponse)e.Response) +// gotExpectedException = response.StatusCode == HttpStatusCode.NotFound; +// } +// +// Assert.That(gotExpectedException, Is.True); +// } +// +// { +// // Check releasing the same URL again +// m_lslApi.llReleaseURL(returnedUri); +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls)); +// } +// } +// +// [Test] +// public void TestLlRequestUrl() +// { +// TestHelpers.InMethod(); +// +// string requestId = m_lslApi.llRequestURL(); +// Assert.That(requestId, Is.Not.EqualTo(UUID.Zero.ToString())); +// string returnedUri; +// +// { +// // Check that URL is correctly set up +// Assert.That(m_lslApi.llGetFreeURLs().value, Is.EqualTo(m_urlModule.TotalUrls - 1)); +// +// Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); +// +// List events = m_engine.PostedEvents[m_scriptItem.ItemID]; +// Assert.That(events.Count, Is.EqualTo(1)); +// EventParams eventParams = events[0]; +// Assert.That(eventParams.EventName, Is.EqualTo("http_request")); +// +// UUID returnKey; +// string rawReturnKey = eventParams.Params[0].ToString(); +// string method = eventParams.Params[1].ToString(); +// returnedUri = eventParams.Params[2].ToString(); +// +// Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True); +// Assert.That(method, Is.EqualTo(ScriptBaseClass.URL_REQUEST_GRANTED)); +// Assert.That(Uri.IsWellFormedUriString(returnedUri, UriKind.Absolute), Is.True); +// } +// +// { +// // Check that request to URL works. +// string testResponse = "Hello World"; +// +// m_engine.ClearPostedEvents(); +// m_engine.PostEventHook +// += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); +// +//// Console.WriteLine("Trying {0}", returnedUri); +// HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri); +// +// AssertHttpResponse(returnedUri, testResponse); +// +// Assert.That(m_engine.PostedEvents.ContainsKey(m_scriptItem.ItemID)); +// +// List events = m_engine.PostedEvents[m_scriptItem.ItemID]; +// Assert.That(events.Count, Is.EqualTo(1)); +// EventParams eventParams = events[0]; +// Assert.That(eventParams.EventName, Is.EqualTo("http_request")); +// +// UUID returnKey; +// string rawReturnKey = eventParams.Params[0].ToString(); +// string method = eventParams.Params[1].ToString(); +// string body = eventParams.Params[2].ToString(); +// +// Assert.That(UUID.TryParse(rawReturnKey, out returnKey), Is.True); +// Assert.That(method, Is.EqualTo("GET")); +// Assert.That(body, Is.EqualTo("")); +// } +// } +// +// private void AssertHttpResponse(string uri, string expectedResponse) +// { +// HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri); +// +// using (HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse()) +// { +// using (Stream stream = webResponse.GetResponseStream()) +// { +// using (StreamReader reader = new StreamReader(stream)) +// { +// Assert.That(reader.ReadToEnd(), Is.EqualTo(expectedResponse)); +// } +// } +// } +// } + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs new file mode 100644 index 0000000..d957bf2 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiObjectTests.cs @@ -0,0 +1,398 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using log4net; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenMetaverse.Assets; +using OpenMetaverse.StructuredData; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Avatar.AvatarFactory; +using OpenSim.Region.OptionalModules.World.NPC; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; +using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger; +using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + [TestFixture] + public class LSL_ApiObjectTests : OpenSimTestCase + { + private const double VECTOR_COMPONENT_ACCURACY = 0.0000005d; + private const float FLOAT_ACCURACY = 0.00005f; + + protected Scene m_scene; + protected XEngine.XEngine m_engine; + + [SetUp] + public override void SetUp() + { + base.SetUp(); + + IConfigSource initConfigSource = new IniConfigSource(); + IConfig config = initConfigSource.AddConfig("XEngine"); + config.Set("Enabled", "true"); + + m_scene = new SceneHelpers().SetupScene(); + SceneHelpers.SetupSceneModules(m_scene, initConfigSource); + + m_engine = new XEngine.XEngine(); + m_engine.Initialise(initConfigSource); + m_engine.AddRegion(m_scene); + } + + [Test] + public void TestllGetLinkPrimitiveParams() + { + TestHelpers.InMethod(); + TestHelpers.EnableLogging(); + + UUID ownerId = TestHelpers.ParseTail(0x1); + + SceneObjectGroup grp1 = SceneHelpers.CreateSceneObject(2, ownerId, "grp1-", 0x10); + grp1.AbsolutePosition = new Vector3(10, 11, 12); + m_scene.AddSceneObject(grp1); + + LSL_Api apiGrp1 = new LSL_Api(); + apiGrp1.Initialize(m_engine, grp1.RootPart, null); + + // Check simple 1 prim case + { + LSL_List resList + = apiGrp1.llGetLinkPrimitiveParams(1, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); + + Assert.That(resList.Length, Is.EqualTo(1)); + } + + // Check 2 prim case + { + LSL_List resList + = apiGrp1.llGetLinkPrimitiveParams( + 1, + new LSL_List( + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), + new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), + new LSL_Integer(2), + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); + + Assert.That(resList.Length, Is.EqualTo(2)); + } + + // Check invalid parameters are ignored + { + LSL_List resList + = apiGrp1.llGetLinkPrimitiveParams(3, new LSL_List(new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); + + Assert.That(resList.Length, Is.EqualTo(0)); + } + + // Check all parameters are ignored if an initial bad link is given + { + LSL_List resList + = apiGrp1.llGetLinkPrimitiveParams( + 3, + new LSL_List( + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), + new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), + new LSL_Integer(1), + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); + + Assert.That(resList.Length, Is.EqualTo(0)); + } + + // Check only subsequent parameters are ignored when we hit the first bad link number + { + LSL_List resList + = apiGrp1.llGetLinkPrimitiveParams( + 1, + new LSL_List( + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION), + new LSL_Integer(ScriptBaseClass.PRIM_LINK_TARGET), + new LSL_Integer(3), + new LSL_Integer(ScriptBaseClass.PRIM_ROTATION))); + + Assert.That(resList.Length, Is.EqualTo(1)); + } + } + + [Test] + // llSetPrimitiveParams and llGetPrimitiveParams test. + public void TestllSetPrimitiveParams() + { + TestHelpers.InMethod(); + + // Create Prim1. + Scene scene = new SceneHelpers().SetupScene(); + string obj1Name = "Prim1"; + UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); + SceneObjectPart part1 = + new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, + Vector3.Zero, Quaternion.Identity, + Vector3.Zero) { Name = obj1Name, UUID = objUuid }; + Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); + + LSL_Api apiGrp1 = new LSL_Api(); + apiGrp1.Initialize(m_engine, part1, null); + + // Note that prim hollow check is passed with the other prim params in order to allow the + // specification of a different check value from the prim param. A cylinder, prism, sphere, + // torus or ring, with a hole shape of square, is limited to a hollow of 70%. Test 5 below + // specifies a value of 95% and checks to see if 70% was properly returned. + + // Test a sphere. + CheckllSetPrimitiveParams( + apiGrp1, + "test 1", // Prim test identification string + new LSL_Types.Vector3(6.0d, 9.9d, 9.9d), // Prim size + ScriptBaseClass.PRIM_TYPE_SPHERE, // Prim type + ScriptBaseClass.PRIM_HOLE_DEFAULT, // Prim hole type + new LSL_Types.Vector3(0.0d, 0.075d, 0.0d), // Prim cut + 0.80f, // Prim hollow + new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist + new LSL_Types.Vector3(0.32d, 0.76d, 0.0d), // Prim dimple + 0.80f); // Prim hollow check + + // Test a prism. + CheckllSetPrimitiveParams( + apiGrp1, + "test 2", // Prim test identification string + new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size + ScriptBaseClass.PRIM_TYPE_PRISM, // Prim type + ScriptBaseClass.PRIM_HOLE_CIRCLE, // Prim hole type + new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut + 0.90f, // Prim hollow + new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist + new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper + new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear + 0.90f); // Prim hollow check + + // Test a box. + CheckllSetPrimitiveParams( + apiGrp1, + "test 3", // Prim test identification string + new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size + ScriptBaseClass.PRIM_TYPE_BOX, // Prim type + ScriptBaseClass.PRIM_HOLE_TRIANGLE, // Prim hole type + new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut + 0.99f, // Prim hollow + new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist + new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper + new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear + 0.99f); // Prim hollow check + + // Test a tube. + CheckllSetPrimitiveParams( + apiGrp1, + "test 4", // Prim test identification string + new LSL_Types.Vector3(4.2d, 4.2d, 4.2d), // Prim size + ScriptBaseClass.PRIM_TYPE_TUBE, // Prim type + ScriptBaseClass.PRIM_HOLE_SQUARE, // Prim hole type + new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut + 0.00f, // Prim hollow + new LSL_Types.Vector3(1.0d, -1.0d, 0.0d), // Prim twist + new LSL_Types.Vector3(1.0d, 0.05d, 0.0d), // Prim hole size + // Expression for y selected to test precision problems during byte + // cast in SetPrimitiveShapeParams. + new LSL_Types.Vector3(0.0d, 0.35d + 0.1d, 0.0d), // Prim shear + new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim profile cut + // Expression for y selected to test precision problems during sbyte + // cast in SetPrimitiveShapeParams. + new LSL_Types.Vector3(-1.0d, 0.70d + 0.1d + 0.1d, 0.0d), // Prim taper + 1.11f, // Prim revolutions + 0.88f, // Prim radius + 0.95f, // Prim skew + 0.00f); // Prim hollow check + + // Test a prism. + CheckllSetPrimitiveParams( + apiGrp1, + "test 5", // Prim test identification string + new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size + ScriptBaseClass.PRIM_TYPE_PRISM, // Prim type + ScriptBaseClass.PRIM_HOLE_SQUARE, // Prim hole type + new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut + 0.99f, // Prim hollow + // Expression for x selected to test precision problems during sbyte + // cast in SetPrimitiveShapeBlockParams. + new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist + // Expression for y selected to test precision problems during sbyte + // cast in SetPrimitiveShapeParams. + new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper + new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear + 0.70f); // Prim hollow check + + // Test a sculpted prim. + CheckllSetPrimitiveParams( + apiGrp1, + "test 6", // Prim test identification string + new LSL_Types.Vector3(2.0d, 2.0d, 2.0d), // Prim size + ScriptBaseClass.PRIM_TYPE_SCULPT, // Prim type + "be293869-d0d9-0a69-5989-ad27f1946fd4", // Prim map + ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE); // Prim sculpt type + } + + // Set prim params for a box, cylinder or prism and check results. + public void CheckllSetPrimitiveParams(LSL_Api api, string primTest, + LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, + float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primTaper, LSL_Types.Vector3 primShear, + float primHollowCheck) + { + // Set the prim params. + api.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, + ScriptBaseClass.PRIM_TYPE, primType, primHoleType, + primCut, primHollow, primTwist, primTaper, primShear)); + + // Get params for prim to validate settings. + LSL_Types.list primParams = + api.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); + + // Validate settings. + CheckllSetPrimitiveParamsVector(primSize, api.llList2Vector(primParams, 0), primTest + " prim size"); + Assert.AreEqual(primType, api.llList2Integer(primParams, 1), + "TestllSetPrimitiveParams " + primTest + " prim type check fail"); + Assert.AreEqual(primHoleType, api.llList2Integer(primParams, 2), + "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); + CheckllSetPrimitiveParamsVector(primCut, api.llList2Vector(primParams, 3), primTest + " prim cut"); + Assert.AreEqual(primHollowCheck, api.llList2Float(primParams, 4), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); + CheckllSetPrimitiveParamsVector(primTwist, api.llList2Vector(primParams, 5), primTest + " prim twist"); + CheckllSetPrimitiveParamsVector(primTaper, api.llList2Vector(primParams, 6), primTest + " prim taper"); + CheckllSetPrimitiveParamsVector(primShear, api.llList2Vector(primParams, 7), primTest + " prim shear"); + } + + // Set prim params for a sphere and check results. + public void CheckllSetPrimitiveParams(LSL_Api api, string primTest, + LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, + float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primDimple, float primHollowCheck) + { + // Set the prim params. + api.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, + ScriptBaseClass.PRIM_TYPE, primType, primHoleType, + primCut, primHollow, primTwist, primDimple)); + + // Get params for prim to validate settings. + LSL_Types.list primParams = + api.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); + + // Validate settings. + CheckllSetPrimitiveParamsVector(primSize, api.llList2Vector(primParams, 0), primTest + " prim size"); + Assert.AreEqual(primType, api.llList2Integer(primParams, 1), + "TestllSetPrimitiveParams " + primTest + " prim type check fail"); + Assert.AreEqual(primHoleType, api.llList2Integer(primParams, 2), + "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); + CheckllSetPrimitiveParamsVector(primCut, api.llList2Vector(primParams, 3), primTest + " prim cut"); + Assert.AreEqual(primHollowCheck, api.llList2Float(primParams, 4), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); + CheckllSetPrimitiveParamsVector(primTwist, api.llList2Vector(primParams, 5), primTest + " prim twist"); + CheckllSetPrimitiveParamsVector(primDimple, api.llList2Vector(primParams, 6), primTest + " prim dimple"); + } + + // Set prim params for a torus, tube or ring and check results. + public void CheckllSetPrimitiveParams(LSL_Api api, string primTest, + LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, + float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primHoleSize, + LSL_Types.Vector3 primShear, LSL_Types.Vector3 primProfCut, LSL_Types.Vector3 primTaper, + float primRev, float primRadius, float primSkew, float primHollowCheck) + { + // Set the prim params. + api.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, + ScriptBaseClass.PRIM_TYPE, primType, primHoleType, + primCut, primHollow, primTwist, primHoleSize, primShear, primProfCut, + primTaper, primRev, primRadius, primSkew)); + + // Get params for prim to validate settings. + LSL_Types.list primParams = + api.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); + + // Valdate settings. + CheckllSetPrimitiveParamsVector(primSize, api.llList2Vector(primParams, 0), primTest + " prim size"); + Assert.AreEqual(primType, api.llList2Integer(primParams, 1), + "TestllSetPrimitiveParams " + primTest + " prim type check fail"); + Assert.AreEqual(primHoleType, api.llList2Integer(primParams, 2), + "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); + CheckllSetPrimitiveParamsVector(primCut, api.llList2Vector(primParams, 3), primTest + " prim cut"); + Assert.AreEqual(primHollowCheck, api.llList2Float(primParams, 4), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); + CheckllSetPrimitiveParamsVector(primTwist, api.llList2Vector(primParams, 5), primTest + " prim twist"); + CheckllSetPrimitiveParamsVector(primHoleSize, api.llList2Vector(primParams, 6), primTest + " prim hole size"); + CheckllSetPrimitiveParamsVector(primShear, api.llList2Vector(primParams, 7), primTest + " prim shear"); + CheckllSetPrimitiveParamsVector(primProfCut, api.llList2Vector(primParams, 8), primTest + " prim profile cut"); + CheckllSetPrimitiveParamsVector(primTaper, api.llList2Vector(primParams, 9), primTest + " prim taper"); + Assert.AreEqual(primRev, api.llList2Float(primParams, 10), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim revolutions fail"); + Assert.AreEqual(primRadius, api.llList2Float(primParams, 11), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim radius fail"); + Assert.AreEqual(primSkew, api.llList2Float(primParams, 12), FLOAT_ACCURACY, + "TestllSetPrimitiveParams " + primTest + " prim skew fail"); + } + + // Set prim params for a sculpted prim and check results. + public void CheckllSetPrimitiveParams(LSL_Api api, string primTest, + LSL_Types.Vector3 primSize, int primType, string primMap, int primSculptType) + { + // Set the prim params. + api.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, + ScriptBaseClass.PRIM_TYPE, primType, primMap, primSculptType)); + + // Get params for prim to validate settings. + LSL_Types.list primParams = + api.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); + + // Validate settings. + CheckllSetPrimitiveParamsVector(primSize, api.llList2Vector(primParams, 0), primTest + " prim size"); + Assert.AreEqual(primType, api.llList2Integer(primParams, 1), + "TestllSetPrimitiveParams " + primTest + " prim type check fail"); + Assert.AreEqual(primMap, (string)api.llList2String(primParams, 2), + "TestllSetPrimitiveParams " + primTest + " prim map check fail"); + Assert.AreEqual(primSculptType, api.llList2Integer(primParams, 3), + "TestllSetPrimitiveParams " + primTest + " prim type scuplt check fail"); + } + + public void CheckllSetPrimitiveParamsVector(LSL_Types.Vector3 vecCheck, LSL_Types.Vector3 vecReturned, string msg) + { + // Check each vector component against expected result. + Assert.AreEqual(vecCheck.x, vecReturned.x, VECTOR_COMPONENT_ACCURACY, + "TestllSetPrimitiveParams " + msg + " vector check fail on x component"); + Assert.AreEqual(vecCheck.y, vecReturned.y, VECTOR_COMPONENT_ACCURACY, + "TestllSetPrimitiveParams " + msg + " vector check fail on y component"); + Assert.AreEqual(vecCheck.z, vecReturned.z, VECTOR_COMPONENT_ACCURACY, + "TestllSetPrimitiveParams " + msg + " vector check fail on z component"); + } + + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index c41d1e7..d929da8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs @@ -33,10 +33,10 @@ using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.Framework.Scenes; using Nini.Config; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenMetaverse; using System; -using OpenSim.Tests.Common.Mock; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -46,9 +46,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests [TestFixture, LongRunning] public class LSL_ApiTest { - private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; private const double VECTOR_COMPONENT_ACCURACY = 0.0000005d; - private const float FLOAT_ACCURACY = 0.00005f; + private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; private LSL_Api m_lslApi; [SetUp] @@ -254,241 +253,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests } [Test] - // llSetPrimitiveParams and llGetPrimitiveParams test. - public void TestllSetPrimitiveParams() - { - TestHelpers.InMethod(); - - // Create Prim1. - Scene scene = new SceneHelpers().SetupScene(); - string obj1Name = "Prim1"; - UUID objUuid = new UUID("00000000-0000-0000-0000-000000000001"); - SceneObjectPart part1 = - new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, - Vector3.Zero, Quaternion.Identity, - Vector3.Zero) { Name = obj1Name, UUID = objUuid }; - Assert.That(scene.AddNewSceneObject(new SceneObjectGroup(part1), false), Is.True); - - // Note that prim hollow check is passed with the other prim params in order to allow the - // specification of a different check value from the prim param. A cylinder, prism, sphere, - // torus or ring, with a hole shape of square, is limited to a hollow of 70%. Test 5 below - // specifies a value of 95% and checks to see if 70% was properly returned. - - // Test a sphere. - CheckllSetPrimitiveParams( - "test 1", // Prim test identification string - new LSL_Types.Vector3(6.0d, 9.9d, 9.9d), // Prim size - ScriptBaseClass.PRIM_TYPE_SPHERE, // Prim type - ScriptBaseClass.PRIM_HOLE_DEFAULT, // Prim hole type - new LSL_Types.Vector3(0.0d, 0.075d, 0.0d), // Prim cut - 0.80f, // Prim hollow - new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist - new LSL_Types.Vector3(0.32d, 0.76d, 0.0d), // Prim dimple - 0.80f); // Prim hollow check - - // Test a prism. - CheckllSetPrimitiveParams( - "test 2", // Prim test identification string - new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size - ScriptBaseClass.PRIM_TYPE_PRISM, // Prim type - ScriptBaseClass.PRIM_HOLE_CIRCLE, // Prim hole type - new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut - 0.90f, // Prim hollow - new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim twist - new LSL_Types.Vector3(2.0d, 1.0d, 0.0d), // Prim taper - new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear - 0.90f); // Prim hollow check - - // Test a box. - CheckllSetPrimitiveParams( - "test 3", // Prim test identification string - new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size - ScriptBaseClass.PRIM_TYPE_BOX, // Prim type - ScriptBaseClass.PRIM_HOLE_TRIANGLE, // Prim hole type - new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut - 0.95f, // Prim hollow - new LSL_Types.Vector3(1.0d, 0.0d, 0.0d), // Prim twist - new LSL_Types.Vector3(1.0d, 1.0d, 0.0d), // Prim taper - new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear - 0.95f); // Prim hollow check - - // Test a tube. - CheckllSetPrimitiveParams( - "test 4", // Prim test identification string - new LSL_Types.Vector3(4.2d, 4.2d, 4.2d), // Prim size - ScriptBaseClass.PRIM_TYPE_TUBE, // Prim type - ScriptBaseClass.PRIM_HOLE_SQUARE, // Prim hole type - new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut - 0.00f, // Prim hollow - new LSL_Types.Vector3(1.0d, -1.0d, 0.0d), // Prim twist - new LSL_Types.Vector3(1.0d, 0.05d, 0.0d), // Prim hole size - // Expression for y selected to test precision problems during byte - // cast in SetPrimitiveShapeParams. - new LSL_Types.Vector3(0.0d, 0.35d + 0.1d, 0.0d), // Prim shear - new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim profile cut - // Expression for y selected to test precision problems during sbyte - // cast in SetPrimitiveShapeParams. - new LSL_Types.Vector3(-1.0d, 0.70d + 0.1d + 0.1d, 0.0d), // Prim taper - 1.11f, // Prim revolutions - 0.88f, // Prim radius - 0.95f, // Prim skew - 0.00f); // Prim hollow check - - // Test a prism. - CheckllSetPrimitiveParams( - "test 5", // Prim test identification string - new LSL_Types.Vector3(3.5d, 3.5d, 3.5d), // Prim size - ScriptBaseClass.PRIM_TYPE_PRISM, // Prim type - ScriptBaseClass.PRIM_HOLE_SQUARE, // Prim hole type - new LSL_Types.Vector3(0.0d, 1.0d, 0.0d), // Prim cut - 0.95f, // Prim hollow - // Expression for x selected to test precision problems during sbyte - // cast in SetPrimitiveShapeBlockParams. - new LSL_Types.Vector3(0.7d + 0.2d, 0.0d, 0.0d), // Prim twist - // Expression for y selected to test precision problems during sbyte - // cast in SetPrimitiveShapeParams. - new LSL_Types.Vector3(2.0d, (1.3d + 0.1d), 0.0d), // Prim taper - new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), // Prim shear - 0.70f); // Prim hollow check - - // Test a sculpted prim. - CheckllSetPrimitiveParams( - "test 6", // Prim test identification string - new LSL_Types.Vector3(2.0d, 2.0d, 2.0d), // Prim size - ScriptBaseClass.PRIM_TYPE_SCULPT, // Prim type - "be293869-d0d9-0a69-5989-ad27f1946fd4", // Prim map - ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE); // Prim sculpt type - } - - // Set prim params for a box, cylinder or prism and check results. - public void CheckllSetPrimitiveParams(string primTest, - LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, - float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primTaper, LSL_Types.Vector3 primShear, - float primHollowCheck) - { - // Set the prim params. - m_lslApi.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, - ScriptBaseClass.PRIM_TYPE, primType, primHoleType, - primCut, primHollow, primTwist, primTaper, primShear)); - - // Get params for prim to validate settings. - LSL_Types.list primParams = - m_lslApi.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); - - // Validate settings. - CheckllSetPrimitiveParamsVector(primSize, m_lslApi.llList2Vector(primParams, 0), primTest + " prim size"); - Assert.AreEqual(primType, m_lslApi.llList2Integer(primParams, 1), - "TestllSetPrimitiveParams " + primTest + " prim type check fail"); - Assert.AreEqual(primHoleType, m_lslApi.llList2Integer(primParams, 2), - "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); - CheckllSetPrimitiveParamsVector(primCut, m_lslApi.llList2Vector(primParams, 3), primTest + " prim cut"); - Assert.AreEqual(primHollowCheck, m_lslApi.llList2Float(primParams, 4), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); - CheckllSetPrimitiveParamsVector(primTwist, m_lslApi.llList2Vector(primParams, 5), primTest + " prim twist"); - CheckllSetPrimitiveParamsVector(primTaper, m_lslApi.llList2Vector(primParams, 6), primTest + " prim taper"); - CheckllSetPrimitiveParamsVector(primShear, m_lslApi.llList2Vector(primParams, 7), primTest + " prim shear"); - } - - // Set prim params for a sphere and check results. - public void CheckllSetPrimitiveParams(string primTest, - LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, - float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primDimple, float primHollowCheck) - { - // Set the prim params. - m_lslApi.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, - ScriptBaseClass.PRIM_TYPE, primType, primHoleType, - primCut, primHollow, primTwist, primDimple)); - - // Get params for prim to validate settings. - LSL_Types.list primParams = - m_lslApi.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); - - // Validate settings. - CheckllSetPrimitiveParamsVector(primSize, m_lslApi.llList2Vector(primParams, 0), primTest + " prim size"); - Assert.AreEqual(primType, m_lslApi.llList2Integer(primParams, 1), - "TestllSetPrimitiveParams " + primTest + " prim type check fail"); - Assert.AreEqual(primHoleType, m_lslApi.llList2Integer(primParams, 2), - "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); - CheckllSetPrimitiveParamsVector(primCut, m_lslApi.llList2Vector(primParams, 3), primTest + " prim cut"); - Assert.AreEqual(primHollowCheck, m_lslApi.llList2Float(primParams, 4), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); - CheckllSetPrimitiveParamsVector(primTwist, m_lslApi.llList2Vector(primParams, 5), primTest + " prim twist"); - CheckllSetPrimitiveParamsVector(primDimple, m_lslApi.llList2Vector(primParams, 6), primTest + " prim dimple"); - } - - // Set prim params for a torus, tube or ring and check results. - public void CheckllSetPrimitiveParams(string primTest, - LSL_Types.Vector3 primSize, int primType, int primHoleType, LSL_Types.Vector3 primCut, - float primHollow, LSL_Types.Vector3 primTwist, LSL_Types.Vector3 primHoleSize, - LSL_Types.Vector3 primShear, LSL_Types.Vector3 primProfCut, LSL_Types.Vector3 primTaper, - float primRev, float primRadius, float primSkew, float primHollowCheck) - { - // Set the prim params. - m_lslApi.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, - ScriptBaseClass.PRIM_TYPE, primType, primHoleType, - primCut, primHollow, primTwist, primHoleSize, primShear, primProfCut, - primTaper, primRev, primRadius, primSkew)); - - // Get params for prim to validate settings. - LSL_Types.list primParams = - m_lslApi.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); - - // Valdate settings. - CheckllSetPrimitiveParamsVector(primSize, m_lslApi.llList2Vector(primParams, 0), primTest + " prim size"); - Assert.AreEqual(primType, m_lslApi.llList2Integer(primParams, 1), - "TestllSetPrimitiveParams " + primTest + " prim type check fail"); - Assert.AreEqual(primHoleType, m_lslApi.llList2Integer(primParams, 2), - "TestllSetPrimitiveParams " + primTest + " prim hole default check fail"); - CheckllSetPrimitiveParamsVector(primCut, m_lslApi.llList2Vector(primParams, 3), primTest + " prim cut"); - Assert.AreEqual(primHollowCheck, m_lslApi.llList2Float(primParams, 4), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim hollow check fail"); - CheckllSetPrimitiveParamsVector(primTwist, m_lslApi.llList2Vector(primParams, 5), primTest + " prim twist"); - CheckllSetPrimitiveParamsVector(primHoleSize, m_lslApi.llList2Vector(primParams, 6), primTest + " prim hole size"); - CheckllSetPrimitiveParamsVector(primShear, m_lslApi.llList2Vector(primParams, 7), primTest + " prim shear"); - CheckllSetPrimitiveParamsVector(primProfCut, m_lslApi.llList2Vector(primParams, 8), primTest + " prim profile cut"); - CheckllSetPrimitiveParamsVector(primTaper, m_lslApi.llList2Vector(primParams, 9), primTest + " prim taper"); - Assert.AreEqual(primRev, m_lslApi.llList2Float(primParams, 10), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim revolutions fail"); - Assert.AreEqual(primRadius, m_lslApi.llList2Float(primParams, 11), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim radius fail"); - Assert.AreEqual(primSkew, m_lslApi.llList2Float(primParams, 12), FLOAT_ACCURACY, - "TestllSetPrimitiveParams " + primTest + " prim skew fail"); - } - - // Set prim params for a sculpted prim and check results. - public void CheckllSetPrimitiveParams(string primTest, - LSL_Types.Vector3 primSize, int primType, string primMap, int primSculptType) - { - // Set the prim params. - m_lslApi.llSetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, primSize, - ScriptBaseClass.PRIM_TYPE, primType, primMap, primSculptType)); - - // Get params for prim to validate settings. - LSL_Types.list primParams = - m_lslApi.llGetPrimitiveParams(new LSL_Types.list(ScriptBaseClass.PRIM_SIZE, ScriptBaseClass.PRIM_TYPE)); - - // Validate settings. - CheckllSetPrimitiveParamsVector(primSize, m_lslApi.llList2Vector(primParams, 0), primTest + " prim size"); - Assert.AreEqual(primType, m_lslApi.llList2Integer(primParams, 1), - "TestllSetPrimitiveParams " + primTest + " prim type check fail"); - Assert.AreEqual(primMap, (string)m_lslApi.llList2String(primParams, 2), - "TestllSetPrimitiveParams " + primTest + " prim map check fail"); - Assert.AreEqual(primSculptType, m_lslApi.llList2Integer(primParams, 3), - "TestllSetPrimitiveParams " + primTest + " prim type scuplt check fail"); - } - - public void CheckllSetPrimitiveParamsVector(LSL_Types.Vector3 vecCheck, LSL_Types.Vector3 vecReturned, string msg) - { - // Check each vector component against expected result. - Assert.AreEqual(vecCheck.x, vecReturned.x, VECTOR_COMPONENT_ACCURACY, - "TestllSetPrimitiveParams " + msg + " vector check fail on x component"); - Assert.AreEqual(vecCheck.y, vecReturned.y, VECTOR_COMPONENT_ACCURACY, - "TestllSetPrimitiveParams " + msg + " vector check fail on y component"); - Assert.AreEqual(vecCheck.z, vecReturned.z, VECTOR_COMPONENT_ACCURACY, - "TestllSetPrimitiveParams " + msg + " vector check fail on z component"); - } - - [Test] public void TestllVecNorm() { TestHelpers.InMethod(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs new file mode 100644 index 0000000..a8964bf --- /dev/null +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiUserTests.cs @@ -0,0 +1,157 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Threading; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Shared.Tests +{ + [TestFixture] + public class LSL_ApiUserTests : OpenSimTestCase + { + private Scene m_scene; + private MockScriptEngine m_engine; + + [SetUp] + public override void SetUp() + { + base.SetUp(); + + m_engine = new MockScriptEngine(); + + m_scene = new SceneHelpers().SetupScene(); + SceneHelpers.SetupSceneModules(m_scene, m_engine); + } + + [Test] + public void TestLlRequestAgentDataOnline() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID userId = TestHelpers.ParseTail(0x1); + + UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, userId); + + SceneObjectPart part = SceneHelpers.AddSceneObject(m_scene).RootPart; + TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, part); + + LSL_Api apiGrp1 = new LSL_Api(); + apiGrp1.Initialize(m_engine, part, scriptItem); + + // Initially long timeout to test cache + apiGrp1.LlRequestAgentDataCacheTimeoutMs = 20000; + + // Offline test + { + apiGrp1.llRequestAgentData(userId.ToString(), ScriptBaseClass.DATA_ONLINE); + + Assert.That(m_engine.PostedEvents.ContainsKey(scriptItem.ItemID)); + + List events = m_engine.PostedEvents[scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("dataserver")); + + string data = eventParams.Params[1].ToString(); + Assert.AreEqual(0, int.Parse(data)); + + m_engine.PostedEvents.Clear(); + } + + // Online test. Should get the 'wrong' result because of caching. + ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1); + + { + apiGrp1.llRequestAgentData(userId.ToString(), ScriptBaseClass.DATA_ONLINE); + + Assert.That(m_engine.PostedEvents.ContainsKey(scriptItem.ItemID)); + + List events = m_engine.PostedEvents[scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("dataserver")); + + string data = eventParams.Params[1].ToString(); + Assert.AreEqual(0, int.Parse(data)); + + m_engine.PostedEvents.Clear(); + } + + apiGrp1.LlRequestAgentDataCacheTimeoutMs = 1; + + // Make absolutely sure that we should trigger cache timeout. + Thread.Sleep(apiGrp1.LlRequestAgentDataCacheTimeoutMs + 1); + + { + apiGrp1.llRequestAgentData(userId.ToString(), ScriptBaseClass.DATA_ONLINE); + + Assert.That(m_engine.PostedEvents.ContainsKey(scriptItem.ItemID)); + + List events = m_engine.PostedEvents[scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("dataserver")); + + string data = eventParams.Params[1].ToString(); + Assert.AreEqual(1, int.Parse(data)); + + m_engine.PostedEvents.Clear(); + } + + m_scene.CloseAgent(userId, false); + + Thread.Sleep(apiGrp1.LlRequestAgentDataCacheTimeoutMs + 1 + 1); + + { + apiGrp1.llRequestAgentData(userId.ToString(), ScriptBaseClass.DATA_ONLINE); + + Assert.That(m_engine.PostedEvents.ContainsKey(scriptItem.ItemID)); + + List events = m_engine.PostedEvents[scriptItem.ItemID]; + Assert.That(events.Count, Is.EqualTo(1)); + EventParams eventParams = events[0]; + Assert.That(eventParams.EventName, Is.EqualTo("dataserver")); + + string data = eventParams.Params[1].ToString(); + Assert.AreEqual(0, int.Parse(data)); + + m_engine.PostedEvents.Clear(); + } + } + } +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs index 1381d2b..2f9a564 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs @@ -41,9 +41,9 @@ using OpenSim.Region.OptionalModules.World.NPC; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -158,4 +158,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests Assert.That(savedAppearance.AvatarHeight, Is.EqualTo(sp.Appearance.AvatarHeight)); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs index 5ed1f3d..b6b3f12 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs @@ -41,9 +41,9 @@ using OpenSim.Region.CoreModules.Framework.InventoryAccess; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); - TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); + TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); OSSL_Api osslApi = new OSSL_Api(); @@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); // Create an object embedded inside the first - TaskInventoryHelpers.AddSceneObject(m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); + TaskInventoryHelpers.AddSceneObject(m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); osslApi.osForceAttachToAvatarFromInventory(taskInvObjItemName, (int)attachPoint); @@ -142,7 +142,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(m_scene, 0x1); ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1.PrincipalID); SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); - TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); + TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); OSSL_Api osslApi = new OSSL_Api(); @@ -150,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // Create an object embedded inside the first TaskInventoryHelpers.AddNotecard( - m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, TestHelpers.ParseTail(0x900)); + m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, TestHelpers.ParseTail(0x900), "Hello World!"); bool exceptionCaught = false; @@ -190,14 +190,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, ua1); SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); - TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); + TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene.AssetService, inWorldObj.RootPart); new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem); OSSL_Api osslApi = new OSSL_Api(); osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem); // Create an object embedded inside the first - TaskInventoryHelpers.AddSceneObject(m_scene, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); + TaskInventoryHelpers.AddSceneObject( + m_scene.AssetService, inWorldObj.RootPart, taskInvObjItemName, taskInvObjItemId, ua1.PrincipalID); ScenePresence sp2 = SceneHelpers.AddScenePresence(m_scene, ua2); @@ -228,4 +229,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests Assert.That(sp2.Appearance.GetAttachpoint(attachmentsInAppearance2[0].ItemID), Is.EqualTo((uint)attachPoint)); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index d6c82f1..99bff83 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs @@ -42,10 +42,10 @@ using OpenSim.Region.OptionalModules.World.NPC; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.Api; +using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Services.Interfaces; using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; namespace OpenSim.Region.ScriptEngine.Shared.Tests { @@ -179,6 +179,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests public void TestOsNpcLoadAppearance() { TestHelpers.InMethod(); + //TestHelpers.EnableLogging(); // Store an avatar with a different height from default in a notecard. UUID userId = TestHelpers.ParseTail(0x1); @@ -221,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // Store an avatar with a different height from default in a notecard. UUID userId = TestHelpers.ParseTail(0x1); float firstHeight = 1.9f; - float secondHeight = 2.1f; +// float secondHeight = 2.1f; string firstAppearanceNcName = "appearanceNc1"; string secondAppearanceNcName = "appearanceNc2"; @@ -347,4 +348,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests Assert.That(npc, Is.Null); } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs new file mode 100644 index 0000000..f4211c8 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Api/Runtime/XEngineScriptBase.cs @@ -0,0 +1,61 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Lifetime; +using System.Security.Permissions; +using System.Threading; +using System.Reflection; +using System.Collections; +using System.Collections.Generic; +using OpenSim.Region.ScriptEngine.Interfaces; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; + +namespace OpenSim.Region.ScriptEngine.XEngine.ScriptBase +{ + public class XEngineScriptBase : ScriptBaseClass + { + /// + /// Used for script sleeps when we are using co-operative script termination. + /// + /// null if co-operative script termination is not active + WaitHandle m_coopSleepHandle; + + public XEngineScriptBase(WaitHandle coopSleepHandle) : base() + { + m_coopSleepHandle = coopSleepHandle; + } + + public void opensim_reserved_CheckForCoopTermination() + { + if (m_coopSleepHandle != null && m_coopSleepHandle.WaitOne(0)) + throw new ScriptCoopStopException(); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 9405075..0ff2da3 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs @@ -52,7 +52,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine { myScriptEngine = _ScriptEngine; - m_log.Info("[XEngine] Hooking up to server events"); +// m_log.Info("[XEngine] Hooking up to server events"); myScriptEngine.World.EventManager.OnAttach += attach; myScriptEngine.World.EventManager.OnObjectGrab += touch_start; myScriptEngine.World.EventManager.OnObjectGrabbing += touch; @@ -62,6 +62,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target; myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target; + myScriptEngine.World.EventManager.OnScriptMovingStartEvent += moving_start; + myScriptEngine.World.EventManager.OnScriptMovingEndEvent += moving_end; myScriptEngine.World.EventManager.OnScriptControlEvent += control; myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; myScriptEngine.World.EventManager.OnScriptColliding += collision; @@ -69,7 +71,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start; myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision; myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end; - IMoneyModule money=myScriptEngine.World.RequestModuleInterface(); + IMoneyModule money = myScriptEngine.World.RequestModuleInterface(); if (money != null) { money.OnObjectPaid+=HandleObjectPaid; @@ -419,14 +421,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine // dataserver: not handled here // link_message: not handled here - public void moving_start(uint localID, UUID itemID) + public void moving_start(uint localID) { myScriptEngine.PostObjectEvent(localID, new EventParams( "moving_start",new object[0], new DetectParams[0])); } - public void moving_end(uint localID, UUID itemID) + public void moving_end(uint localID) { myScriptEngine.PostObjectEvent(localID, new EventParams( "moving_end",new object[0], diff --git a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs index bd26a8b..665929d 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Mono.Addins; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -29,5 +30,7 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.8.3.*")] + +[assembly: Addin("OpenSim.Region.ScriptEngine.XEngine", OpenSim.VersionInfo.VersionNumber)] +[assembly: AddinDependency("OpenSim.Region.Framework", OpenSim.VersionInfo.VersionNumber)] diff --git a/OpenSim/Region/ScriptEngine/XEngine/Resources/XEngine.addin.xml b/OpenSim/Region/ScriptEngine/XEngine/Resources/XEngine.addin.xml deleted file mode 100644 index 96c9c3a..0000000 --- a/OpenSim/Region/ScriptEngine/XEngine/Resources/XEngine.addin.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs new file mode 100644 index 0000000..878e571 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineBasicTests.cs @@ -0,0 +1,129 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Threading; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Scripting.WorldComm; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.XEngine.Tests +{ + /// + /// Basic XEngine tests. + /// + [TestFixture] + public class XEngineBasicTests : OpenSimTestCase + { + private TestScene m_scene; + private XEngine m_xEngine; + private AutoResetEvent m_chatEvent = new AutoResetEvent(false); + private OSChatMessage m_osChatMessageReceived; + + [TestFixtureSetUp] + public void Init() + { + //AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory + "/bin"); +// Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); + m_xEngine = new XEngine(); + + IniConfigSource configSource = new IniConfigSource(); + + IConfig startupConfig = configSource.AddConfig("Startup"); + startupConfig.Set("DefaultScriptEngine", "XEngine"); + + IConfig xEngineConfig = configSource.AddConfig("XEngine"); + xEngineConfig.Set("Enabled", "true"); + xEngineConfig.Set("StartDelay", "0"); + + // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call + // to AssemblyResolver.OnAssemblyResolve fails. + xEngineConfig.Set("AppDomainLoading", "false"); + + m_scene = new SceneHelpers().SetupScene("My Test", UUID.Random(), 1000, 1000, configSource); + SceneHelpers.SetupSceneModules(m_scene, configSource, m_xEngine); + m_scene.StartScripts(); + } + + /// + /// Test compilation and starting of a script. + /// + /// + /// This is a less than ideal regression test since it involves an asynchronous operation (in this case, + /// compilation of the script). + /// + [Test] + public void TestCompileAndStartScript() + { + TestHelpers.InMethod(); + TestHelpers.EnableLogging(); + + UUID userId = TestHelpers.ParseTail(0x1); +// UUID objectId = TestHelpers.ParseTail(0x100); +// UUID itemId = TestHelpers.ParseTail(0x3); + string itemName = "TestStartScript() Item"; + + SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, "TestStartScriptPart_", 0x100); + m_scene.AddNewSceneObject(so, true); + + InventoryItemBase itemTemplate = new InventoryItemBase(); +// itemTemplate.ID = itemId; + itemTemplate.Name = itemName; + itemTemplate.Folder = so.UUID; + itemTemplate.InvType = (int)InventoryType.LSL; + + m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; + + SceneObjectPart partWhereRezzed = m_scene.RezNewScript(userId, itemTemplate); + + m_chatEvent.WaitOne(60000); + + Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); + Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); + + bool running; + TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); + Assert.That( + SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); + Assert.That(running, Is.True); + } + + private void OnChatFromWorld(object sender, OSChatMessage oscm) + { +// Console.WriteLine("Got chat [{0}]", oscm.Message); + + m_osChatMessageReceived = oscm; + m_chatEvent.Set(); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs new file mode 100644 index 0000000..587695f --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineCrossingTests.cs @@ -0,0 +1,195 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Threading; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Framework.EntityTransfer; +using OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.XEngine.Tests +{ + /// + /// XEngine tests connected with crossing scripts between regions. + /// + [TestFixture] + public class XEngineCrossingTests : OpenSimTestCase + { + [TestFixtureSetUp] + public void FixtureInit() + { + // Don't allow tests to be bamboozled by asynchronous events. Execute everything on the same thread. + Util.FireAndForgetMethod = FireAndForgetMethod.RegressionTest; + } + + [TestFixtureTearDown] + public void TearDown() + { + // We must set this back afterwards, otherwise later tests will fail since they're expecting multiple + // threads. Possibly, later tests should be rewritten so none of them require async stuff (which regression + // tests really shouldn't). + Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; + } + + /// + /// Test script state preservation when a script crosses between regions on the same simulator. + /// + [Test] + public void TestScriptCrossOnSameSimulator() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + UUID userId = TestHelpers.ParseTail(0x1); + int sceneObjectIdTail = 0x2; + + EntityTransferModule etmA = new EntityTransferModule(); + EntityTransferModule etmB = new EntityTransferModule(); + LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); + XEngine xEngineA = new XEngine(); + XEngine xEngineB = new XEngine(); + xEngineA.DebugLevel = 1; + xEngineB.DebugLevel = 1; + + IConfigSource configSource = new IniConfigSource(); + + IConfig startupConfig = configSource.AddConfig("Startup"); + startupConfig.Set("DefaultScriptEngine", "XEngine"); + + IConfig xEngineConfig = configSource.AddConfig("XEngine"); + xEngineConfig.Set("Enabled", "true"); + xEngineConfig.Set("StartDelay", "0"); + + // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call + // to AssemblyResolver.OnAssemblyResolve fails. + xEngineConfig.Set("AppDomainLoading", "false"); + + IConfig modulesConfig = configSource.AddConfig("Modules"); + modulesConfig.Set("EntityTransferModule", etmA.Name); + modulesConfig.Set("SimulationServices", lscm.Name); + + SceneHelpers sh = new SceneHelpers(); + TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000, configSource); + TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1000, 999, configSource); + + SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, configSource, lscm); + SceneHelpers.SetupSceneModules(sceneA, configSource, etmA, xEngineA); + SceneHelpers.SetupSceneModules(sceneB, configSource, etmB, xEngineB); + sceneA.StartScripts(); + sceneB.StartScripts(); + + SceneObjectGroup soSceneA = SceneHelpers.AddSceneObject(sceneA, 1, userId, "so1-", sceneObjectIdTail); + soSceneA.AbsolutePosition = new Vector3(128, 10, 20); + + // CREATE SCRIPT TODO + InventoryItemBase scriptItemSceneA = new InventoryItemBase(); + // itemTemplate.ID = itemId; + scriptItemSceneA.Name = "script1"; + scriptItemSceneA.Folder = soSceneA.UUID; + scriptItemSceneA.InvType = (int)InventoryType.LSL; + + AutoResetEvent chatEvent = new AutoResetEvent(false); + OSChatMessage messageReceived = null; + sceneA.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); }; + + sceneA.RezNewScript(userId, scriptItemSceneA, +@"integer c = 0; + +default +{ + state_entry() + { + llSay(0, ""Script running""); + } + + changed(integer change) + { + llSay(0, ""Changed""); + } + + touch_start(integer n) + { + c = c + 1; + llSay(0, (string)c); + } +}"); + + chatEvent.WaitOne(60000); + + Assert.That(messageReceived, Is.Not.Null, "No chat message received."); + Assert.That(messageReceived.Message, Is.EqualTo("Script running")); + + { + // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead. + DetectParams[] det = new DetectParams[1]; + det[0] = new DetectParams(); + det[0].Key = userId; + det[0].Populate(sceneA); + + EventParams ep = new EventParams("touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, det); + + xEngineA.PostObjectEvent(soSceneA.LocalId, ep); + chatEvent.WaitOne(60000); + + Assert.That(messageReceived.Message, Is.EqualTo("1")); + } + + sceneB.EventManager.OnChatFromWorld += (s, m) => { messageReceived = m; chatEvent.Set(); }; + + // Cross with a negative value + soSceneA.AbsolutePosition = new Vector3(128, -10, 20); + + chatEvent.WaitOne(60000); + Assert.That(messageReceived.Message, Is.EqualTo("Changed")); + + // TEST sending event to moved prim and output + { + SceneObjectGroup soSceneB = sceneB.GetSceneObjectGroup(soSceneA.Name); + TaskInventoryItem scriptItemSceneB = soSceneB.RootPart.Inventory.GetInventoryItem(scriptItemSceneA.Name); + + // XXX: Should not be doing this so directly. Should call some variant of EventManager.touch() instead. + DetectParams[] det = new DetectParams[1]; + det[0] = new DetectParams(); + det[0].Key = userId; + det[0].Populate(sceneB); + + EventParams ep = new EventParams("touch_start", new Object[] { new LSL_Types.LSLInteger(1) }, det); + + xEngineB.PostObjectEvent(soSceneB.LocalId, ep); + chatEvent.WaitOne(60000); + + Assert.That(messageReceived.Message, Is.EqualTo("2")); + } + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs new file mode 100644 index 0000000..2ef4058 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEnginePersistenceTests.cs @@ -0,0 +1,152 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using Nini.Config; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.CoreModules.Avatar.Attachments; +using OpenSim.Region.CoreModules.Framework.InventoryAccess; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.XEngine; +using OpenSim.Services.Interfaces; +using OpenSim.Tests.Common; + +namespace OpenSim.Region.ScriptEngine.Tests +{ + [TestFixture] + public class XEnginePersistenceTests : OpenSimTestCase + { + private AutoResetEvent m_chatEvent = new AutoResetEvent(false); + + private void OnChatFromWorld(object sender, OSChatMessage oscm) + { + // Console.WriteLine("Got chat [{0}]", oscm.Message); + + // m_osChatMessageReceived = oscm; + m_chatEvent.Set(); + } + + private void AddCommonConfig(IConfigSource config, List modules) + { + config.AddConfig("Modules"); + config.Configs["Modules"].Set("InventoryAccessModule", "BasicInventoryAccessModule"); + + AttachmentsModule attMod = new AttachmentsModule(); + attMod.DebugLevel = 1; + modules.Add(attMod); + modules.Add(new BasicInventoryAccessModule()); + } + + private void AddScriptingConfig(IConfigSource config, XEngine.XEngine xEngine, List modules) + { + IConfig startupConfig = config.AddConfig("Startup"); + startupConfig.Set("DefaultScriptEngine", "XEngine"); + + IConfig xEngineConfig = config.AddConfig("XEngine"); + xEngineConfig.Set("Enabled", "true"); + xEngineConfig.Set("StartDelay", "0"); + + // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call + // to AssemblyResolver.OnAssemblyResolve fails. + xEngineConfig.Set("AppDomainLoading", "false"); + + modules.Add(xEngine); + } + + private Scene CreateScriptingEnabledTestScene(XEngine.XEngine xEngine) + { + IConfigSource config = new IniConfigSource(); + List modules = new List(); + + AddCommonConfig(config, modules); + AddScriptingConfig(config, xEngine, modules); + + Scene scene + = new SceneHelpers().SetupScene( + "attachments-test-scene", TestHelpers.ParseTail(999), 1000, 1000, config); + SceneHelpers.SetupSceneModules(scene, config, modules.ToArray()); + + scene.StartScripts(); + + return scene; + } + + [Test] + public void TestScriptedAttachmentPersistence() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + XEngine.XEngine xEngine = new XEngine.XEngine(); + Scene scene = CreateScriptingEnabledTestScene(xEngine); + UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(scene, 0x1); + ScenePresence sp = SceneHelpers.AddScenePresence(scene, ua1); + + SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, sp.UUID, "att-name", 0x10); + TaskInventoryHelpers.AddScript( + scene.AssetService, + so.RootPart, + "scriptItem", + "default { attach(key id) { if (id != NULL_KEY) { llSay(0, \"Hello World\"); } } }"); + + InventoryItemBase userItem = UserInventoryHelpers.AddInventoryItem(scene, so, 0x100, 0x1000); + + // FIXME: Right now, we have to do a tricksy chat listen to make sure we know when the script is running. + // In the future, we need to be able to do this programatically more predicably. + scene.EventManager.OnChatFromWorld += OnChatFromWorld; + + SceneObjectGroup rezzedSo + = scene.AttachmentsModule.RezSingleAttachmentFromInventory(sp, userItem.ID, (uint)AttachmentPoint.Chest); + TaskInventoryItem rezzedScriptItem = rezzedSo.RootPart.Inventory.GetInventoryItem("scriptItem"); + + // Wait for chat to signal rezzed script has been started. + m_chatEvent.WaitOne(60000); + + // Force save + xEngine.DoBackup(new Object[] { 0 }); + +// Console.WriteLine("ItemID {0}", rezzedScriptItem.ItemID); +// +// foreach ( +// string s in Directory.EnumerateFileSystemEntries( +// string.Format("ScriptEngines/{0}", scene.RegionInfo.RegionID))) +// Console.WriteLine(s); + + Assert.IsFalse( + File.Exists( + string.Format("ScriptEngines/{0}/{1}.state", scene.RegionInfo.RegionID, rezzedScriptItem.ItemID))); + + scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, rezzedSo); + } + } +} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs deleted file mode 100644 index 5abfe9a..0000000 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Threading; -using Nini.Config; -using NUnit.Framework; -using OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Region.CoreModules.Scripting.WorldComm; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Tests.Common; -using OpenSim.Tests.Common.Mock; - -namespace OpenSim.Region.ScriptEngine.XEngine.Tests -{ - /// - /// XEngine tests. - /// - [TestFixture] - public class XEngineTest : OpenSimTestCase - { - private TestScene m_scene; - private XEngine m_xEngine; - private AutoResetEvent m_chatEvent = new AutoResetEvent(false); - private OSChatMessage m_osChatMessageReceived; - - [TestFixtureSetUp] - public void Init() - { - //AppDomain.CurrentDomain.SetData("APPBASE", Environment.CurrentDirectory + "/bin"); -// Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); - m_xEngine = new XEngine(); - - IniConfigSource configSource = new IniConfigSource(); - - IConfig startupConfig = configSource.AddConfig("Startup"); - startupConfig.Set("DefaultScriptEngine", "XEngine"); - - IConfig xEngineConfig = configSource.AddConfig("XEngine"); - xEngineConfig.Set("Enabled", "true"); - xEngineConfig.Set("StartDelay", "0"); - - // These tests will not run with AppDomainLoading = true, at least on mono. For unknown reasons, the call - // to AssemblyResolver.OnAssemblyResolve fails. - xEngineConfig.Set("AppDomainLoading", "false"); - - m_scene = new SceneHelpers().SetupScene("My Test", UUID.Random(), 1000, 1000, configSource); - SceneHelpers.SetupSceneModules(m_scene, configSource, m_xEngine); - m_scene.StartScripts(); - } - - /// - /// Test compilation and starting of a script. - /// - /// - /// This is a less than ideal regression test since it involves an asynchronous operation (in this case, - /// compilation of the script). - /// - [Test] - public void TestCompileAndStartScript() - { - TestHelpers.InMethod(); -// log4net.Config.XmlConfigurator.Configure(); - - UUID userId = TestHelpers.ParseTail(0x1); -// UUID objectId = TestHelpers.ParseTail(0x100); -// UUID itemId = TestHelpers.ParseTail(0x3); - string itemName = "TestStartScript() Item"; - - SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, "TestStartScriptPart_", 0x100); - m_scene.AddNewSceneObject(so, true); - - InventoryItemBase itemTemplate = new InventoryItemBase(); -// itemTemplate.ID = itemId; - itemTemplate.Name = itemName; - itemTemplate.Folder = so.UUID; - itemTemplate.InvType = (int)InventoryType.LSL; - - m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; - - SceneObjectPart partWhereRezzed = m_scene.RezNewScript(userId, itemTemplate); - - m_chatEvent.WaitOne(60000); - - Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); - Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); - - bool running; - TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); - Assert.That( - SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); - Assert.That(running, Is.True); - } - - private void OnChatFromWorld(object sender, OSChatMessage oscm) - { -// Console.WriteLine("Got chat [{0}]", oscm.Message); - - m_osChatMessageReceived = oscm; - m_chatEvent.Set(); - } - } -} \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs old mode 100644 new mode 100755 index 18569ca..78d4ee9 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -42,22 +42,26 @@ using OpenMetaverse.StructuredData; using log4net; using Nini.Config; using Amib.Threading; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.ScriptEngine.Interfaces; using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared.CodeTools; using OpenSim.Region.ScriptEngine.Shared.Instance; using OpenSim.Region.ScriptEngine.Shared.Api; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; -using OpenSim.Region.ScriptEngine.Interfaces; +using OpenSim.Region.ScriptEngine.Shared.ScriptBase; +using OpenSim.Region.ScriptEngine.XEngine.ScriptBase; using Timer = OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Timer; using ScriptCompileQueue = OpenSim.Framework.LocklessQueue; namespace OpenSim.Region.ScriptEngine.XEngine { + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XEngine")] public class XEngine : INonSharedRegionModule, IScriptModule, IScriptEngine { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -68,7 +72,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine /// /// If DebugLevel >= 1, then we log every time that a script is started. /// -// public int DebugLevel { get; set; } + public int DebugLevel { get; set; } + + /// + /// A parameter to allow us to notify the log if at least one script has a compilation that is not compatible + /// with ScriptStopStrategy. + /// + public bool HaveNotifiedLogOfScriptStopMistmatch { get; private set; } private SmartThreadPool m_ThreadPool; private int m_MaxScriptQueue; @@ -84,6 +94,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine /// private int m_StartDelay; + /// + /// Are we stopping scripts co-operatively by inserting checks in them at C# compile time (true) or aborting + /// their threads (false)? + /// + private bool m_coopTermination; + private int m_IdleTimeout; private int m_StackSize; private int m_SleepTime; @@ -93,7 +109,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine private bool m_InitialStartup = true; private int m_ScriptFailCount; // Number of script fails since compile queue was last empty private string m_ScriptErrorMessage; - private Dictionary m_uniqueScripts = new Dictionary(); private bool m_AppDomainLoading; private Dictionary m_ScriptErrors = new Dictionary(); @@ -175,6 +190,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine get { return "XEngine"; } } + public string ScriptClassName { get; private set; } + + public string ScriptBaseClassName { get; private set; } + + public ParameterInfo[] ScriptBaseClassParameters { get; private set; } + + public string[] ScriptReferencedAssemblies { get; private set; } + public Scene World { get { return m_Scene; } @@ -229,21 +252,36 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_ScriptConfig = configSource.Configs["XEngine"]; m_ConfigSource = configSource; + + string rawScriptStopStrategy = m_ScriptConfig.GetString("ScriptStopStrategy", "co-op"); + + m_log.InfoFormat("[XEngine]: Script stop strategy is {0}", rawScriptStopStrategy); + + if (rawScriptStopStrategy == "co-op") + { + m_coopTermination = true; + ScriptClassName = "XEngineScript"; + ScriptBaseClassName = typeof(XEngineScriptBase).FullName; + ScriptBaseClassParameters = typeof(XEngineScriptBase).GetConstructor(new Type[] { typeof(WaitHandle) }).GetParameters(); + ScriptReferencedAssemblies = new string[] { Path.GetFileName(typeof(XEngineScriptBase).Assembly.Location) }; + } + else + { + ScriptClassName = "Script"; + ScriptBaseClassName = typeof(ScriptBaseClass).FullName; + } + +// Console.WriteLine("ASSEMBLY NAME: {0}", ScriptReferencedAssemblies[0]); } public void AddRegion(Scene scene) { if (m_ScriptConfig == null) return; + m_ScriptFailCount = 0; m_ScriptErrorMessage = String.Empty; - if (m_ScriptConfig == null) - { -// m_log.ErrorFormat("[XEngine] No script configuration found. Scripts disabled"); - return; - } - m_Enabled = m_ScriptConfig.GetBoolean("Enabled", true); if (!m_Enabled) @@ -365,19 +403,19 @@ namespace OpenSim.Region.ScriptEngine.XEngine (module, cmdparams) => HandleScriptsAction(cmdparams, HandleStartScript)); MainConsole.Instance.Commands.AddCommand( - "Scripts", false, "debug scripts log", "debug scripts log ", "Extra debug logging for a script", + "Debug", false, "debug scripts log", "debug scripts log ", "Extra debug logging for a particular script.", "Activates or deactivates extra debug logging for the given script.\n" + "Level == 0, deactivate extra debug logging.\n" + "Level >= 1, log state changes.\n" + "Level >= 2, log event invocations.\n", HandleDebugScriptLogCommand); -// MainConsole.Instance.Commands.AddCommand( -// "Debug", false, "debug xengine", "debug xengine []", -// "Turn on detailed xengine debugging.", -// "If level <= 0, then no extra logging is done.\n" -// + "If level >= 1, then we log every time that a script is started.", -// HandleDebugLevelCommand); + MainConsole.Instance.Commands.AddCommand( + "Debug", false, "debug xengine log", "debug xengine log []", + "Turn on detailed xengine debugging.", + "If level <= 0, then no extra logging is done.\n" + + "If level >= 1, then we log every time that a script is started.", + HandleDebugLevelCommand); } private void HandleDebugScriptLogCommand(string module, string[] args) @@ -420,26 +458,26 @@ namespace OpenSim.Region.ScriptEngine.XEngine /// /// /// -// private void HandleDebugLevelCommand(string module, string[] args) -// { -// if (args.Length == 3) -// { -// int newDebug; -// if (int.TryParse(args[2], out newDebug)) -// { -// DebugLevel = newDebug; -// MainConsole.Instance.OutputFormat("Debug level set to {0}", newDebug); -// } -// } -// else if (args.Length == 2) -// { -// MainConsole.Instance.OutputFormat("Current debug level is {0}", DebugLevel); -// } -// else -// { -// MainConsole.Instance.Output("Usage: debug xengine 0..1"); -// } -// } + private void HandleDebugLevelCommand(string module, string[] args) + { + if (args.Length >= 4) + { + int newDebug; + if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, args[3], out newDebug)) + { + DebugLevel = newDebug; + MainConsole.Instance.OutputFormat("Debug level set to {0} in XEngine for region {1}", newDebug, m_Scene.Name); + } + } + else if (args.Length == 3) + { + MainConsole.Instance.OutputFormat("Current debug level is {0}", DebugLevel); + } + else + { + MainConsole.Instance.Output("Usage: debug xengine log "); + } + } /// /// Parse the raw item id into a script instance from the command params if it's present. @@ -459,7 +497,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine /// /// Basis on which to sort output. Can be null if no sort needs to take place private void HandleScriptsAction( - string[] cmdparams, Action action, Func keySelector) + string[] cmdparams, Action action, System.Func keySelector) { if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene)) return; @@ -517,7 +555,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (!(MainConsole.Instance.ConsoleScene == null || MainConsole.Instance.ConsoleScene == m_Scene)) return; - MainConsole.Instance.OutputFormat(GetStatusReport()); + MainConsole.Instance.Output(GetStatusReport()); } public string GetStatusReport() @@ -539,7 +577,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine } sb.AppendFormat("Scripts loaded : {0}\n", scriptsLoaded); - sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count); sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count); sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads); sb.AppendFormat("Min threads : {0}\n", m_ThreadPool.MinThreads); @@ -616,7 +653,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID); sb.AppendFormat("Position : {0}\n", sop.AbsolutePosition); - MainConsole.Instance.OutputFormat(sb.ToString()); + MainConsole.Instance.Output(sb.ToString()); } private void HandleSuspendScript(IScriptInstance instance) @@ -662,6 +699,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine { if (instance.Running) { + instance.StayStopped = true; // the script was stopped explicitly + instance.Stop(0); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); @@ -685,28 +724,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine { // Force a final state save // - if (m_Assemblies.ContainsKey(instance.AssetID)) + try { - string assembly = m_Assemblies[instance.AssetID]; - - try - { - instance.SaveState(assembly); - } - catch (Exception e) - { - m_log.Error( - string.Format( - "[XEngine]: Failed final state save for script {0}.{1}, item UUID {2}, prim UUID {3} in {4}. Exception ", - instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, World.Name) - , e); - } + if (instance.StatePersistedHere) + instance.SaveState(); + } + catch (Exception e) + { + m_log.Error( + string.Format( + "[XEngine]: Failed final state save for script {0}.{1}, item UUID {2}, prim UUID {3} in {4}. Exception ", + instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, World.Name) + , e); } // Clear the event queue and abort the instance thread // - instance.ClearQueue(); - instance.Stop(0); + instance.Stop(0, true); // Release events, timer, etc // @@ -804,23 +838,23 @@ namespace OpenSim.Region.ScriptEngine.XEngine lock (m_Scripts) { foreach (IScriptInstance instance in m_Scripts.Values) - instances.Add(instance); + { + if (instance.StatePersistedHere) + { +// m_log.DebugFormat( +// "[XEngine]: Adding script {0}.{1}, item UUID {2}, prim UUID {3} in {4} for state persistence", +// instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, World.Name); + + instances.Add(instance); + } + } } foreach (IScriptInstance i in instances) { - string assembly = String.Empty; - - lock (m_Scripts) - { - if (!m_Assemblies.ContainsKey(i.AssetID)) - continue; - assembly = m_Assemblies[i.AssetID]; - } - try { - i.SaveState(assembly); + i.SaveState(); } catch (Exception e) { @@ -832,8 +866,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine } } - instances.Clear(); - if (saveTime > 0) m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup), new Object[] { saveTime }); @@ -843,6 +875,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine public void SaveAllState() { + DoBackup(new object[] { 0 }); + } + + public object DoMaintenance(object p) + { + object[] parms = (object[])p; + int sleepTime = (int)parms[0]; + foreach (IScriptInstance inst in m_Scripts.Values) { if (inst.EventTime() > m_EventLimit) @@ -852,14 +892,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine inst.Start(); } } - } - - public object DoMaintenance(object p) - { - object[] parms = (object[])p; - int sleepTime = (int)parms[0]; - - SaveAllState(); System.Threading.Thread.Sleep(sleepTime); @@ -937,8 +969,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (restOfFirstLine.StartsWith("c#") || restOfFirstLine.StartsWith("vb") || restOfFirstLine.StartsWith("lsl") - || restOfFirstLine.StartsWith("js") - || restOfFirstLine.StartsWith("yp") || restOfFirstLine.Length == 0) warnRunningInXEngine = true; @@ -972,12 +1002,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (engine != ScriptEngineName) return; - // If we've seen this exact script text before, use that reference instead - if (m_uniqueScripts.ContainsKey(script)) - script = m_uniqueScripts[script]; - else - m_uniqueScripts[script] = script; - Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez, (StateSource)stateSource}; if (stateSource == (int)StateSource.ScriptedRez) @@ -991,11 +1015,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine } else { - m_CompileQueue.Enqueue(parms); lock (m_CompileDict) - { m_CompileDict[itemID] = 0; - } + + // This must occur after the m_CompileDict so that an existing compile thread cannot hit the check + // in DoOnRezScript() before m_CompileDict has been updated. + m_CompileQueue.Enqueue(parms); // m_log.DebugFormat("[XEngine]: Added script {0} to compile queue", itemID); @@ -1017,49 +1042,81 @@ namespace OpenSim.Region.ScriptEngine.XEngine public Object DoOnRezScriptQueue(Object dummy) { - if (m_InitialStartup) + try { - // This delay exists to stop mono problems where script compilation and startup would stop the sim - // working properly for the session. - System.Threading.Thread.Sleep(m_StartDelay); + if (m_InitialStartup) + { + // This delay exists to stop mono problems where script compilation and startup would stop the sim + // working properly for the session. + System.Threading.Thread.Sleep(m_StartDelay); - m_log.InfoFormat("[XEngine]: Performing initial script startup on {0}", m_Scene.Name); - } + m_log.InfoFormat("[XEngine]: Performing initial script startup on {0}", m_Scene.Name); + } - object[] o; + object[] o; - int scriptsStarted = 0; + int scriptsStarted = 0; - while (m_CompileQueue.Dequeue(out o)) - { - if (DoOnRezScript(o)) + while (m_CompileQueue.Dequeue(out o)) { - scriptsStarted++; + try + { + if (DoOnRezScript(o)) + { + scriptsStarted++; - if (m_InitialStartup) - if (scriptsStarted % 50 == 0) - m_log.InfoFormat( - "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.Name); + if (m_InitialStartup) + if (scriptsStarted % 50 == 0) + m_log.InfoFormat( + "[XEngine]: Started {0} scripts in {1}", scriptsStarted, m_Scene.Name); + } + } + catch (Exception e) + { + m_log.Error( + string.Format( + "[XEngine]: Failure in DoOnRezScriptQueue() for item {0} in {1}. Continuing. Exception ", + o[1], m_Scene.Name), + e); + } } - } - if (m_InitialStartup) - m_log.InfoFormat( - "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name); + if (m_InitialStartup) + m_log.InfoFormat( + "[XEngine]: Completed starting {0} scripts on {1}", scriptsStarted, m_Scene.Name); - // NOTE: Despite having a lockless queue, this lock is required - // to make sure there is never no compile thread while there - // are still scripts to compile. This could otherwise happen - // due to a race condition - // - lock (m_CompileQueue) - m_CurrentCompile = null; + } + catch (Exception e) + { + m_log.Error( + string.Format("[XEngine]: Failure in DoOnRezScriptQueue() in {0}. Exception ", m_Scene.Name), e); + } + finally + { + // FIXME: On failure we must trigger this even if the compile queue is not actually empty so that the + // RegionReadyModule is not forever waiting. This event really needs a different name. + m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, + m_ScriptErrorMessage); - m_Scene.EventManager.TriggerEmptyScriptCompileQueue(m_ScriptFailCount, - m_ScriptErrorMessage); + m_ScriptFailCount = 0; + m_InitialStartup = false; - m_ScriptFailCount = 0; - m_InitialStartup = false; + // NOTE: Despite having a lockless queue, this lock is required + // to make sure there is never no compile thread while there + // are still scripts to compile. This could otherwise happen + // due to a race condition + // + lock (m_CompileQueue) + { + m_CurrentCompile = null; + + // This is to avoid a situation where the m_CompileQueue while loop above could complete but + // OnRezScript() place a new script on the queue and check m_CurrentCompile = null before we hit + // this section. + if (m_CompileQueue.Count > 0) + m_CurrentCompile = m_ThreadPool.QueueWorkItem(DoOnRezScriptQueue, null); + } + } return null; } @@ -1106,16 +1163,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine return false; } - m_log.DebugFormat( - "[XEngine] Loading script {0}.{1}, item UUID {2}, prim UUID {3} @ {4}.{5}", - part.ParentGroup.RootPart.Name, item.Name, itemID, part.UUID, - part.ParentGroup.RootPart.AbsolutePosition, part.ParentGroup.Scene.RegionInfo.RegionName); + if (DebugLevel > 0) + m_log.DebugFormat( + "[XEngine]: Loading script {0}.{1}, item UUID {2}, prim UUID {3} @ {4}.{5}", + part.ParentGroup.RootPart.Name, item.Name, itemID, part.UUID, + part.ParentGroup.RootPart.AbsolutePosition, part.ParentGroup.Scene.RegionInfo.RegionName); UUID assetID = item.AssetID; ScenePresence presence = m_Scene.GetScenePresence(item.OwnerID); - string assembly = ""; + string assemblyPath = ""; Culture.SetCurrentCulture(); @@ -1127,11 +1185,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine { lock (m_AddingAssemblies) { - m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assembly, out linemap); - if (!m_AddingAssemblies.ContainsKey(assembly)) { - m_AddingAssemblies[assembly] = 1; + m_Compiler.PerformScriptCompile(script, assetID.ToString(), item.OwnerID, out assemblyPath, out linemap); + +// m_log.DebugFormat( +// "[XENGINE]: Found assembly path {0} onrez {1} in {2}", +// assemblyPath, item.ItemID, World.Name); + + if (!m_AddingAssemblies.ContainsKey(assemblyPath)) { + m_AddingAssemblies[assemblyPath] = 1; } else { - m_AddingAssemblies[assembly]++; + m_AddingAssemblies[assemblyPath]++; } } @@ -1177,7 +1240,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine } catch (Exception e) { -// m_log.ErrorFormat("[XEngine]: Exception when rezzing script {0}{1}", e.Message, e.StackTrace); +// m_log.ErrorFormat( +// "[XEngine]: Exception when rezzing script with item ID {0}, {1}{2}", +// itemID, e.Message, e.StackTrace); // try // { @@ -1274,19 +1339,144 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_ScriptFailCount++; lock (m_AddingAssemblies) { - m_AddingAssemblies[assembly]--; + m_AddingAssemblies[assemblyPath]--; } return false; } } m_DomainScripts[appDomain].Add(itemID); + IScript scriptObj = null; + EventWaitHandle coopSleepHandle; + bool coopTerminationForThisScript; + + // Set up assembly name to point to the appropriate scriptEngines directory + AssemblyName assemblyName = new AssemblyName(Path.GetFileNameWithoutExtension(assemblyPath)); + assemblyName.CodeBase = Path.GetDirectoryName(assemblyPath); + + if (m_coopTermination) + { + try + { + coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset); + + scriptObj + = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( + assemblyName.FullName, + "SecondLife.XEngineScript", + false, + BindingFlags.Default, + null, + new object[] { coopSleepHandle }, + null, + null); + + coopTerminationForThisScript = true; + } + catch (TypeLoadException) + { + coopSleepHandle = null; + + try + { + scriptObj + = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( + assemblyName.FullName, + "SecondLife.Script", + false, + BindingFlags.Default, + null, + null, + null, + null); + } + catch (Exception e2) + { + m_log.Error( + string.Format( + "[XENGINE]: Could not load previous SecondLife.Script from assembly {0} in {1}. Not starting. Exception ", + assemblyName.FullName, World.Name), + e2); + + return false; + } + + coopTerminationForThisScript = false; + } + } + else + { + try + { + scriptObj + = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( + assemblyName.FullName, + "SecondLife.Script", + false, + BindingFlags.Default, + null, + null, + null, + null); + + coopSleepHandle = null; + coopTerminationForThisScript = false; + } + catch (TypeLoadException) + { + coopSleepHandle = new XEngineEventWaitHandle(false, EventResetMode.AutoReset); + + try + { + scriptObj + = (IScript)m_AppDomains[appDomain].CreateInstanceAndUnwrap( + assemblyName.FullName, + "SecondLife.XEngineScript", + false, + BindingFlags.Default, + null, + new object[] { coopSleepHandle }, + null, + null); + } + catch (Exception e2) + { + m_log.Error( + string.Format( + "[XENGINE]: Could not load previous SecondLife.XEngineScript from assembly {0} in {1}. Not starting. Exception ", + assemblyName.FullName, World.Name), + e2); + + return false; + } + + coopTerminationForThisScript = true; + } + } + + if (m_coopTermination != coopTerminationForThisScript && !HaveNotifiedLogOfScriptStopMistmatch) + { + // Notify the log that there is at least one script compile that doesn't match the + // ScriptStopStrategy. Operator has to manually delete old DLLs - we can't do this on Windows + // once the assembly has been loaded evne if the instantiation of a class was unsuccessful. + m_log.WarnFormat( + "[XEngine]: At least one existing compiled script DLL in {0} has {1} as ScriptStopStrategy whereas config setting is {2}." + + "\nContinuing with script compiled strategy but to remove this message please set [XEngine] DeleteScriptsOnStartup = true for one simulator session to remove old script DLLs (script state will not be lost).", + World.Name, coopTerminationForThisScript ? "co-op" : "abort", m_coopTermination ? "co-op" : "abort"); + + HaveNotifiedLogOfScriptStopMistmatch = true; + } + instance = new ScriptInstance(this, part, - itemID, assetID, assembly, - m_AppDomains[appDomain], - part.ParentGroup.RootPart.Name, - item.Name, startParam, postOnRez, - stateSource, m_MaxScriptQueue); + item, + startParam, postOnRez, + m_MaxScriptQueue); + + if ( + !instance.Load( + scriptObj, coopSleepHandle, assemblyPath, + Path.Combine(ScriptEnginePath, World.RegionInfo.RegionID.ToString()), stateSource, coopTerminationForThisScript)) + return false; // if (DebugLevel >= 1) // m_log.DebugFormat( @@ -1317,11 +1507,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine } if (!m_Assemblies.ContainsKey(assetID)) - m_Assemblies[assetID] = assembly; + m_Assemblies[assetID] = assemblyPath; lock (m_AddingAssemblies) { - m_AddingAssemblies[assembly]--; + m_AddingAssemblies[assemblyPath]--; } if (instance != null) @@ -1359,11 +1549,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_Scripts.Remove(itemID); } - instance.ClearQueue(); - - instance.Stop(m_WaitForEventCompletionOnScriptStop); - -// bool objectRemoved = false; + instance.Stop(m_WaitForEventCompletionOnScriptStop, true); lock (m_PrimObjects) { @@ -1376,14 +1562,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine // If there are no more scripts, remove prim if (m_PrimObjects[localID].Count == 0) - { m_PrimObjects.Remove(localID); -// objectRemoved = true; - } } } - instance.RemoveState(); + if (instance.StatePersistedHere) + instance.RemoveState(); + instance.DestroyScriptInstance(); m_DomainScripts[instance.AppDomain].Remove(instance.ItemID); @@ -1489,7 +1674,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine startInfo.MaxWorkerThreads = maxThreads; startInfo.MinWorkerThreads = minThreads; startInfo.ThreadPriority = threadPriority;; - startInfo.StackSize = stackSize; + startInfo.MaxStackSize = stackSize; startInfo.StartSuspended = true; m_ThreadPool = new SmartThreadPool(startInfo); @@ -1516,7 +1701,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine IScriptInstance instance = (ScriptInstance) parms; - //m_log.DebugFormat("[XEngine]: Processing event for {0}", instance); +// m_log.DebugFormat("[XEngine]: Processing event for {0}", instance); return instance.EventProcessor(); } @@ -1681,9 +1866,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine public bool GetScriptState(UUID itemID) { IScriptInstance instance = GetInstance(itemID); - if (instance != null) - return instance.Running; - return false; + return instance != null && instance.Running; } public void ApiResetScript(UUID itemID) @@ -1691,6 +1874,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine IScriptInstance instance = GetInstance(itemID); if (instance != null) instance.ApiResetScript(); + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public void ResetScript(UUID itemID) @@ -1698,6 +1887,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine IScriptInstance instance = GetInstance(itemID); if (instance != null) instance.ResetScript(m_WaitForEventCompletionOnScriptStop); + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public void StartScript(UUID itemID) @@ -1707,6 +1902,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine instance.Start(); else m_runFlags.AddOrUpdate(itemID, true, 240); + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public void StopScript(UUID itemID) @@ -1714,17 +1915,29 @@ namespace OpenSim.Region.ScriptEngine.XEngine IScriptInstance instance = GetInstance(itemID); if (instance != null) + { + lock (instance.EventQueue) + instance.StayStopped = true; // the script was stopped explicitly + instance.Stop(m_WaitForEventCompletionOnScriptStop); + } else + { +// m_log.DebugFormat("[XENGINE]: Could not find script with ID {0} to stop in {1}", itemID, World.Name); m_runFlags.AddOrUpdate(itemID, false, 240); + } + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public DetectParams GetDetectParams(UUID itemID, int idx) { IScriptInstance instance = GetInstance(itemID); - if (instance != null) - return instance.GetDetectParams(idx); - return null; + return instance != null ? instance.GetDetectParams(idx) : null; } public void SetMinEventDelay(UUID itemID, double delay) @@ -1737,9 +1950,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine public UUID GetDetectID(UUID itemID, int idx) { IScriptInstance instance = GetInstance(itemID); - if (instance != null) - return instance.GetDetectID(idx); - return UUID.Zero; + return instance != null ? instance.GetDetectID(idx) : UUID.Zero; } public void SetState(UUID itemID, string newState) @@ -1753,9 +1964,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine public int GetStartParameter(UUID itemID) { IScriptInstance instance = GetInstance(itemID); - if (instance == null) - return 0; - return instance.StartParam; + return instance == null ? 0 : instance.StartParam; } public void OnShutdown() @@ -1789,9 +1998,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine public IScriptApi GetApi(UUID itemID, string name) { IScriptInstance instance = GetInstance(itemID); - if (instance == null) - return null; - return instance.GetApi(name); + return instance == null ? null : instance.GetApi(name); } public void OnGetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) @@ -2090,7 +2297,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine catch (IOException ex) { // if there already exists a file at that location, it may be locked. - m_log.ErrorFormat("[XEngine]: Linemap file {0} already exists! {1}", mappath, ex.Message); + m_log.Error( + string.Format("[XEngine]: Linemap file {0} could not be written. Exception ", mappath), ex); } } } @@ -2116,6 +2324,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine m_log.ErrorFormat("[XEngine]: Error whilst writing state file {0}, {1}", statepath, ex.Message); } +// m_log.DebugFormat( +// "[XEngine]: Wrote state for script item with ID {0} at {1} in {2}", itemID, statepath, m_Scene.Name); + return true; } @@ -2137,7 +2348,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine public Dictionary GetObjectScriptsExecutionTimes() { - long tickNow = Util.EnvironmentTickCount(); Dictionary topScripts = new Dictionary(); lock (m_Scripts) @@ -2147,7 +2357,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (!topScripts.ContainsKey(si.LocalID)) topScripts[si.RootLocalID] = 0; - topScripts[si.RootLocalID] += CalculateAdjustedExectionTime(si, tickNow); + topScripts[si.RootLocalID] += GetExectionTime(si); } } @@ -2161,7 +2371,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine return 0.0f; } float time = 0.0f; - long tickNow = Util.EnvironmentTickCount(); IScriptInstance si; // Calculate the time for all scripts that this engine is executing // Ignore any others @@ -2170,36 +2379,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine si = GetInstance(id); if (si != null && si.Running) { - time += CalculateAdjustedExectionTime(si, tickNow); + time += GetExectionTime(si); } } return time; } - private float CalculateAdjustedExectionTime(IScriptInstance si, long tickNow) + private float GetExectionTime(IScriptInstance si) { - long ticksElapsed = tickNow - si.MeasurementPeriodTickStart; - - // Avoid divide by zero - if (ticksElapsed == 0) - ticksElapsed = 1; - - // Scale execution time to the ideal 55 fps frame time for these reasons. - // - // 1) XEngine does not execute scripts per frame, unlike other script engines. Hence, there is no - // 'script execution time per frame', which is the original purpose of this value. - // - // 2) Giving the raw execution times is misleading since scripts start at different times, making - // it impossible to compare scripts. - // - // 3) Scaling the raw execution time to the time that the script has been running is better but - // is still misleading since a script that has just been rezzed may appear to have been running - // for much longer. - // - // 4) Hence, we scale execution time to an idealised frame time (55 fps). This is also not perfect - // since the figure does not represent actual execution time and very hard running scripts will - // never exceed 18ms (though this is a very high number for script execution so is a warning sign). - return ((float)si.MeasurementPeriodExecutionTime / ticksElapsed) * 18.1818f; + return (float)si.ExecutionTime.GetSumTime().TotalMilliseconds; } public void SuspendScript(UUID itemID) @@ -2211,6 +2399,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine instance.Suspend(); // else // m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public void ResumeScript(UUID itemID) @@ -2222,6 +2416,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine instance.Resume(); // else // m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); + + // Send the new number of threads that are in use by the thread + // pool, I believe that by adding them to the locations where the + // script is changing states that I will catch all changes to the + // thread pool + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); } public bool HasScript(UUID itemID, out bool running) @@ -2235,5 +2435,30 @@ namespace OpenSim.Region.ScriptEngine.XEngine running = instance.Running; return true; } + + public void SleepScript(UUID itemID, int delay) + { + IScriptInstance instance = GetInstance(itemID); + if (instance == null) + return; + + instance.ExecutionTimer.Stop(); + try + { + if (instance.CoopWaitHandle != null) + { + if (instance.CoopWaitHandle.WaitOne(delay)) + throw new ScriptCoopStopException(); + } + else + { + Thread.Sleep(delay); + } + } + finally + { + instance.ExecutionTimer.Start(); + } + } } } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs index 2ac5c31..9d9dee1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XWorkItem.cs @@ -52,13 +52,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine return wr.Cancel(); } - public void Abort() + public bool Abort() { - wr.Abort(); + return wr.Cancel(true); } - public bool Wait(TimeSpan t) + public bool Wait(int t) { + // We use the integer version of WaitAll because the current version of SmartThreadPool has a bug with the + // TimeSpan version. The number of milliseconds in TimeSpan is an int64 so when STP casts it down to an + // int (32-bit) we can end up with bad values. This occurs on Windows though curiously not on Mono 2.10.8 + // (or very likely other versions of Mono at least up until 3.0.3). return SmartThreadPool.WaitAll(new IWorkItemResult[] {wr}, t, false); } } -- cgit v1.1