Lines Matching defs:adaptor

59      *  all this functionality into the adaptor.  An adaptor helps build and
67 protected ITreeAdaptor adaptor;
134 /** <summary>This adaptor creates TreePattern objects for use during scan()</summary> */
174 public TreeWizard( ITreeAdaptor adaptor )
176 this.adaptor = adaptor;
179 public TreeWizard( ITreeAdaptor adaptor, IDictionary<string, int> tokenNameToTypeMap )
181 this.adaptor = adaptor;
185 public TreeWizard( ITreeAdaptor adaptor, string[] tokenNames )
187 this.adaptor = adaptor;
256 int ttype = adaptor.GetType( t );
264 int n = adaptor.GetChildCount( t );
267 object child = adaptor.GetChild( t, i );
368 if ( adaptor.GetType( t ) == ttype )
372 int n = adaptor.GetChildCount( t );
375 object child = adaptor.GetChild( t, i );
483 if ( adaptor.GetType( t1 ) != tpattern.Type )
488 if ( tpattern.hasTextArg && !adaptor.GetText( t1 ).Equals( tpattern.Text ) )
499 int n1 = adaptor.GetChildCount( t1 );
507 object child1 = adaptor.GetChild( t1, i );
537 TreePatternParser parser = new TreePatternParser( tokenizer, this, adaptor );
550 * TODO: have a version that is nonstatic so it can use instance adaptor
556 public static bool Equals( object t1, object t2, ITreeAdaptor adaptor )
558 return EqualsCore( t1, t2, adaptor );
562 * Compare type, structure, and text of two trees, assuming adaptor in
568 return EqualsCore( t1, t2, adaptor );
571 protected static bool EqualsCore( object t1, object t2, ITreeAdaptor adaptor )
579 if ( adaptor.GetType( t1 ) != adaptor.GetType( t2 ) )
583 if ( !adaptor.GetText( t1 ).Equals( adaptor.GetText( t2 ) ) )
588 int n1 = adaptor.GetChildCount( t1 );
589 int n2 = adaptor.GetChildCount( t2 );
596 object child1 = adaptor.GetChild( t1, i );
597 object child2 = adaptor.GetChild( t2, i );
598 if ( !EqualsCore( child1, child2, adaptor ) )
642 int tokenType = adaptor.getType( node );
714 int tokenType = adaptor.getType( node );