179 * Literal = Number | String | Timestamp; |
179 * Literal = Number | String | Timestamp; |
180 * Number = ?Digit?, {?Digit?} | "%d"; |
180 * Number = ?Digit?, {?Digit?} | "%d"; |
181 * String = "'", {?Character? - "'" | "'''"} , "'" | "%s"; |
181 * String = "'", {?Character? - "'" | "'''"} , "'" | "%s"; |
182 * Timestamp = "%t"; // TODO: maybe introduce a real literal |
182 * Timestamp = "%t"; // TODO: maybe introduce a real literal |
183 * |
183 * |
184 * LogicalExpression = "not ", LogicalExpression |
184 * LogicalExpression = BooleanLiteral, [LogicalOperator, LogicalExpression]; |
|
185 * BooleanExpression = "not ", LogicalExpression |
185 * | "(", LogicalExpression, ")" |
186 * | "(", LogicalExpression, ")" |
186 * | BooleanExpression, [LogicalOperator, LogicalExpression]; |
187 * | BooleanPrimary; |
187 * BooleanExpression = Expression, Comparison, Expression |
188 * BooleanPrimary = Expression, (" like " | " unlike "), String |
188 * | Expression, (" like " | " unlike "), String |
189 * | Expression, Comparison, Expression |
189 * | FunctionCall | Identifier; |
190 * | FunctionCall | Identifier; |
190 * |
191 * |
191 * LogicalOperator = " and " | " or " | " xor "; |
192 * LogicalOperator = " and " | " or " | " xor "; |
192 * Comparison = | "=" | "<" | ">" | "<=" | ">=" | "!="; |
193 * Comparison = | "=" | "<" | ">" | "<=" | ">=" | "!="; |
193 * |
194 * |
300 #define DAVQL_ERROR_MISSING_PAR 13 |
301 #define DAVQL_ERROR_MISSING_PAR 13 |
301 |
302 |
302 /** The type of the expression could not be determined. */ |
303 /** The type of the expression could not be determined. */ |
303 #define DAVQL_ERROR_INVALID_EXPR 21 |
304 #define DAVQL_ERROR_INVALID_EXPR 21 |
304 |
305 |
305 /** An operator has been found for a unary expression, but it is invalid. */ |
306 /** An operator has been found for an unary expression, but it is invalid. */ |
306 #define DAVQL_ERROR_INVALID_UNARY_OP 22 |
307 #define DAVQL_ERROR_INVALID_UNARY_OP 22 |
307 |
308 |
|
309 /** An operator has been found for a logical expression, but it is invalid. */ |
|
310 #define DAVQL_ERROR_INVALID_LOGICAL_OP 23 |
|
311 |
308 /** Invalid format specifier. */ |
312 /** Invalid format specifier. */ |
309 #define DAVQL_ERROR_INVALID_FMTSPEC 23 |
313 #define DAVQL_ERROR_INVALID_FMTSPEC 24 |
|
314 |
|
315 /** A string has been expected. */ |
|
316 #define DAVQL_ERROR_INVALID_STRING 25 |
310 |
317 |
311 /** The depth is invalid. */ |
318 /** The depth is invalid. */ |
312 #define DAVQL_ERROR_INVALID_DEPTH 101 |
319 #define DAVQL_ERROR_INVALID_DEPTH 101 |
313 |
320 |
314 /** Nothing about the statement seems legit. */ |
321 /** Nothing about the statement seems legit. */ |