Example #1
0
 protected virtual void CheckForInvalidArguments( string[] args, Antlr.Runtime.BitSet cmdLineArgValid )
 {
     // check for invalid command line args
     for ( int a = 0; a < args.Length; a++ )
     {
         if ( !cmdLineArgValid.Member( a ) )
         {
             Console.Error.WriteLine( "invalid command-line argument: " + args[a] + "; ignored" );
         }
     }
 }
Example #2
0
 // TODO: don't include this node!!
 public virtual CommonTree GetFirstDescendantWithType(Antlr.Runtime.BitSet types)
 {
     if (types.Member(Type))
         return this;
     if (Children == null)
         return null;
     foreach (object c in Children)
     {
         GrammarAST t = (GrammarAST)c;
         if (types.Member(t.Type))
             return t;
         CommonTree d = t.GetFirstDescendantWithType(types);
         if (d != null)
             return d;
     }
     return null;
 }