private int Priority( string Operator ) { // if its unary if ( unaryOperators.IndexOf( Operator ) >= 0 ) return 4; switch ( Operator ) { case "(": return 1; case "OR": return 2; case "AND": return 3; } return 0; }