Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/aqs.y:
if (FAILED(get_boolean_expr( ctx, DEVPROP_OPERATOR_AND_OPEN, $1, $3, &$$ )))
YYABORT;
}
- | expr TK_OR expr
{
if (FAILED(get_boolean_expr( ctx, DEVPROP_OPERATOR_OR_OPEN, $1, $3, &$$ )))
YYABORT;
}
- | TK_NOT expr
{
if (FAILED(get_boolean_expr( ctx, DEVPROP_OPERATOR_NOT_OPEN, $2, NULL, &$$ )))
YYABORT;
}
- | expr expr
{
if (FAILED(join_expr( ctx, $1, $2, &$$ )))
This was parsed as AND before, it's now just joining filters, is it strictly equivalent? What about precedence rules in the filter array, if you have `expr expr OR expr` for instance?
I don't see any check on the parsed filters but I guess they only accessible through the undocumented `AqsToDevQueryFilter`?
If the returned filter array structure isn't so important, maybe it'd be simpler to reuse an AND expression here and avoid the extra helper?