public virtual string Show()
{
StringBuilder buf = new StringBuilder();
if (_imports != null && _imports.Count > 0)
buf.Append(" : " + _imports);
foreach (string n in templates.Keys)
{
string name = n;
CompiledTemplate c = templates[name];
if (c.IsAnonSubtemplate || c == NotFoundTemplate)
continue;
int slash = name.LastIndexOf('/');
name = name.Substring(slash + 1, name.Length - slash - 1);
buf.Append(name);
buf.Append('(');
if (c.FormalArguments != null)
buf.Append(string.Join(",", c.FormalArguments.Select(i => i.ToString()).ToArray()));
buf.Append(')');
buf.Append(" ::= <<" + Environment.NewLine);
buf.Append(c.Template + Environment.NewLine);
buf.Append(">>" + Environment.NewLine);
}
return buf.ToString();
}