aboutsummaryrefslogtreecommitdiff
path: root/expressionParser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'expressionParser.mly')
-rwxr-xr-xexpressionParser.mly8
1 files changed, 8 insertions, 0 deletions
diff --git a/expressionParser.mly b/expressionParser.mly
index ac3f71d..f85f44f 100755
--- a/expressionParser.mly
+++ b/expressionParser.mly
@@ -55,6 +55,14 @@ basic:
(Num.int_of_num @@ snd $3)
(Num.int_of_num @@ snd $5)
)}
+ | NUM COLON NUM COLON NUM {
+ Date (Num.(
+ let nhour = (snd $1) // (num_of_int 24)
+ and nmin = (snd $3) // (num_of_int 1440)
+ and nsec = (snd $5) // (num_of_int 86400)
+ in nhour +/ nmin +/ nsec
+ ))
+ }
expr:
| num {Value (Num ((snd $1), Some (u(fst $1))))}