Code

query language: Change iterator syntax to ANY/ALL <iter>.<field> <op> <v>.
[sysdb.git] / src / frontend / scanner.l
index 65ec9edceb79ff73769e03e37046123971d9b73f..3985bf87433553545a8ee7022cfb926370ab3b5b 100644 (file)
@@ -59,6 +59,7 @@ static struct {
        { "FILTER",      FILTER },
        { "IN",          IN },
        { "IS",          IS },
+       { "LAST",        LAST },
        { "LIST",        LIST },
        { "LOOKUP",      LOOKUP },
        { "MATCHING",    MATCHING },
@@ -66,7 +67,9 @@ static struct {
        { "NULL",        NULL_T },
        { "OR",          OR },
        { "START",       START },
+       { "STORE",       STORE },
        { "TIMESERIES",  TIMESERIES },
+       { "UPDATE",      UPDATE },
 
        /* object types */
        { "host",        HOST_T },
@@ -237,7 +240,7 @@ time                ([0-9]{1,2}:[0-9]{1,2}(:[0-9]{1,2}(\.[0-9]{1,9})?)?)
                assert(tmp);
                tmp = strchr(tmp + 1, ':');
                if (! tmp)
-                       strncat(time, ":00", sizeof(time));
+                       strncat(time, ":00", sizeof(time) - strlen(time) - 1);
 
                if (! strptime(time, "%H:%M:%S", &tm)) {
                        char errmsg[1024];