summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-30 04:01:37 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-30 04:01:37 +0200
commit5288ee1021ce1587f3f27b0bea151e66d9f70812 (patch)
treee7a4db8a83535673edb5a80f66eee0986534ace6
parentfd99a7ea34e627482261b22eb17f78d43f26428c (diff)
downloadgmrf-5288ee1021ce1587f3f27b0bea151e66d9f70812.tar
gmrf-5288ee1021ce1587f3f27b0bea151e66d9f70812.zip
Use floats for time specification
-rw-r--r--mmss/config.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/mmss/config.y b/mmss/config.y
index 09eff91..d40046b 100644
--- a/mmss/config.y
+++ b/mmss/config.y
@@ -85,7 +85,7 @@
%type <boolean> boolean
%type <boolean> maybe_default
%type <str> maybe_protocol
-%type <num> time
+%type <fnum> time
%type <fnum> float
%%
@@ -172,11 +172,11 @@ maybe_protocol: TOK_PROTOCOL TOK_STRING { $$ = $2; }
| { $$ = nullptr; }
;
-time: TOK_INTEGER TOK_DAYS { $$ = $1*86400; }
- | TOK_INTEGER TOK_H { $$ = $1*3600; }
- | TOK_INTEGER TOK_M { $$ = $1*60; }
- | TOK_INTEGER TOK_S { $$ = $1; }
- | TOK_INTEGER { $$ = $1; }
+time: float TOK_DAYS { $$ = $1*86400; }
+ | float TOK_H { $$ = $1*3600; }
+ | float TOK_M { $$ = $1*60; }
+ | float TOK_S { $$ = $1; }
+ | float { $$ = $1; }
;
%%