Exemple #1
0
        public RdpPattern TextDeriv(RdpPattern p, string value, XmlReader context)
        {
            if (p.IsContextDependent)
            {
                return(p.TextDeriv(value, context));
            }

            if (Object.ReferenceEquals(text_value [p], value))
            {
                return(text [p] as RdpPattern);
            }
            RdpPattern m = p.TextDeriv(value, context, this);

            text_value [p] = value;
            text [p]       = m;
            return(m);
        }
Exemple #2
0
        /*
         * // childDeriv :: Context -> Pattern -> ChildNode -> Pattern
         * internal static RdpPattern ChildDeriv (RdpContext ctx, RdpPattern p, RdpChildNode child)
         * {
         *      return p.ChildDeriv (child);
         * }
         */

        // textDeriv :: Context -> Pattern -> String -> Pattern
        internal static RdpPattern TextDeriv(XmlReader reader, RdpPattern p, string s)
        {
            return(p.TextDeriv(s, reader));
        }