Пример #1
0
        public override bool Accepts(ElementExp exp)
        {
            return(Array.IndexOf(matched, exp, 0, len) >= 0);

/*		int idx = Array.IndexOf(matched,exp,0,len);
 *              if(idx>=0)	Trace.WriteLine("hit :"+ExpPrinter.printContentModel(exp)+" "+idx);
 *              else		Trace.WriteLine("miss:"+ExpPrinter.printContentModel(exp));
 *              return idx>=0;
 */     }
Пример #2
0
 public Expression OnElement(ElementExp exp)
 {
     if (token.Accepts(exp))
     {
         return(Expression.Empty);
     }
     else
     {
         return(Expression.NotAllowed);
     }
 }
 public void OnElement(ElementExp exp)
 {
     if (exp.Name.Contains(tagName))
     {
         if (matched.Length == matchedSize)
         {
             ElementExp[] buf = new ElementExp[matched.Length * 2];
             matched.CopyTo(buf, 0);
             matched = buf;
         }
         matched[matchedSize++] = exp;
     }
 }
 public Expression OnElement( ElementExp exp )
 {
     if( token.Accepts(exp) )	return Expression.Empty;
     else						return Expression.NotAllowed;
 }
 public override Expression OnElement(ElementExp exp)
 {
     return(Expression.NotAllowed);
 }
 public virtual Expression OnElement(ElementExp exp)
 {
     return(exp);
 }
        public void OnElement( ElementExp exp )
        {
            writer.Write( exp.Name );
            if( visitDepth==0 )	return;

            visitDepth--;
            writer.Write('[');
            exp.exp.Visit(this);
            writer.Write(']');
            visitDepth++;
        }
Пример #8
0
 public virtual bool Accepts(ElementExp exp)
 {
     return(false);
 }