libidav/davqlparser.h

changeset 86
ecba8bdf9741
parent 85
0ab1cf261a44
child 87
ed21d95984bb
--- a/libidav/davqlparser.h	Sat Apr 04 17:44:33 2015 +0200
+++ b/libidav/davqlparser.h	Sat Apr 04 19:05:09 2015 +0200
@@ -130,7 +130,8 @@
  * Comparison      = | "=" | "<" | ">" | "<=" | ">=" | "!=";
  * 
  * FieldExpressions = "*", {",", Expression, " as ", String}
- *                  | FieldExpression, {",", FieldExpression};
+ *                  | FieldExpression, {",", FieldExpression}
+ *                  | "-";
  * FieldExpression  = Identifier
  *                  | Expression, " as ", String;
  * SetExpressions   = SetExpression, {",", {SetExpressions};
@@ -171,6 +172,14 @@
      */
     davqltype_t type;
     /**
+     * Error code, if any error occurred. Zero otherwise.
+     */
+    int errorcode;
+    /**
+     * Error message, if any error occurred.
+     */
+    char* errormessage;
+    /**
      * The list of field expressions.
      */
     UcxList* fields;
@@ -195,11 +204,17 @@
     int depth;
 } DavQLStatement;
 
-/**
- * Infinity recursion depth for a DavQLStatement.
- */
+/** Infinity recursion depth for a DavQLStatement. */
 #define DAV_DEPTH_INFINITY -1
 
+/** No more tokens to parse, but the parser expected more. */
+#define DAVQL_ERROR_UNEXPECTED_END 1000
+
+/** A token was found, which has not been expected. */
+#define DAVQL_ERROR_UNEXPECTED_TOKEN 1010
+
+/** Nothing about the statement seems legit. */
+#define DAVQL_ERROR_INVALID -1
 
 /**
  * Starts an interactive debugger for a DavQLStatement.

mercurial