aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
diff options
context:
space:
mode:
authorTedd Hansen2008-02-10 21:37:19 +0000
committerTedd Hansen2008-02-10 21:37:19 +0000
commit3b844cb7563a4f2eea85e1903b753858b4e6a531 (patch)
treeeedd342b5da4ddca280f1295c4e72f2477f3b403 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL
parentAdded support for function calls as values in LSL-specific <0,0,0> and <0,0,0... (diff)
downloadopensim-SC_OLD-3b844cb7563a4f2eea85e1903b753858b4e6a531.zip
opensim-SC_OLD-3b844cb7563a4f2eea85e1903b753858b4e6a531.tar.gz
opensim-SC_OLD-3b844cb7563a4f2eea85e1903b753858b4e6a531.tar.bz2
opensim-SC_OLD-3b844cb7563a4f2eea85e1903b753858b4e6a531.tar.xz
Untested bugfix in state support
Replaced (?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){ with (?<s1>(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){ Lets see what happens now... :)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 613aa32..89921cd 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -176,7 +176,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
176 { 176 {
177 // 0 => 1: Get last 177 // 0 => 1: Get last
178 Match m = 178 Match m =
179 Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", 179 //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{",
180 Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?<statename>[a-zA-Z_]+)[^a-zA-Z_\(\)]*{",
181
180 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 182 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
181 183
182 in_state = false; 184 in_state = false;
@@ -184,11 +186,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
184 { 186 {
185 // Go back to level 0, this is not a state 187 // Go back to level 0, this is not a state
186 in_state = true; 188 in_state = true;
187 current_statename = m.Groups[1].Captures[0].Value; 189 current_statename = m.Groups["statename"].Captures[0].Value;
188 //Console.WriteLine("Current statename: " + current_statename); 190 //Console.WriteLine("Current statename: " + current_statename);
189 cache = 191 cache =
192 //@"(?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){",
190 Regex.Replace(cache, 193 Regex.Replace(cache,
191 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){", 194 @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){",
192 "${s1}${s2}", 195 "${s1}${s2}",
193 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 196 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
194 } 197 }
@@ -260,7 +263,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
260 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)", 263 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)",
261 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 264 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
262 Script = 265 Script =
263 Regex.Replace(Script, @"<([^,>;]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)", 266 Regex.Replace(Script, @"<([^,>;)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)",
264 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); 267 RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
265 268
266 // Replace List []'s 269 // Replace List []'s