Пример #1
0
        // --------------------------------------------------------------

        public static string Name(Rep ρ) => ρ.name;
Пример #2
0
 public static string Body(Rep ρ)
 => (ρ.body ?? ρ.a) + (ρ.nts ? null : " ");
Пример #3
0
 public static string Tag(Rep x) => $"__%{x.b}%__";
Пример #4
0
 public bool Encloses(Rep that) => this.b.Length == that.b.Length ? false : this.b.Contains(that.b);
Пример #5
0
        // Functions ----------------------------------------------------

        public static string[] DivBridging(string[] tokens, Rep rule)
        {
            string[] lh = rule.b.Tokenize();
            return(tokens.Replace(lh, new string[] { rule.a }));
        }
Пример #6
0
 public static string[] operator /(string[] tokens, Rep rule) => Rep.Rev(tokens, rule);
Пример #7
0
        // Functions ----------------------------------------------------

        public void Rebuild(Rep[] that)
        {
            declarative = that; rules = Rep.Reorder(that);
        }