Beispiel #1
0
        // --------------------------------------------------------------

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

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

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