--- a/libidav/davqlparser.h Sun May 24 20:27:51 2015 +0200 +++ b/libidav/davqlparser.h Thu May 28 12:22:55 2015 +0200 @@ -181,11 +181,12 @@ * String = "'", {?Character? - "'" | "'''"} , "'" | "%s"; * Timestamp = "%t"; // TODO: maybe introduce a real literal * - * LogicalExpression = "not ", LogicalExpression + * LogicalExpression = BooleanLiteral, [LogicalOperator, LogicalExpression]; + * BooleanExpression = "not ", LogicalExpression * | "(", LogicalExpression, ")" - * | BooleanExpression, [LogicalOperator, LogicalExpression]; - * BooleanExpression = Expression, Comparison, Expression - * | Expression, (" like " | " unlike "), String + * | BooleanPrimary; + * BooleanPrimary = Expression, (" like " | " unlike "), String + * | Expression, Comparison, Expression * | FunctionCall | Identifier; * * LogicalOperator = " and " | " or " | " xor "; @@ -302,11 +303,17 @@ /** The type of the expression could not be determined. */ #define DAVQL_ERROR_INVALID_EXPR 21 -/** An operator has been found for a unary expression, but it is invalid. */ +/** An operator has been found for an unary expression, but it is invalid. */ #define DAVQL_ERROR_INVALID_UNARY_OP 22 +/** An operator has been found for a logical expression, but it is invalid. */ +#define DAVQL_ERROR_INVALID_LOGICAL_OP 23 + /** Invalid format specifier. */ -#define DAVQL_ERROR_INVALID_FMTSPEC 23 +#define DAVQL_ERROR_INVALID_FMTSPEC 24 + +/** A string has been expected. */ +#define DAVQL_ERROR_INVALID_STRING 25 /** The depth is invalid. */ #define DAVQL_ERROR_INVALID_DEPTH 101