func init // adds using namespace sys.add_use('System.Text.RegularExpressions') // initialize instance params = this.props('Constructor').value if(params == 'Constructor') params = '' + d("pattern") elseif(params == 'Constructor2') params = '' + d("pattern") + ', ' + d("opt") end sys.add_object(this.codename, 'Regex', params) // initialize temp variable if(not user_level) sys.add_var('temp', 'dynamic') end // initialize properties sys.set_undef_field('CacheSize') // makes implementation methods for properties sys._prop_init('CacheSize', 1, 1, 1, 'Regex') sys._prop_init('Options', 1, 0, 0) sys._prop_init('RightToLeft', 1, 0, 104) // makes implementation of methods as properties sys._mtd_as_prop_init('GetGroupNames()') sys._mtd_as_prop_init('GetGroupNumbers()') sys._mtd_as_prop_init('ToString()') sys._mtd_as_prop_init('Regex') // initialize common events and properties include("Object-init") end func doConstructor(pattern) blk.println(this.codename, ' = new Regex(', d("pattern"), ');') end func doConstructor2(pattern, opt) blk.println(this.codename, ' = new Regex(', d("pattern"), ', ', d("opt"), ');') end func doCompileToAssembly(regexinfos, assemblyname) blk.println('Regex.CompileToAssembly(', d("regexinfos"), ', ', d("assemblyname"), ');') end func doCompileToAssembly2(regexinfos, assemblyname, attributes) blk.println('Regex.CompileToAssembly(', d("regexinfos"), ', ', d("assemblyname"), ', ', d("attributes"), ');') end func doCompileToAssembly3(regexinfos, assemblyname, attributes, resourceFile) blk.println('Regex.CompileToAssembly(', d("regexinfos"), ', ', d("assemblyname"), ', ', d("attributes"), ', ', d("resourceFile"), ');') end func doEscape(str) if(linked("onEscape")) if(user_level) event("onEscape", 'Regex.Escape(' + d("str") + ')') else blk.println(this.temp, ' = ', 'Regex.Escape(', d("str"), ');') event("onEscape", this.temp) end else blk.println('Regex.Escape(', d("str"), ');') end end func doGroupNameFromNumber(i) if(linked("onGroupNameFromNumber")) if(user_level) event("onGroupNameFromNumber", this.codename + '.GroupNameFromNumber(' + d("i") + ')') else blk.println(this.temp, ' = ', this.codename, '.GroupNameFromNumber(', d("i"), ');') event("onGroupNameFromNumber", this.temp) end else blk.println(this.codename, '.GroupNameFromNumber(', d("i"), ');') end end func doGroupNumberFromName(name) if(linked("onGroupNumberFromName")) if(user_level) event("onGroupNumberFromName", this.codename + '.GroupNumberFromName(' + d("name") + ')') else blk.println(this.temp, ' = ', this.codename, '.GroupNumberFromName(', d("name"), ');') event("onGroupNumberFromName", this.temp) end else blk.println(this.codename, '.GroupNumberFromName(', d("name"), ');') end end func doIsMatch(input) if(linked("onIsMatch")) if(user_level) event("onIsMatch", this.codename + '.IsMatch(' + d("input") + ')') else blk.println(this.temp, ' = ', this.codename, '.IsMatch(', d("input"), ');') event("onIsMatch", this.temp) end else blk.println(this.codename, '.IsMatch(', d("input"), ');') end end func doIsMatch2(input, startat) if(linked("onIsMatch")) if(user_level) event("onIsMatch", this.codename + '.IsMatch(' + d("input") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.IsMatch(', d("input"), ', ', d("startat"), ');') event("onIsMatch", this.temp) end else blk.println(this.codename, '.IsMatch(', d("input"), ', ', d("startat"), ');') end end func doIsMatch3(input, pattern) if(linked("onIsMatch")) if(user_level) event("onIsMatch", 'Regex.IsMatch(' + d("input") + ', ' + d("pattern") + ')') else blk.println(this.temp, ' = ', 'Regex.IsMatch(', d("input"), ', ', d("pattern"), ');') event("onIsMatch", this.temp) end else blk.println('Regex.IsMatch(', d("input"), ', ', d("pattern"), ');') end end func doIsMatch4(input, pattern, opt) if(linked("onIsMatch")) if(user_level) event("onIsMatch", 'Regex.IsMatch(' + d("input") + ', ' + d("pattern") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.IsMatch(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') event("onIsMatch", this.temp) end else blk.println('Regex.IsMatch(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') end end func doMatch(input) if(linked("onMatch")) if(user_level) event("onMatch", this.codename + '.Match(' + d("input") + ')') else blk.println(this.temp, ' = ', this.codename, '.Match(', d("input"), ');') event("onMatch", this.temp) end else blk.println(this.codename, '.Match(', d("input"), ');') end end func doMatch2(input, startat) if(linked("onMatch")) if(user_level) event("onMatch", this.codename + '.Match(' + d("input") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.Match(', d("input"), ', ', d("startat"), ');') event("onMatch", this.temp) end else blk.println(this.codename, '.Match(', d("input"), ', ', d("startat"), ');') end end func doMatch3(input, pattern) if(linked("onMatch")) if(user_level) event("onMatch", 'Regex.Match(' + d("input") + ', ' + d("pattern") + ')') else blk.println(this.temp, ' = ', 'Regex.Match(', d("input"), ', ', d("pattern"), ');') event("onMatch", this.temp) end else blk.println('Regex.Match(', d("input"), ', ', d("pattern"), ');') end end func doMatch4(input, beginning, length) if(linked("onMatch")) if(user_level) event("onMatch", this.codename + '.Match(' + d("input") + ', ' + d("beginning") + ', ' + d("length") + ')') else blk.println(this.temp, ' = ', this.codename, '.Match(', d("input"), ', ', d("beginning"), ', ', d("length"), ');') event("onMatch", this.temp) end else blk.println(this.codename, '.Match(', d("input"), ', ', d("beginning"), ', ', d("length"), ');') end end func doMatch5(input, pattern, opt) if(linked("onMatch")) if(user_level) event("onMatch", 'Regex.Match(' + d("input") + ', ' + d("pattern") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.Match(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') event("onMatch", this.temp) end else blk.println('Regex.Match(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') end end func doMatches(input) if(linked("onMatches")) if(user_level) event("onMatches", this.codename + '.Matches(' + d("input") + ')') else blk.println(this.temp, ' = ', this.codename, '.Matches(', d("input"), ');') event("onMatches", this.temp) end else blk.println(this.codename, '.Matches(', d("input"), ');') end end func doMatches2(input, startat) if(linked("onMatches")) if(user_level) event("onMatches", this.codename + '.Matches(' + d("input") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.Matches(', d("input"), ', ', d("startat"), ');') event("onMatches", this.temp) end else blk.println(this.codename, '.Matches(', d("input"), ', ', d("startat"), ');') end end func doMatches3(input, pattern) if(linked("onMatches")) if(user_level) event("onMatches", 'Regex.Matches(' + d("input") + ', ' + d("pattern") + ')') else blk.println(this.temp, ' = ', 'Regex.Matches(', d("input"), ', ', d("pattern"), ');') event("onMatches", this.temp) end else blk.println('Regex.Matches(', d("input"), ', ', d("pattern"), ');') end end func doMatches4(input, pattern, opt) if(linked("onMatches")) if(user_level) event("onMatches", 'Regex.Matches(' + d("input") + ', ' + d("pattern") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.Matches(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') event("onMatches", this.temp) end else blk.println('Regex.Matches(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') end end func doReplace(input, replacement) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("replacement") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("replacement"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("replacement"), ');') end end func doReplace2(input, evaluator) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("evaluator") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ');') end end func doReplace3(input, replacement, count) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("replacement") + ', ' + d("count") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("replacement"), ', ', d("count"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("replacement"), ', ', d("count"), ');') end end func doReplace4(input, pattern, replacement) if(linked("onReplace")) if(user_level) event("onReplace", 'Regex.Replace(' + d("input") + ', ' + d("pattern") + ', ' + d("replacement") + ')') else blk.println(this.temp, ' = ', 'Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("replacement"), ');') event("onReplace", this.temp) end else blk.println('Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("replacement"), ');') end end func doReplace5(input, pattern, evaluator) if(linked("onReplace")) if(user_level) event("onReplace", 'Regex.Replace(' + d("input") + ', ' + d("pattern") + ', ' + d("evaluator") + ')') else blk.println(this.temp, ' = ', 'Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("evaluator"), ');') event("onReplace", this.temp) end else blk.println('Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("evaluator"), ');') end end func doReplace6(input, evaluator, count) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("evaluator") + ', ' + d("count") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ', ', d("count"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ', ', d("count"), ');') end end func doReplace7(input, replacement, count, startat) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("replacement") + ', ' + d("count") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("replacement"), ', ', d("count"), ', ', d("startat"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("replacement"), ', ', d("count"), ', ', d("startat"), ');') end end func doReplace8(input, pattern, replacement, opt) if(linked("onReplace")) if(user_level) event("onReplace", 'Regex.Replace(' + d("input") + ', ' + d("pattern") + ', ' + d("replacement") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("replacement"), ', ', d("opt"), ');') event("onReplace", this.temp) end else blk.println('Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("replacement"), ', ', d("opt"), ');') end end func doReplace9(input, pattern, evaluator, opt) if(linked("onReplace")) if(user_level) event("onReplace", 'Regex.Replace(' + d("input") + ', ' + d("pattern") + ', ' + d("evaluator") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("evaluator"), ', ', d("opt"), ');') event("onReplace", this.temp) end else blk.println('Regex.Replace(', d("input"), ', ', d("pattern"), ', ', d("evaluator"), ', ', d("opt"), ');') end end func doReplace10(input, evaluator, count, startat) if(linked("onReplace")) if(user_level) event("onReplace", this.codename + '.Replace(' + d("input") + ', ' + d("evaluator") + ', ' + d("count") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ', ', d("count"), ', ', d("startat"), ');') event("onReplace", this.temp) end else blk.println(this.codename, '.Replace(', d("input"), ', ', d("evaluator"), ', ', d("count"), ', ', d("startat"), ');') end end func doSplit(input) if(linked("onSplit")) if(user_level) event("onSplit", this.codename + '.Split(' + d("input") + ')') else blk.println(this.temp, ' = ', this.codename, '.Split(', d("input"), ');') event("onSplit", this.temp) end else blk.println(this.codename, '.Split(', d("input"), ');') end end func doSplit2(input, count) if(linked("onSplit")) if(user_level) event("onSplit", this.codename + '.Split(' + d("input") + ', ' + d("count") + ')') else blk.println(this.temp, ' = ', this.codename, '.Split(', d("input"), ', ', d("count"), ');') event("onSplit", this.temp) end else blk.println(this.codename, '.Split(', d("input"), ', ', d("count"), ');') end end func doSplit3(input, pattern) if(linked("onSplit")) if(user_level) event("onSplit", 'Regex.Split(' + d("input") + ', ' + d("pattern") + ')') else blk.println(this.temp, ' = ', 'Regex.Split(', d("input"), ', ', d("pattern"), ');') event("onSplit", this.temp) end else blk.println('Regex.Split(', d("input"), ', ', d("pattern"), ');') end end func doSplit4(input, count, startat) if(linked("onSplit")) if(user_level) event("onSplit", this.codename + '.Split(' + d("input") + ', ' + d("count") + ', ' + d("startat") + ')') else blk.println(this.temp, ' = ', this.codename, '.Split(', d("input"), ', ', d("count"), ', ', d("startat"), ');') event("onSplit", this.temp) end else blk.println(this.codename, '.Split(', d("input"), ', ', d("count"), ', ', d("startat"), ');') end end func doSplit5(input, pattern, opt) if(linked("onSplit")) if(user_level) event("onSplit", 'Regex.Split(' + d("input") + ', ' + d("pattern") + ', ' + d("opt") + ')') else blk.println(this.temp, ' = ', 'Regex.Split(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') event("onSplit", this.temp) end else blk.println('Regex.Split(', d("input"), ', ', d("pattern"), ', ', d("opt"), ');') end end func doUnescape(str) if(linked("onUnescape")) if(user_level) event("onUnescape", 'Regex.Unescape(' + d("str") + ')') else blk.println(this.temp, ' = ', 'Regex.Unescape(', d("str"), ');') event("onUnescape", this.temp) end else blk.println('Regex.Unescape(', d("str"), ');') end end