public Define(Rgx::Match m) { this.name = m.Groups["name"].Value; string content = m.Groups["content"].Value.Trim(); int c_param = 0; foreach (Rgx::Capture param in m.Groups["param"].Captures) { content = Rgx::Regex.Replace(content, @"\b" + param.Value + @"\b", PARAM_HEAD + c_param++.ToString()); } //this.content=content; string rp = @"\b" + this.name + @"\b"; if (c_param == 1) { rp += DEFINE_ARGS1; } else if (c_param > 0) { rp += string.Format(DEFINE_ARGS2, c_param - 1); } this.rp_entity = rp; this.start = m.Index + m.Length; //-- 適当なハンドラを初期化 if (AfhDefineProcessor.TryCreateInstance(content, out this.proc)) { return; } this.proc = new DefineProcessor(content); }