Evaluation of Filters

When filters are combined with the binary operators, unary operators, or both, they are evaluated according to these rules:

  1. First, evaluate the contents of parentheses.
  2. Next, evaluate filters that use unary operators. Both SKIP and WHILE operators have the same precedence.
  3. Finally, evaluate filters that use the binary operators. AND has higher precedence than OR.

For example, in a filter of the form Filter1 AND Filter2 OR Filter, Filter1 AND Filter2 is evaluated and the result is X. Then, X OR Filter3 is evaluated.

For another example, a filter of the form Filter1 AND SKIP Filter2 OR Filter3 is evaluated in these steps:

  1. Evaluate SKIP Filter2 with the result being X.
  2. Evaluate Filter1 AND X with the result being Y.
  3. Evaluate Y OR Filter3.