From dc80fd2048dc9a2b08a4ca9d7c568c3d39c4dda9 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 7 May 2008 15:51:50 +0000 Subject: Thank you, Middelink for a patch that fixes the regular expresion missing the numbers after the initial letter of the identifier. --- .../Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 4 ++-- 1 file 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 06be20e..69aa0b0 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -197,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // 0 => 1: Get last Match m = //Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", - Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?[a-zA-Z_]+)[^a-zA-Z_\(\)]*{", + Regex.Match(cache, @"(?![a-zA-Z_]+)\s*(state\s+)?(?[a-zA-Z_][a-zA-Z_0-9]*)[^a-zA-Z_0-9\(\)]*{", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); @@ -211,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL cache = //@"(?(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?[^a-zA-Z_\(\)]*){", Regex.Replace(cache, - @"(?(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_]+)(?[^a-zA-Z_\(\)]*){", + @"(?(?![a-zA-Z_]+)\s*)" + @"(state\s+)?([a-zA-Z_][a-zA-Z_0-9]*)(?[^a-zA-Z_0-9\(\)]*){", "${s1}${s2}", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase); } -- cgit v1.1