diff options
author | Teravus Ovares | 2008-04-20 10:18:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-20 10:18:40 +0000 |
commit | a5bf229cbda3ba79aa7ffdba2a1b287553381942 (patch) | |
tree | d774d05195f384d8899a6a013d17a14083b75b98 | |
parent | * Added some more fixes, refactored SVNModule slightly. (diff) | |
download | opensim-SC_OLD-a5bf229cbda3ba79aa7ffdba2a1b287553381942.zip opensim-SC_OLD-a5bf229cbda3ba79aa7ffdba2a1b287553381942.tar.gz opensim-SC_OLD-a5bf229cbda3ba79aa7ffdba2a1b287553381942.tar.bz2 opensim-SC_OLD-a5bf229cbda3ba79aa7ffdba2a1b287553381942.tar.xz |
* Fixed up event discovery regexes to work with a specific string format m#1012
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 4 |
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 8d85b69..20c108d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | |||
@@ -302,7 +302,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
302 | 302 | ||
303 | string[] eventmatches = new string[0]; | 303 | string[] eventmatches = new string[0]; |
304 | //Regex stateevents = new Regex(@"(public void )([^_]+)(_event_)([^\(]+)[\(\)]+\s+[^\{]\{"); | 304 | //Regex stateevents = new Regex(@"(public void )([^_]+)(_event_)([^\(]+)[\(\)]+\s+[^\{]\{"); |
305 | eventmatches = Regex.Split(Script, @"public void\s([^_]+)_event_([^\(]+)\((?:[a-zA-Z0-9\s_,\.\-]+)?\)+\s+[^\{]\{", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); | 305 | eventmatches = Regex.Split(Script, @"public void\s([^_]+)_event_([^\(]+)\((?:[a-zA-Z0-9\s_,\.\-]+)?\)(?:[^\{]+)?\{", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); |
306 | for (int pos = 0; pos<eventmatches.GetUpperBound(0);pos++) | 306 | for (int pos = 0; pos<eventmatches.GetUpperBound(0);pos++) |
307 | { | 307 | { |
308 | pos++; // garbage | 308 | pos++; // garbage |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
329 | 329 | ||
330 | //Only match State_Entry events now | 330 | //Only match State_Entry events now |
331 | // Note the whole regex is a group, then we have the state this entry belongs to. | 331 | // Note the whole regex is a group, then we have the state this entry belongs to. |
332 | eventmatches = Regex.Split(Script, @"(public void\s([^_]+)_event_state_entry[\(\)]+\s+[^\{]\{)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); | 332 | eventmatches = Regex.Split(Script, @"(public void\s([^_]+)_event_state_entry[\(\)](?:[^\{]+)?\{)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); |
333 | int endloop = eventmatches.GetUpperBound(0); | 333 | int endloop = eventmatches.GetUpperBound(0); |
334 | for (int pos = 0; pos < endloop; pos++) | 334 | for (int pos = 0; pos < endloop; pos++) |
335 | { | 335 | { |