aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
diff options
context:
space:
mode:
authorTedd Hansen2007-08-12 19:04:07 +0000
committerTedd Hansen2007-08-12 19:04:07 +0000
commited1208d04378b2ef9928ed270c99f4f99f3a30d5 (patch)
treeb801ad73f59f7c055fde2f3b75022735b1a8051d /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
parentScriptManager now uses LSL-compiler. (diff)
downloadopensim-SC_OLD-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.zip
opensim-SC_OLD-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.gz
opensim-SC_OLD-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.bz2
opensim-SC_OLD-ed1208d04378b2ef9928ed270c99f4f99f3a30d5.tar.xz
ScriptEngine successfully compiles script, we are now even further than LSO was.
Also added C# script support.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 99fdb0d..6b0afa9 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
162 // void dataserver(key query_id, string data) { 162 // void dataserver(key query_id, string data) {
163 //cache = Regex.Replace(cache, @"([^a-zA-Z_]\s*)((?!if|switch|for)[a-zA-Z_]+\s*\([^\)]*\)[^{]*{)", "$1" + "<STATE>" + "$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 163 //cache = Regex.Replace(cache, @"([^a-zA-Z_]\s*)((?!if|switch|for)[a-zA-Z_]+\s*\([^\)]*\)[^{]*{)", "$1" + "<STATE>" + "$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
164 //Console.WriteLine("Replacing using statename: " + current_statename); 164 //Console.WriteLine("Replacing using statename: " + current_statename);
165 cache = Regex.Replace(cache, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1" + current_statename + "_$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 165 cache = Regex.Replace(cache, @"^(\s*)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1" + current_statename + "_$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
166 } 166 }
167 167
168 ret += cache; 168 ret += cache;
@@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
195 } 195 }
196 196
197 // Add "void" in front of functions that needs it 197 // Add "void" in front of functions that needs it
198 Script = Regex.Replace(Script, @"^(\s*)((?!if|switch|for)[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 198 Script = Regex.Replace(Script, @"^(\s*)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
199 199
200 // Replace <x,y,z> and <x,y,z,r> 200 // Replace <x,y,z> and <x,y,z,r>
201 Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 201 Script = Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new Axiom.Math.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);