// -------------------------------------------------------------- public static string Name(Rep ρ) => ρ.name;
public static string Body(Rep ρ) => (ρ.body ?? ρ.a) + (ρ.nts ? null : " ");
public static string Tag(Rep x) => $"__%{x.b}%__";
public bool Encloses(Rep that) => this.b.Length == that.b.Length ? false : this.b.Contains(that.b);
// Functions ---------------------------------------------------- public static string[] DivBridging(string[] tokens, Rep rule) { string[] lh = rule.b.Tokenize(); return(tokens.Replace(lh, new string[] { rule.a })); }
public static string[] operator /(string[] tokens, Rep rule) => Rep.Rev(tokens, rule);
// Functions ---------------------------------------------------- public void Rebuild(Rep[] that) { declarative = that; rules = Rep.Reorder(that); }