Exemple #1
0
        // --------------------------------------------------------------

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

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

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